Protected Sub RadGridProducts_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGridProducts.ItemCommand |
ViewState("GridItem") = e.Item ' gets the selected row for detail |
LblException.Text = "" |
Select Case e.CommandName |
End Select |
End Sub |
Protected Sub RadGridProducts_DetailTableDataBind(ByVal source As Object, ByVal e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles RadGridProducts.DetailTableDataBind |
Try |
Dim item As GridItem = CType(ViewState("GridItem"), GridItem) |
Dim ProductId As String = RadGridProducts.MasterTableView.DataKeyValues(item.ItemIndex)("Id").ToString() |
Dim DTable As DataTable = DataAccess.Products.GetAllProductPricesById(ProductId) |
RadGridProducts.MasterTableView.DetailTables(0).DataSource = DTable |
RadGridProducts.MasterTableView.DetailTables(0).DataBind() |
Catch ex As Exception |
End Try |
End Sub |
But This Gives an error as follows
Type 'Telerik.Web.UI.GridDataItem' in Assembly 'Telerik.Web.UI, Version=2008.3.1314.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' is not marked as serializable.
Please Help me i dont want to use DataSource Controls as our Project DAL is written in classic way.Thanks