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
139
Creating Hierarchical Grid Programmatically
posted

Can anyone write me a code where I can create a hierarchical grid programmatically by adding each row separately? I know data binding is a nice cute feature but our software design doesn't permit us using the binding directly. So I need to add data one by one in the grid, that too in hierarchical fashion.

The concept of bands is kinda confusing.

Can anyone please just write a small like of code where I create a grid, add couple of columns and a couple of rows to it. And for each row I need to two columns and 1 row each.

Thanks. I just need an idea of the thing.

Parents
  • 8680
    posted

    You can create a DataSet with related tables, then fill it with your data.  Then set your grid's DataSource to the DataSet and DataBind it.  Everything will then fall into place.

    Think of bands as related tables. If you are doing an invoicing system, you might have your customer list in band 0, your order list in band 1, and your order detail list in band 2.  Once you bind such a dataset to a grid, the orders will be displayed under their respective customer, etc.

    I posted an example here: http://forums.infragistics.com/forums/p/3298/17902.aspx#17902

Reply Children