Hi,
I have a requirement to build a RadGrid entirely programmatically that is capable of:
a) Filtering
b) Showing a detail table
In order to get filtering working I can't use simple databinding with a dataset so I've chosen to use an ObjectDataSource . The problem is that I can't seem to set the "SelectParameters" for the ObjectDataSource that populates the detail table (you seem to only be able to do this declaratively).
If anyone can help me I'd appreciate it.
Thanks,
Nick
I have a requirement to build a RadGrid entirely programmatically that is capable of:
a) Filtering
b) Showing a detail table
In order to get filtering working I can't use simple databinding with a dataset so I've chosen to use an ObjectDataSource . The problem is that I can't seem to set the "SelectParameters" for the ObjectDataSource that populates the detail table (you seem to only be able to do this declaratively).
////Create ObjectDataSource for Detail table
myDataTable2 =
new
DataTableWrapper(sourceDataTable2);
t = myDataTable.GetType();
objDataSource =
new
ObjectDataSource();
objDataSource.ID =
"myDataSource2"
;
objDataSource.TypeName = t.AssemblyQualifiedName;
objDataSource.SelectMethod =
"GetDetailTable"
;
//objDataSource.SelectParameters <-- need to set this somehow but it is readonly!!!!
objDataSource.ObjectCreating +=
new
ObjectDataSourceObjectEventHandler(objDataSource2_ObjectCreating);
this
.Controls.Add(objDataSource);
If anyone can help me I'd appreciate it.
Thanks,
Nick