I have a WebHierarchicalDataGrid (2010.2 Net CLR 2.x) control on a web page and I want to bind a dataset to it as the datasource. It's a display only grid with grouping and sorting enabled. On the first page load everything displays properly. A routine is called that queries data into a dataset and then assigns it to the WHDG followed by a databind of course. Everything looks great at this point. I have EnableDataViewState set to true on the grid. When I try to perform any grouping or sorting on the grid it posts back and then displays empty (as if the viewstate for the data was not preserved).
If I rebind by recreating the dataset everypost, the grid works as expected but that seems very inefficient to call the database everytime someone wants to regroup the grid or sort. BTW, my data model is flat. I am only using the Hierarchical grid to take advantage of grouping, filtering and sorting. This ability was touted in the grids overview.
Next thing I try is to store the dataset in viewstate after the first page call and grid binding and then on successive calls reassign the dataset to the grid datasource on page load followed with a rebind. This eliminates the redundant database calls. Although this technically works, I am curious as to why I have to do this. It seems as though enableDataViewState is not working although it is set to true.
I dont want to use a datasource control because I would be forced into an ODBC model as your data source control doesnt work natively with SQL 7. Your control asks for Sql 2000 or higher data source.
So, I need to use a dataset and I need the data viewstate storage mecahnism to work. Is this a bug in the product or am I overlooking something simple?
Hello Gary,
This seems like a development issue. I created a support ticket on your behalf in order to investigate further.
Regards,
Lyuba
Developer Support Engineer
Infragistics
www.infragistics.com/support
I am facing same issue. apart from this I was not able to set different column width while binding dataset. I have set autogeneratecolumn to true because i don't want to hardcord the column name.
Also export to excel throws object reference error.
Needed very urgently please help.....
For all to benefit, here is the answer I received from infragistics developer support team; In order for the grouping to work, you still need to provide a reference to the data source on every postback. Even though the grid retrieves the top level rows from the view state in this case, it needs to know its data layout to group correctly.
For all to benefit, here is the answer I received from infragistics developer support team;
In order for the grouping to work, you still need to provide a reference to the data source on every postback. Even though the grid retrieves the top level rows from the view state in this case, it needs to know its data layout to group correctly.
I am converting the viewstate to dataset and then binding. but its throwing error while using with webexportexcel component.
or should I put the dataset in session and try??
my sorting works fine , when i bind dataset to webhgrid but export to excel fails...