Can i make a filtering option avaliable if i`v made the header invisible?
I am filterin my grid just from one column....but when i makes my headers visible = "false", filtering option also vanishes away.
And how can i disable the filter context menu?
I am filterin my grid just from one column....but when i makes my headers visible = "false", filtering option also vanishes away.
And how can i disable the filter context menu?
5 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 10 Dec 2008, 12:00 PM
Hello Saadi,
You can hide the header using the code below :
cs:
And for the second part of your question, i suppose you want to disable items in the filter menu. If that is the case refer to the code below:
cs:
Thanks
Princy.
You can hide the header using the code below :
cs:
protected void RadGrid1_PreRender(object sender, EventArgs e) |
{ |
foreach (GridHeaderItem header in RadGrid1.MasterTableView.GetItems(GridItemType.Header)) |
{ |
header.Display = false; |
} |
} |
And for the second part of your question, i suppose you want to disable items in the filter menu. If that is the case refer to the code below:
cs:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) |
{ |
GridFilterMenu menu = RadGrid1.FilterMenu; |
foreach (RadMenuItem item in menu.Items) |
{ |
if (item.Text == "StartsWith") |
{ |
item.Enabled=false; |
} |
} |
} |
Thanks
Princy.
0

Saad
Top achievements
Rank 1
answered on 10 Dec 2008, 03:09 PM
It worked thank you man....
And if i want that filtering textbox to be on extream right of the grid with a button named search, then what should be done for it?
And if i want that filtering textbox to be on extream right of the grid with a button named search, then what should be done for it?
0

Saad
Top achievements
Rank 1
answered on 10 Dec 2008, 03:11 PM
It worked thank you man....
And if i want that filtering textbox to be on extream right of the grid with a button named search, then what should be done for it?
And if i want that filtering textbox to be on extream right of the grid with a button named search, then what should be done for it?
0

Shinu
Top achievements
Rank 2
answered on 11 Dec 2008, 04:23 AM
Hi Saadi,
You align the FilteringItem on the extreme right by setting the HorizontalAlign property as shown below.
ASPX:
Here is a help article which explains how to change the default filter image.
Setting filter textbox dimensions/changing default filter image
Shinu.
You align the FilteringItem on the extreme right by setting the HorizontalAlign property as shown below.
ASPX:
<FilterItemStyle HorizontalAlign="Right" /> |
Here is a help article which explains how to change the default filter image.
Setting filter textbox dimensions/changing default filter image
Shinu.
0

Saad
Top achievements
Rank 1
answered on 11 Dec 2008, 05:20 PM
This isnt working....the filtering textBox is still at same place where it was. What to do?
I want this textBox at extreme right regardless of which filtering column it belongs to.
I want this textBox at extreme right regardless of which filtering column it belongs to.