In my application, I have a RadGrid with similar functionality as:
http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx#qsf-demo-source
However, I am using ObjectDataSources and referencing a SelectMethod instead of a query to get data. Example:
My problem is that the GetDetails method takes an ObjectId (as a string) to retrieve data for that row item. Is it possible to fire an event on the expansion of a node (in the grid) so that I can grab it's ObjectId field (column in the grid) and pass it to the method?
Using the OnSelecting parameter, I am able to specify a static string ObjectId:
However, I need this to be more dynamic and somehow (either through a hidden field, lookup of some kind, etc), find which row's node was expanded, and use that ObjectId, instead of the current static string.
http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx#qsf-demo-source
However, I am using ObjectDataSources and referencing a SelectMethod instead of a query to get data. Example:
<
asp:ObjectDataSource
SelectMethod
=
"GetDetails"
TypeName
=
"Details"
ID
=
"DataSource2"
runat
=
"server"
OnSelecting
=
"DataSource2_Selecting"
>
My problem is that the GetDetails method takes an ObjectId (as a string) to retrieve data for that row item. Is it possible to fire an event on the expansion of a node (in the grid) so that I can grab it's ObjectId field (column in the grid) and pass it to the method?
Using the OnSelecting parameter, I am able to specify a static string ObjectId:
protected
void
DataSource2_Selecting (
object
sender, ObjectDataSourceSelectingEventArgs e)
{
e.InputParameters[
"ObjectId"
] =
"00000000-0000-0000-0000-00000000"
;
}
However, I need this to be more dynamic and somehow (either through a hidden field, lookup of some kind, etc), find which row's node was expanded, and use that ObjectId, instead of the current static string.