Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
903
Using the WebHierarchicalDataSource with UltraWebGrid
posted

A tip to prevent others wasting as much time as I did.  The documentation section "Binding WebGrid to a WebHierarchicalDataSource" is missing a key point.

Set the ViewType off the DisplayLayout object to Hierarchical.

or in code

UltraWebGrid1.DisplayLayout.ViewType = ViewType.Hierarchical

The example uses ObjectDataSource  components. It shows setting up classes in order to add and change data.   These are not necessary with SQLDataSources (no I didn't get as far as trying that).  You can edit data without even having to set any Update SQL.

It is also not documented that you delete a row by selecting a cell (or row) and pressing the Delete or Del key.  This is, perhaps, obvious but since it is not what you do in either Excel or Access I would have thought it worth a mention somewhere.