How to get level 2 hierarchy first column value?

3 posts, 0 answers
  1. Howard
    Howard avatar
    6 posts
    Member since:
    Nov 2012

    Posted 11 Apr 2013 Link to this post

    Hi, I have a hierarchy radgrid which have 2 levels,  I bind the data with "<asp:Label ID="lblDescription" runat="server" Text='<%# Bind("DESCRIPTION") %>' />" in my level 2 first column. And I want to DirectCast the label text to another word. How to I get the value of lblDescription? Thanks
  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 08 May 2013 Link to this post

    Hello Howard,

    I would suggest posting this on the ASP forums to get an answer to this question, if you haven't done so already

    Best Regards,
    Emanuel Varga
  3. DevCraft R3 2016 release webinar banner
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 09 May 2013 Link to this post


    You can retrieve the value in itemdatabound event as shown below.
    protected void grid_ItemDataBound(object sender, GridItemEventArgs e)
      if (e.Item is GridDataItem && e.Item.OwnerTableView.Name == "Detailtable1")
                GridDataItem item = (GridDataItem)e.Item;
                Label lbl = (Label)item.FindControl("lblDescription");

Back to Top