Is it possible to bind a single DataTable to a WebHierarchicalDataGrid at runtime with AutoGenerateColumns = true?
We try this and, while the DataBind method fires, the grid is empty.
Was able to get the grid to work if a bind on initial page load. Any subsequent attempts to bind data from other queries, once the page is loaded does not work. The code behind goes through the motions of databinding and I can even test that changes have occured, but when control is returned to the browser... nothing changes.
Thanks David,
That is what we are doing. Then I bind that dataset. The DataBound event fires and we test for the number of rows in the grid and get a valid value. But, when returning back to the browser, the grid does not render.
Hi cantrellr,The WebHierarchicalDataGrid requires a hierarchical source, even for one level. So in this case, just add the DataTable to a DataSet and you will be good to go.
regards,David Young
A bit of clarity. We trap the DataBound event and the grid reports that it has rows via this little chunck of code: ighGridMain.Rows.Count
But, when it renders at the browser, it remains empty. I suspect it is something in our grid definition, which follows:
<ig:WebHierarchicalDataGrid ID="ighGridMain" runat="server" AutoGenerateBands="true" AutoGenerateColumns="true" EnableDataViewState="true" Height="" InitialDataBindDepth="0" Width="100%" />
Am I missing something?