Radgrid asp.net

3 posts, 0 answers
  1. Mark
    Mark avatar
    82 posts
    Member since:
    Jan 2015

    Posted 23 Jan 2017 Link to this post

    I have an auto-generated grid from a datatable.  I need to find the index of 2 columns and then traverse the columns (i.e. col 4-6) and then grab the data from each cell and make it bold based on a condition. 

    1 -How can I get the indexes of these if I know the header name?

    2 - how do I traverse the columns and grab it's data?

     

    Thanks in advance!

  2. Mark
    Mark avatar
    82 posts
    Member since:
    Jan 2015

    Posted 24 Jan 2017 in reply to Mark Link to this post

    I finally figured it out.

    'to get the column text from a page load etc.

    intTotalWip = CInt(e.Item.Cells(grdDetail.MasterTableView.GetColumn("TotalWIP").OrderIndex).Text)

    As I loop through:

    For Each col As GridColumn In grdDetail.MasterTableView.AutoGeneratedColumns

    if col.UniqueName = "columnname"

         index = col.OrderIndex

  3. Mark
    Mark avatar
    82 posts
    Member since:
    Jan 2015

    Posted 24 Jan 2017 Link to this post

    Sorry the first is from itemdatabound
Back to Top