Hi,
I am Srinivas,
In my project i have a RadGrid for Displaying Data from Backend Table. Here i am using GroupBy property for My RadGrid. Here i want to Place a Button in RadGrid Header Row along with GroupBy Text.
Here i was Displaying a GroupBy Text successfully. It shown in 1.Jpg Attached file. But along with text i want to Show the Button in RadGroupHeader Row. Like Shown in Attachment 2 (Example Only).
Here The following code for Group Header Text
If TypeOf e.Item Is GridGroupHeaderItem Then
Dim item As GridGroupHeaderItem = DirectCast(e.Item, GridGroupHeaderItem)
Dim groupDataRow As DataRowView = DirectCast(e.Item.DataItem, DataRowView)
'Dim nodeCollection As IList(Of RadTreeNode)
item.DataCell.Text = ""
For Each column As DataColumn In groupDataRow.DataView.Table.Columns
If column.ColumnName = "lot_id" And n >= 1 Then
item.DataCell.Text = RadTreeView1.CheckedNodes(item.GroupIndex).FullPath + "<br/>"
<Button Adding>
Dim hyplnk As New Button()
hyplnk.Text = "Redirect"
item.DataCell.Controls.Add(hyplnk)</button>
Else
item.DataCell.Text = RadTreeView1.CheckedNodes(item.GroupIndex).FullPath
End If
Next
End If
But it is not working fine..
Please Help me.
Thanks
D.Srinivas
I am Srinivas,
In my project i have a RadGrid for Displaying Data from Backend Table. Here i am using GroupBy property for My RadGrid. Here i want to Place a Button in RadGrid Header Row along with GroupBy Text.
Here i was Displaying a GroupBy Text successfully. It shown in 1.Jpg Attached file. But along with text i want to Show the Button in RadGroupHeader Row. Like Shown in Attachment 2 (Example Only).
Here The following code for Group Header Text
If TypeOf e.Item Is GridGroupHeaderItem Then
Dim item As GridGroupHeaderItem = DirectCast(e.Item, GridGroupHeaderItem)
Dim groupDataRow As DataRowView = DirectCast(e.Item.DataItem, DataRowView)
'Dim nodeCollection As IList(Of RadTreeNode)
item.DataCell.Text = ""
For Each column As DataColumn In groupDataRow.DataView.Table.Columns
If column.ColumnName = "lot_id" And n >= 1 Then
item.DataCell.Text = RadTreeView1.CheckedNodes(item.GroupIndex).FullPath + "<br/>"
<Button Adding>
Dim hyplnk As New Button()
hyplnk.Text = "Redirect"
item.DataCell.Controls.Add(hyplnk)</button>
Else
item.DataCell.Text = RadTreeView1.CheckedNodes(item.GroupIndex).FullPath
End If
Next
End If
But it is not working fine..
Please Help me.
Thanks
D.Srinivas