Hi,
i am Srinivas,
Here in my Project i have a RadGrid View and RadTree view to display data from Backend Table. Here i have a problem to display the Header Item for RadGrid. In RadTree View when i checked the RadTree Node Then automatically RadGrid View to Display the Data from Backend. Here i was used the filter concept in RadGrid.
the following is the code for filter concept..
b0.Text = "lot_id [Lot ID] Group By lot_id"
Dim expression1 As GridGroupByExpression = GridGroupByExpression.Parse(b0.Text)
CustomizeExpression(expression1)
Me.RadGrid1.MasterTableView.GroupByExpressions.Add(expression1)
Private Sub CustomizeExpression(ByVal expression As GridGroupByExpression)
Dim existing As GridGroupByField = expression.SelectFields.FindByName("lot_id")
If existing Is Nothing Then
Else
'field is present then set a format string
existing.FormatString = "{0:C}"
End If
End Sub
the above code working fine as per my output in 1st attachment (1.JPG) .
and next
Following code i used in Rad Grid Item Data Bound for Header Item display:
'Group(heading)
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" Then
nodeCollection = RadTreeView1.CheckedNodes
For Each node As RadTreeNode In nodeCollection
header.Text = ""
header.Text += node.FullPath + "<br/>"
item.DataCell.Text = header.Text
Next
End If
Next
End If
But, when i checked the second check box in tree node along with first node, here Backend data displaying fine but coming for RadHeaderItem for 001-Lot1 the header item is displaying like "AF-Angel Falls/P1-Phase1/002-Lot2"
Instead of this in my output should be with "AF-Angel Falls/P1-Phase1/001-Lot1"
Description for second attachment(2.JPG):
Lot1 and Lot 2 data displaying fine as per second attachment,
but the above first Header Item Displaying "AF-Angel Falls/P1-Phase1/002-Lot2" for Lot 1 details. it should be as bellow
"AF-Angel Falls/P1-Phase1/001-Lot1" for Lot 1 details.
Please Help Me..
Thanks
D.Srinivas
i am Srinivas,
Here in my Project i have a RadGrid View and RadTree view to display data from Backend Table. Here i have a problem to display the Header Item for RadGrid. In RadTree View when i checked the RadTree Node Then automatically RadGrid View to Display the Data from Backend. Here i was used the filter concept in RadGrid.
the following is the code for filter concept..
b0.Text = "lot_id [Lot ID] Group By lot_id"
Dim expression1 As GridGroupByExpression = GridGroupByExpression.Parse(b0.Text)
CustomizeExpression(expression1)
Me.RadGrid1.MasterTableView.GroupByExpressions.Add(expression1)
Private Sub CustomizeExpression(ByVal expression As GridGroupByExpression)
Dim existing As GridGroupByField = expression.SelectFields.FindByName("lot_id")
If existing Is Nothing Then
Else
'field is present then set a format string
existing.FormatString = "{0:C}"
End If
End Sub
the above code working fine as per my output in 1st attachment (1.JPG) .
and next
Following code i used in Rad Grid Item Data Bound for Header Item display:
'Group(heading)
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" Then
nodeCollection = RadTreeView1.CheckedNodes
For Each node As RadTreeNode In nodeCollection
header.Text = ""
header.Text += node.FullPath + "<br/>"
item.DataCell.Text = header.Text
Next
End If
Next
End If
But, when i checked the second check box in tree node along with first node, here Backend data displaying fine but coming for RadHeaderItem for 001-Lot1 the header item is displaying like "AF-Angel Falls/P1-Phase1/002-Lot2"
Instead of this in my output should be with "AF-Angel Falls/P1-Phase1/001-Lot1"
Description for second attachment(2.JPG):
Lot1 and Lot 2 data displaying fine as per second attachment,
but the above first Header Item Displaying "AF-Angel Falls/P1-Phase1/002-Lot2" for Lot 1 details. it should be as bellow
"AF-Angel Falls/P1-Phase1/001-Lot1" for Lot 1 details.
Please Help Me..
Thanks
D.Srinivas