I've seen example.
But I can't realize binding hierarchy.
I've one table ID, ParentID (see attached image)
There is my grid.
My object data source
Each time when "GetSubCategoriesByParentCategoryId" is called ID = 0.
What am i doing wrong?
But I can't realize binding hierarchy.
I've one table ID, ParentID (see attached image)
There is my grid.
<
MasterTableView
DataSourceID
=
"dsMain"
DataKeyNames
=
"ID, ParentID"
AllowSorting
=
"True"
HierarchyLoadMode
=
"ServerBind"
GroupLoadMode
=
"Server"
>
<
DetailTables
>
<
telerik:GridTableView
DataSourceID
=
"dsSub"
DataKeyNames
=
"ID, ParentID"
Width
=
"100%"
AutoGenerateColumns
=
"True"
>
<
ParentTableRelation
>
<
telerik:GridRelationFields
DetailKeyField
=
"ID"
MasterKeyField
=
"ID"
>
</
telerik:GridRelationFields
>
</
ParentTableRelation
>
</
telerik:GridTableView
>
</
DetailTables
>
My object data source
<
asp:ObjectDataSource
id
=
"dsMain"
runat
=
"server"
selectmethod
=
"GetRootCategories"
deletemethod
=
"DeleteCategory"
typename
=
"Ascent.Catalog.Model.DataModel.Categories"
>
<
deleteparameters
>
<
asp:Parameter
Name
=
"ID"
Type
=
"Int32"
/>
</
deleteparameters
>
</
asp:ObjectDataSource
>
<
asp:ObjectDataSource
id
=
"dsSub"
runat
=
"server"
selectmethod
=
"GetSubCategoriesByParentCategoryId"
deletemethod
=
"DeleteCategory"
typename
=
"Ascent.Catalog.Model.DataModel.Categories"
>
<
deleteparameters
>
<
asp:Parameter
Name
=
"ID"
Type
=
"Int32"
/>
</
deleteparameters
>
<
SelectParameters
>
<
asp:SessionParameter
Name
=
"pID"
SessionField
=
"ID"
Type
=
"Int32"
></
asp:SessionParameter
>
</
SelectParameters
>
</
asp:ObjectDataSource
>
Each time when "GetSubCategoriesByParentCategoryId" is called ID = 0.
What am i doing wrong?