EJS TreeGrid是一個用純JavaScript編寫的DHTML組件,用于在HTML頁面上顯示和編輯表格、網(wǎng)格、樹形視圖、樹形網(wǎng)格或條形圖中的數(shù)據(jù),它是Internet上超快的AJAX網(wǎng)格,具有豐富的功能集。
EJS TreeGrid is a DHTML component written in pure JavaScript to display and edit data in table, grid, tree view, tree grid or bar chart on HTML page.
It is the fastest AJAX grid with the richest features set available on the Internet.
TreeGrid實(shí)例展示
用于在網(wǎng)格和樹視圖中顯示和編輯數(shù)據(jù)的基礎(chǔ)組件
支持的瀏覽器
-
Microsoft Internet Explorer(IE6, IE7, IE8, IE9, IE10, IE11)、Microsoft Edge IE12 - IE18
-
Mozilla Firefox(FF1.5 - FF106)
-
Google Chrome(CH3 - CH107)、Microsoft Edge(IE79 - IE106)
-
Apple Safari、Mac OSX & Windows(S3 - S16.1)
-
Opera(O9 - O12 (Presto)、O15 - O91 (WebKit))
-
Apple iOS(Safari Mobile[S4 - S16.1]、[CH / FF / UC])
-
Android Mobile(CH / FF / UC / SI,A2 - A106)
JavaScript框架
EJS TreeGrid包包含了在JavaScript框架中使用的示例和文檔(還可以在任何其他支持第三方JavaScript代碼的客戶端框架中使用):
-
Angular (TypeScript)
-
React (JavaScript / TypeScript)
-
Vue (JavaScript / TypeScript)
-
其他框架(HTML、JavaScript)
服務(wù)器端支持
EJS TreeGrid包包含服務(wù)器端腳本的示例和預(yù)定義代碼(還可以在任何其他可以處理XML或JSON數(shù)據(jù)的服務(wù)器腳本環(huán)境中使用):
-
NodeJS (JavaScript)
-
ASP.NET (C#, Visual Basic)
-
JSP (Java)
-
PHP
-
HTML(其他)
主要優(yōu)勢
-
先進(jìn)的單元格公式,表達(dá)式和計算,類似于MS Excel
-
各種分頁類型,以使用AJAX和分頁組件顯示幾乎無限數(shù)量(數(shù)百萬)的行,還有列分頁
-
高級過濾器,類似于MS Excel的過濾表達(dá)式
-
類似于Google的搜索
-
根據(jù)列值自動將行分組到樹
-
多級數(shù)據(jù)透視表(二維分組),可編輯、無限源列
-
固定(凍結(jié))所有邊緣上的列和行
-
在列(colspan)或行(rowspan)之間或兩個方向上實(shí)現(xiàn)單元格跨度,用戶也可以使用動態(tài)跨度
-
在網(wǎng)格之間的拖動行(移動和復(fù)制)
-
通過鼠標(biāo)拖動調(diào)整行大小,行內(nèi)容的垂直對齊
-
通過鍵盤或鼠標(biāo)單擊或拖動選擇行、列或單元格范圍;可選擇的預(yù)定義或自定義操作
-
用鼠標(biāo)移動、凍結(jié)或解凍列
-
列的添加、復(fù)制和刪除
-
各種單元格類型,如文本,數(shù)字,復(fù)選框,文本區(qū),組合框,圖像,鏈接或任何其他HTML等
-
用于根據(jù)類型和格式字符串顯示和編輯的高級格式化值
-
選擇日期的日歷組件,一個選擇日期范圍和重復(fù)日期的特殊對話框
-
各種編輯掩碼
-
在編輯時、編輯后和保存前驗(yàn)證單元格值
-
在文本區(qū)多行編輯
-
將圖像插入單元格文本或外部單元格,如MS Excel,通過將其放入單元格或從文件系統(tǒng)中選擇打開圖像文件
-
通過鼠標(biāo)拖動編輯單元格內(nèi)部或外部的圖像-移動,調(diào)整大小,旋轉(zhuǎn),裁剪,更改不透明度或名稱
-
與MS Excel一樣,單個單元格或單元格矩形的單元格焦點(diǎn)光標(biāo),拖動聚焦的單元格
-
像在MS Excel中一樣,通過鼠標(biāo)拖動自動填充單元格值
-
單元格更改(清除、復(fù)制、移動、填充、粘貼、驗(yàn)證)
-
自動完成組合與建議列表的任何單元格
-
打印選項(xiàng)或?qū)С龅絇DF與各種PDF設(shè)置和可能的分裂頁在兩個方向
-
導(dǎo)出到Microsoft Excel或任何其他電子表格程序,可以處理XLSX, XLS, CSV文件或HTML表格
-
與服務(wù)器的數(shù)據(jù)同步
-
在TreeGrid單元中嵌套細(xì)節(jié)網(wǎng)格,無限嵌套級別
-
響應(yīng)式網(wǎng)頁設(shè)計,根據(jù)定義的媒體規(guī)則改變viewport大小的網(wǎng)格布局
-
創(chuàng)建甘特圖也可用;包括依賴項(xiàng)、資源、摘要、約束和動態(tài)更新
-
顯示和動態(tài)更新外部對象,如Adobe Flash, Microsoft SilverLight或自定義JavaScript對象
-
完全可定制的CSS樣式來改變網(wǎng)格外觀
-
高級JavaScript API,帶有從JavaScript控制網(wǎng)格的事件和方法
-
在頁面上使用網(wǎng)格而不需要任何JavaScript代碼
-
成熟的XML輸入/輸出格式,還支持JSON格式
-
完全可定制的鍵盤和鼠標(biāo)導(dǎo)航操作方案
-
非??斓娘@示和控制
-
腳本模塊 - 不使用的模塊可以從腳本中刪除,以縮短腳本的長度
-
本地化到任何可能的語言,包括所有文本、日期和數(shù)字格式、內(nèi)置翻譯到主要語言
TreeGrid Gantt Chart is TreeGrid extension to display charts for project and service management or for any other purposes.
The data can come from many data sources: static XML file, static JS file (JSON format), XML web service, SOAP web service, or any page generated by PHP, JSP, ASP, ASP.NET, or any other server script. Changed data can be uploaded to server without submit (AJAX) the page. Methods of upload can be HTML form POST or SOAP XML. Changed data can also be uploaded by standard form/page submit (in hidden input, for example) or in any custom way of submit.
Input / output data format is XML tree with or without predefined DTD. Rows are identified by id attribute. In this format the data can be stored on server or can be easy converted to any other representation, database table for example.
For Windows and Linux systems is available server side component to support up to million rows with sorting, filtering and calculations capabilities. This is standard DLL / SO and can be used in any server script environment that can use DLL on Windows systems or SO on Linux systems (ASP.NET, Java servlets / JSP, PHP, ...). The DLL / SO is very fast and thin. This DLL is just helper library and you don't need to use it, if you want to support server paging by your own script.
EJS TreeGrid is client component and runs on client browser. It is compatible with the most of standard browsers. It does not require any installation or other components on client or server side. It does not need any JavaScript code to use TreeGrid on a page. It is very easy to build the control into html page in any server script environment (ASP, ASP.NET, PHP, JSP, ... , any XML web service). In these environments you need only code for reading and writing data in XML format. Bandwidth between server and client is reduced to minimum because all actions are performed on client side and from and to server are sent just pure data.
Basics:
- Compatible with
Internet Explorer 6.0+ and all IE engine shells
Mozilla Firefox 1.5+ and all other Gecko engine shells
Opera 9.0+
Google Chrome 3.0+ and Safari 3.0+ and all other WebKit engine shells
iPad Safari Mobile 1.0+
Android Android browser 3.0+
- Supports all CSS1 compatibility modes: strict mode, almost strict mode, quirks mode. All <!DOCTYPE> tag settings are supported.
- TreeGrid can handle up to about 20 000 rows offline and up to millions rows online using paging and AJAX.
- Various types of paging with sorting, filtering and calculations for all pages. Also paging in columns and tree.
- You don't need to write any JavaScript code to use TreeGrid on your page.
- There are no other requirements on client side.
- All operations are performed on client side, without sending data to server. (If no server paging used)
- Data format is small, server sends only values, not graphic formatting.
- User script extension by defined events in TreeGrid. For data validation or changing value after edit, to approve an operation, to change TreeGrid look, to change state colors, and many more.
- Extended API to control all functions of TreeGrid from JavaScript code
- Visual settings by CSS styles.
- Row and cell colors by their state (changed, deleted, added, focused, selected, mouse hover, editable, ...).
- Cell spanning and merging, including dynamic span by mouse dragging.
- User settings (column visibility, position and size, type of sorting, filters, all grid settings) are saved at client into cookies or can be sent to server.
- More tree grids on one page, possible operations among them (dragging rows for example). Different styles/images/colors for them are possible !
- Master / detail grids or even tree grids.
- Grouping rows to tree according to same values in column(s). Similar to summarizations in Pivot table in MS Excel.
- Calculated cells like in MS Excel, include mathematic, aggregate (sum, count, sumif, ...), statistic and user-defined functions. Or any JavaScript code in formulas.
- Filters like in MS Excel. For any column user can specify an expression and operator to filter rows by this column's values. More filters for one grid. Date and number ranges filters (between clause).
- Advanced filters by any expression or formula, with possibility to define predefined filters.
- Searching like by Google.
- Export to Microsoft Excel or any other spreadsheet program that can handle XLS files or data in HTML tables. Include number and date formats.
- Printing capabilities, export to PDF, including various PDF options
- Control panel for TreeGrid operations. Can be inside or outside of TreeGrid. All its buttons can be controlled from events, or be hidden.
- Server side paging, validation, sorting and filtering support. Cells can be marked as wrong with error title sent from server.
- Variable row height according to cell content, height changing when editing in text area.
- Displaying and dynamic updating of external objects like Adobe Flash, Microsoft SilverLight or custom JavaScript objects
- Many examples and predefined code for server side scripts ASP (VBScript), ASP.NET (C#, Visual Basic), JSP (Java) and PHP.
- Detailed documentation of TreeGrid usage, events, data format, JavaScript API and cell formulas.
Data communication:
- The input/output data format is XML document parsed by any XML parser. XML document can be sent as a document or as a coded string
- The XML is well formed and has predefined universal DTD (data type definition).
- Supported is also JSON format in string or JavaScript.
- The input data can came from various sources: static XML file, XML generated by web page, XML web service, SOAP web service, form input control value on HTML page or any other user defined source. Input format is automatically recognized.
- The changed data can be uploaded to the server without submitting and reloading the page (AJAX) or by submit the page as a part of content of sent form's data.
- The methods of upload are: text/plain, text/xml, application/x-www-form-urlencoded, text/xml in SOAP XML format.
- Supported XML web service functions are those, which use HTML form or SOAP XML communication. This function must return string or XML document and accept in parameters string, XML document or any basic type. All ASP.NET, Java SOAP (SAAJ), PHP SOAP web services are supported.
- Synchronization with server - TreeGrid can automatically check and download all changes from server done by other users or applications.
Functions:
- Displaying data in rows and columns in treeview with tree and grid or in pure datagrid without tree.
- Displaying and formatting values according to their type (string, boolean, integer, float, enum (select), radio, datetime, html, img, url ...). Possible edit masks given by any regular expression.
- Values types and formats are usually set for whole column, but can be set individually for cell. Cells can be set as readonly.
- Editing values based on their type and html form elements (input, checkbox, select, textarea, ...). For dates is used own calendar control.
- User buttons in cells, prepared user dialog
- Expanding / collapsing rows in tree.
- Controlling by mouse or by keys. Tab key support. Fully customizable mouse and key schemas.
- Copy & paste selected cells to and from grid or any text editor or spreadsheet program like MS Excel. Not in Opera browser.
- Adding and deleting rows.
- Moving and copying rows by mouse dragging (drag and drop operations with rows and groups of rows). Even among more TreeGrids. Controlled by user API events.
- Resizing and moving columns.
- Selecting rows and operations with selected groups (moving, copying, deleting, dragging, ...).
- Selecting rows or cell range by mouse and operations with selected range (copying, pasting, custom actions, ...).
- Sorting rows by one or even more columns, string compare - case and localization sensitive or ignore.
- Filtering rows according to their values
- Scrolling of parts of content - fixed and variable rows and columns on all sides. Mouse wheel compatible.
- Localization possible. All texts are in external XML file and can be translated to any language. This file also contains language dependent number and date-time formats and constants.
TreeGrid Live examples
Paging with grouping, sorting, filtering, export and calculations
This example shows various TreeGrid features with server paging on table with 2,000, 10,000 and 50,000 rows.
This example does not use any custom JavaScript or special server script code, all features are set via XML data definitions and provided by TreeGrid!
Large table without paging
TreeGrid is fast and can display large tables without any delayed rendering in reasonable times. This example displays 1,000 rows and 14 columns. All rows and columns are rendered on start and are shown immediatelly.
Of course, using paging is much faster, you can choose Client paging and compare rendering times with the grid without paging. You can test features like sorting, filtering, grouping, column hiding / showing, column moving, print, export and so on, in such large table. In bottom debug window you can see the times spent by provided actions.
Interactive Gantt chart
A demonstration of TreeGrid application showing interactive Gantt chart - timetable of tasks and their completion in project management.
Interactive Run chart example
This example demonstrates Continuous Run, complex and universal bar type in Gantt chart. It supports more bars in one cell, with different features, size, color, class, text and tooltip.
- New box can be added by dragging it from the right grid or by dragging empty space in the left grid.
- Box can be resized by dragging its edge. Fixed or solid box by dragging the edge with Ctrl.
- Box can be moved inside the cell by mouse dragging. Box can be moved outside the cell by dragging with Ctrl.
- Dragging box to the edge of other box joins the boxes, the boxes are moved together. The boxes can be separated by dragging one box with Shift.
- When dragging box with Shift, the box can be placed everywhere, even to incorrect position.
- Box can be deleted by resizing it to empty width or from popup menu.
The box type, color, text and tooltip can be changed from popup menu (right click).
- Chart can be zoomed by selecting date range by mouse draging or clicking to one date in Gantt header, unzoomed by right click Gantt header.
In this example are excluded weekends as holidays, except the weekend 24~25th May. The weekends are excluded from the run lengths, the runs cannot start or end in weekend.
- All these control settings can be changed in XML.