on Feb 25, 2009
I am trying to set up the grid default filter, but i cannot. Your example is wrong.
I am binding the grid using the NeedDataSource in the same way as you are writing in Advanced Data-binding (using NeedDataSourceEvent).
I can read:
If you are binding the grid using the NeedDataSource event, you can set the initial filter in the NeedDataSource event handler and omit the call to the Rebind method. The code for setting the filter must still be placed inside an if statement that checks that Page.IsPostBack is False.
No, It cannot be done.
Grid has no columns at this time. RadGrid1.MasterTableView.GetColumnSafe("") always returns null. (although datasource has already be assigned).
I also don't need to call RadGrid1.MasterTableView.FilterExpression = "SQL expression" because my data has been already filtered. I am using SQL SERVER power to do that and I think that everybody must prefer server technology for this type of task.
So I must use PreRender event, but:
I must call this.RadGrid1.Rebind(); If I don't, the filter function is preselected, but filter value TextBox is empty !!!!
What does Rebind do really? MY grid has thousands of rows. Is it really needed to call rebind because of one value needs to be inserted in a TextBox? The filter function is preselected, so why TextBox is empty?
Thank you very much.