We were using the Infragistics NetAdvantage 11.1 suite of controls and adding a row on the server side use to be very simple, with the code below.
Dim oEndorsementRow As UltraGridRow, oEndorsementCell As UltraGridCell
oEndorsementRow = New UltraGridRow oEndorsementCell = New UltraGridCell(True) With oEndorsementCell .Key = "EndorsementKey" .Value = 1 End With oEndorsementRow.Cells.Add(oEndorsementCell) oEndorsementCell = New UltraGridCell(True) With oEndorsementCell .Key = "EndorsementNumber" .Value = "ML-55" End With oEndorsementRow.Cells.Add(oEndorsementCell) myDataGrid.Rows.Add(oEndorsementRow)
We are using this approach to add data to unbound grid at several places in our project and it has worked really well. Above is just a simplified example for illustrarion. However with the newer WebDataGrid I cannot seem to find corresponding objects to UltraGridRow and UltraGridCell. Have scoured the forum and cannot believe that such useful objects would have been take out of the API structure. We are in the process of converting our project to start using the NetAdvantage 2014 Volume 1 and it's Aikido controls.
Can someone please guide me in the right direction on how to accomplish this and what are the corresponding objects? I must add these rows on the server side.
Thank you.
Hello Vineet,
By design the WebDataGrid requires an underlying datasource. You do not need to display the fields of this datasource and can make use of UnboundColumns, but you still need to have some form of DataSource that will be used to determine the number of rows that will be rendered.
For a good explanation of this along with a sample please see the following forum thread:
http://es.infragistics.com/community/forums/p/76764/389470.aspx#389470
Hi Jason,
Thank you for your reply. However I have a couple of counter questions. While I understand that the controls have been completely rewired from ground-up and they no longer work like the classic controls. This is causing a lot of problems for the developers like myself who had been using the classic controls like UltraWebGrid and UltraTab. They had a very rich feature set and were very flexible in their usage. The corresponding WebDataGrid and WebTab seem to be very constricted in their design and simple features require a complex approach.
For eg, I have been trying to work with unbound columns, and what I have been seeing is when I add an unbound column in design mode and wire up my grid at runtime to a datasource and check the option to auto-generate columns, the unbound column is no longer available. I use the same grid to show different datasets, based on some application logic, so hard-coding the bound/unbound columns during design time is not an option for me.
I have also tried to add an unbound column column during run time int he INIT event of the webgrid. Even that does not seem to work. Are we allowed to add unbound columns dynamically? If so is the INIT event is the recommended place to do it? I just cannot get this to work, how I need it to.
I cannot believe that a very useful event like InitializeLayOut would be taken away from the developers. We used it very much to our advantage through out the application. May be you guys had good reason to change everything, but I think some of these really helpful properties/methods should have been retained. So that application developers like myself could focus on the business logic instead of chasing our tail. We have been Infragistics users for over a decade now, and this transition is probably the toughest for us.
Also can you please point me to a good resource which explains and illustrates the CSOM (properties and methods) for the WebDataGrid and WebTab. I was able to get something on your website but it did not lay our all the properties and methods, only some common ones were mentioned there. We use client side handling extensively.
Your help will be very much appreciated.