how i can convert GridViewInfo.GridViewElement in Q2 2012

2 posts, 0 answers
  1. ms
    ms avatar
    8 posts
    Member since:
    Oct 2012

    Posted 19 Oct 2012 Link to this post

    how i can convert viewInfo.GridViewElement in Q2 2012


    GridViewInfo viewInfo;
    if ((viewInfo.GridViewElement != null))
     {
          if (viewInfo.GridViewElement.HScrollBar.Visibility == Telerik.WinControls.ElementVisibility.Visible)
                height += 20;
    }
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 19 Oct 2012 Link to this post

    Hi,

    RadGridViewElement instance is accessible by using the GridViewElement property of RadGridView control:
    RadGridViewElement gridElement = radGridView1.GridViewElement;

    However, if you need the GridTableElement, you can find it by using the GetRowView method:
    GridTableElement tableElement = (GridTableElement)radGridView1.GridViewElement.GetRowView(viewInfo);
    RadGridViewElement gridElement = tableElement.GridViewElement;

    In this case your code should look like this:
    GridTableElement tableElement = (GridTableElement)radGridView1.GridViewElement.GetRowView(viewInfo);
    if (tableElement != null)
    {
        if (tableElement.HScrollBar.Visibility == Telerik.WinControls.ElementVisibility.Visible)
            height += 20;
    }

    If you have further questions, do not hesitate to ask.
     
    Greetings,
    Jack
    the Telerik team
    You’ve been asking for it and now it’s time for us to deliver. RadControls for WinForms Q3 2012 release is just around the corner. Sign up for a free webinar to see first all the latest enhancements.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top