How to set the FilterControlWidth as the grid column width.
The below code is not working for me.
protected void approvedGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridFilteringItem)
{
GridFilteringItem filteringItem = e.Item as GridFilteringItem;
TextBox box = filteringItem["mandatory"].Controls[0] as TextBox;
box.Width = approvedGrid.MasterTableView.Columns[2].ItemStyle.Width;
//approvedGrid.MasterTableView.Columns[2].FilterControlWidth = approvedGrid.MasterTableView.Columns[2].HeaderStyle.Width;
}
}
7 Answers, 1 is accepted
You can use the Column's Width property to get its width.
All the best,Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

I have tried with the below line. Its not working. There is no property like width.
box.Width = approvedGrid.MasterTableView.Columns[2].Width;
My requirement is to set the Radfilter text box width dynamically based on the rad grid width.
Could you please provide an example?

If someone from Telerik would be so kind to provide an example or list accepted properties of this attribute, that would be appreciated.
Thank you
Goran
The code in this thread is not related to our WPF RadGridView!
Best wishes,Vlad
the Telerik team

Set FilterControlWidth="100%", not in code behind, and it will work just fine.

But I figured it out on my own.
I would suggest better documentation rather then dismissing valid questions before actually looking into it.
Just a friendly remark. :)
Most probably you've missed to check this article in our documentation. I don't believe that posting questions in wrong forum category can help much.
Regards,Vlad
the Telerik team