Hi guys,
I have a problem in displaying the data from an sql table in an hierarchic way, as you can see in the screenshot (http://agileprecis.com/db-diagram.jpg), the table tasks will contain endless sub tasks for each task and it's using the referewnce ParentTaskID.
The problem in the grid display is it is displaying the subTasks as a normal row, wil it shouldn't appear unless i expand the specific node.
below is the code i'm using:
Thanks for your support
I have a problem in displaying the data from an sql table in an hierarchic way, as you can see in the screenshot (http://agileprecis.com/db-diagram.jpg), the table tasks will contain endless sub tasks for each task and it's using the referewnce ParentTaskID.
The problem in the grid display is it is displaying the subTasks as a normal row, wil it shouldn't appear unless i expand the specific node.
below is the code i'm using:
<
telerik:RadGrid
ID
=
"DataGrid"
runat
=
"server"
ShowStatusBar
=
"True"
AllowFilteringByColumn
=
"True"
AllowAutomaticUpdates
=
"false"
Width
=
"100%"
AllowAutomaticInserts
=
"false"
AllowAutomaticDeletes
=
"false"
AllowPaging
=
"True"
PageSize
=
"7"
ShowGroupPanel
=
"True"
>
<
MasterTableView
AutoGenerateColumns
=
"False"
AllowSorting
=
"true"
CommandItemDisplay
=
"Top"
AllowAutomaticUpdates
=
"false"
AllowAutomaticInserts
=
"false"
AllowAutomaticDeletes
=
"false"
HierarchyDefaultExpanded
=
"false"
HierarchyLoadMode
=
"Client"
DataKeyNames
=
"TaskID, ParentTaskID"
Width
=
"100%"
>
<
SelfHierarchySettings
ParentKeyName
=
"ParentTaskID"
KeyName
=
"TaskID"
/>
<
HeaderStyle
HorizontalAlign
=
"Center"
/><
FilterItemStyle
HorizontalAlign
=
"Center"
/>
<
NoRecordsTemplate
>No Records Found.</
NoRecordsTemplate
>
<
Columns
>
<
telerik:GridButtonColumn
UniqueName
=
"Edit"
CommandName
=
"Edit"
ButtonType
=
"ImageButton"
ImageUrl
=
"~/Styles/images/icon_edit.gif"
Text
=
"Edit"
HeaderText
=
"Edit"
>
<
HeaderStyle
Width
=
"35px"
HorizontalAlign
=
"center"
/>
</
telerik:GridButtonColumn
>
<
telerik:GridBoundColumn
DataField
=
"TaskID"
Visible
=
"True"
HeaderText
=
"TaskID"
ReadOnly
=
"True"
SortExpression
=
"TaskID"
UniqueName
=
"TaskID"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"TaskTitle"
HeaderText
=
"TaskTitle"
SortExpression
=
"TaskTitle"
UniqueName
=
"TaskTitle"
> </
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"ParentTaskID"
HeaderText
=
"ParentTaskID"
SortExpression
=
"ParentTaskID"
Visible
=
"True"
UniqueName
=
"ParentTaskID"
> </
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
Thanks for your support