This is a migrated thread and some comments may be shown as answers.

how i can convert GridViewInfo.GridViewElement in Q2 2012

1 Answer 30 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ms
Top achievements
Rank 1
ms asked on 19 Oct 2012, 07:31 AM
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;
}

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 19 Oct 2012, 03:40 PM
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.
Tags
General Discussions
Asked by
ms
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or