Hi,
Binding RADGrid to list object in general case scenario works good. But I have a situation where I am using the RADGrid for showing hierachical data and I am using self referencing telerik RADgrid grid. For the first level my parentFileID property has null value. so I want to filter my records for masterTableView with FileParentId.
The below code gives error when I bind the grid to a list object.
Binding RADGrid to list object in general case scenario works good. But I have a situation where I am using the RADGrid for showing hierachical data and I am using self referencing telerik RADgrid grid. For the first level my parentFileID property has null value. so I want to filter my records for masterTableView with FileParentId.
The below code gives error when I bind the grid to a list object.
if
(Assembly.GetAssembly(typeof(ScriptManager)).FullName.IndexOf("3.5") != -1)
{
grdsearchresult.MasterTableView.FilterExpression =
@"it[""FileParentID""] = Convert.DBNull";
}
else
{
grdsearchresult.MasterTableView.FilterExpression =
"FileParentID IS NULL";
}
For Eg:
List
<SearchResult> listSearchResults=new List<SearchResult>();
grdsearchresult.DataSource = listSearchResults;
grdsearchresult.DataBind();
Here my datasource is List Type Object.The grid shows all records if I dont filter it.
So While binding the master records I get error index is not defined.?
Can't I bind the RADGrid with list object and provide filter to it.
Please reply.
Thanks,
Yuvika
