Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery EasyUI DataGrid - Converting an HTML Table to a DataGrid

jQuery EasyUI DataGrid - Converting an HTML Table to a DataGrid

This example demonstrates how to convert a table into a datagrid.

The datagrid's column information and data are defined in the table markup. Make sure to set the field name for all data columns, see the example below:



    

        

            

                

                

                

                

                

                

                                      

                                   

                                    

                                       

                            

                            

                            

                            

                            

                            

                                      

                                       

                            

                            

                            

                            

                            

                            

                                      

                                       

                            

                            

                            

                            

                            

                            

                                      

                                       

                            

                            

                            

                            

                            

                            

                                      

                                   

    
Col 1Col 2Col 3Col 4Col 5Col 6
Data 1Data 2Data 3Data 4Data 5Data 6
Data 1Data 2Data 3Data 4Data 5Data 6
Data 1Data 2Data 3Data 4Data 5Data 6
Data 1Data 2Data 3Data 4Data 5Data 6

Great, you can define a complex header, for example:



    

        

            Col 1

            Col 2

            Col 3

            Details

        

        

            Col 4

            Col 5

            Col 6

                                  

    

Now you can see that the complex header has been created.

Download the jQuery EasyUI example

jeasyui-datagrid-datagrid1.zip