I am in the process of changing from a GridView to a RadGrid and have been experiencing a few issues.
I am attempting to pull an "Active" token from my RadGrid that displays a lot of product information. I do not have the "Active" token being displayed to the user though. It is not set to a hidden value either. The token gets pulled when the user presses the Delete button inside a GridTemplateColumn on my RadGrid.
Before with the GridView, I could use System.Web.UI.DataBinder.Eval(e.Row.DataItem, "Active") and it would return whether or not the Active token was a 1 or a 0.
I currently have the following in VB.NET:
Before this worked like a charm, but I am having trouble. I have noticed that the System.Web.UI.DataBinder(e.Item.DataItem, "MSDSID") never returns anything. And in turn, it cannot find an instance of "Active" being used then.
I am attempting to pull an "Active" token from my RadGrid that displays a lot of product information. I do not have the "Active" token being displayed to the user though. It is not set to a hidden value either. The token gets pulled when the user presses the Delete button inside a GridTemplateColumn on my RadGrid.
Before with the GridView, I could use System.Web.UI.DataBinder.Eval(e.Row.DataItem, "Active") and it would return whether or not the Active token was a 1 or a 0.
I currently have the following in VB.NET:
Protected Sub rgvMyGrid_RowCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgvMyGrid.ItemCommand If (e.CommandName = "DeleteMSDS") Then Dim myDelete As WinampButton = CType(e.Item.FindControl("btnDelete"), WinampButton) myDelete.CommandName = "DeleteMSDS" myDelete.CommandArgument = System.Web.UI.DataBinder.Eval(e.Item.DataItem, "MSDSID") If System.Web.UI.DataBinder.Eval(e.item.DataItem, "Active") myDelete.Attributes.Add("onClick", "javascript:return confirm('Are you sure you want to permanently delete this SDS / MSDS?');") End If End IfBefore this worked like a charm, but I am having trouble. I have noticed that the System.Web.UI.DataBinder(e.Item.DataItem, "MSDSID") never returns anything. And in turn, it cannot find an instance of "Active" being used then.