jQuery UI Widgets › Forums › Grid › Dynamic grid based on number of columns.
Tagged: angular grid, column, csv, Dynamic Columns, grid, jquery grid, jqxgrid, localization
This topic contains 3 replies, has 2 voices, and was last updated by ashwin prabhu 10 years, 5 months ago.
-
Author
-
Hi,
I have a grid with 5 columns and data is displayed properly from the csv file at backend. . however, in some cases A CSV file might have 8 or 10 columns. How can we dynamically display the entire csv file data along with the columns.Kind Regards,
ashwin prabhuHi,
You can refer to this example and let me know or provide me a reference of any other code. ThanksHi ashwin prabhu,
Please refer to the demo Dynamic Columns. We hope it is helpful to you.
And what help do you need regarding grid localization? Please clarify.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi Dimitar,
As per the above link, can you please let me know how are the json data stored in the url of the source.
I can only see
var url = "../sampledata/rows_and_columns.txt";Can you provide me the full link so i can view the file contents and understand it better.
As far as i can understand from the code, it checks the json file and updates the grid column header as per the value it is stored in the text file of URL… i.e. we know that the columns would be either of these below
datafields: [ { name: 'id', type: 'number' }, { name: 'name', type: 'string' }, { name: 'type', type: 'string' }, { name: 'calories', type: 'int' }, { name: 'totalfat', type: 'string' }, { name: 'protein', type: 'string' } ],But wat if instead of the above case, we have 5 or 10 columns and different names each time. How can we display such dynamic columns name and different number of columns.
-
AuthorPosts
You must be logged in to reply to this topic.