Hi,
I have WHDG binded to one data source.
I need featuer where on drag of column groups the data as required
Say , data is
Name 1, Dep1
Name 2, Dep1
Name 3, Dep3
So If I drag dept column to group area, it should group by dept and show the +/- sign
As I understand, grouping is only possible in WHDG, do I need two different data source in order to perform this action ?
How can I do that?
ANy sample will be of great help..
Regarsd
Varun
Hello Varun,
I have modified my sample in order to show you how to Bind the Grid to DataSet and also to use Grouping and Row Adding. I hope you will benefit from the sample.
And yes, you can handle RowUpdating and RowAdding server side events, and use them as you wish.
Let me know if I may be of further assistance.
Hi Zdravko
Thanks for the follow up.
I checked that in your sample, you have binded the webdatasource to Access data source.
In my situation, I need to bind WBDH to Data table or data set (as you mentioned data table will not work).. and then need to call rowUpdaing and rowadding event..
Can I do that using dataset ?
any code snippet
Thank you for using our forum!
About your concerns, yes only WHDG control provide Grouping functionality, this feature do not persist in the WebDataGrid. You don't need two data sources in order to perform this action. You can use WebHierarchicalDataSource with just one DataView (only Parent source, without Child). If you want to use DataTable for example (Flat Data Source), you will need to create a DataSet first and add the DataTable into it, since the WHDG is not capable to bind to a flat data source.
I have created a sample for you, in order to show you how to bind the WHDG to DataSource with one hierarchical level (0).
Looking forward to hearing from you.