This is a migrated thread and some comments may be shown as answers.

Grid DataTable source with ajax binding

0 Answers 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Josias
Top achievements
Rank 1
Josias asked on 27 Sep 2012, 07:00 PM
Hello,

I have a grid that's being bound to a datatable and works fine with server requests. But once I try binding via ajax I get a circular reference error. I tried to use a helper method to convert the datatable into List<Dictionary<string, object>> and bind the grid to said collection, but I can't get that to work either.
My need to use a DataTable stems from a particular use case, let me illustrate:
The application enlists certain areas within a manufacturing process, each area has a list of part numbers/names; in a different form defects are being captured for particular parts. The grid must be rendered "dynamically" based on the part names listed for a particular area in the database, and the amount of defects for each part, like so:

Column 0 Column 1 Column 2 Column 3 Column 4
Defect Silicone seal FF Mask Headgear Swivel
Bubbles in functional area 0 0 0 3
Heterogeneous coloring 4 0 1 0
... ... ... ... ...

Column0 is fixed and must happen for all instances of the grid, the number of columns after this one depends on what I mentioned above, so the overall number of columns and member name/title will vary.
My first approach was to build a DataTable from the information retrieved from database, which works fine with server binding, but I'm stumped as to how to use ajax binding (which is needed for requirements not listed here). I've attached a sample project with my approach. Any suggestions?

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Josias
Top achievements
Rank 1
Share this question
or