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
625
Iterate through Controls within a column (Upgrading from UltraWebGrid)
posted

I am upgrading from the ultra web grid and with the grid I am upgrading from we iterate through all controls within a column by first iterating through the columns to get each column (I have managed to port this to the WebDataGrid just fine) and then inside of that iteration iterate through the controls. For the UltraWebGrid it was done like so:

For Each c As Control In DirectCast(ugc, Infragistics.WebUI.UltraWebGrid.TemplatedColumn).CellItems(e.Row.Index).Controls
 'Action to perform
Next

I cannot find a control collection within the column for the WebDataGrid for me to perform a similar function. If it helps I am only handling TemplateDataFields and looking for controls within their ItemTemplate. this is being done in the InitilizeRow event for the WebDataGrid. I have tried a accessing the items in the record for said column by doing:

For Each c As Control In e.Row.Items.Record.Items(column.Index).Record.Items
 'Action to perform
Next

Yet this returns nothing and thus causes errors. How can one iterate through the controls in an TemplateDataField's ItemTemplate

Parents
No Data
Reply
  • 625
    posted

    Could really do with a response to this question as it is holding up our ability to upgrade to the newer versions

Children