I just downloaded the trial version of the Telerik Controls and am trying to convert an existing gridview to a Rad Gridview. In my old grid I had a button in one of the columns that when clicked it would open a modal popup window.
Here is the code I used for the onclick event of the button in my original grid, but it doesn't work for the rad grid. I get the error message
Unable to cast object of type 'Telerik.Web.UI.GridDataItem' to type 'System.Web.UI.WebControls.GridViewRow'.
Public Sub ibtShowWarnings_OnClick(ByVal sender As Object, ByVal e As EventArgs)
Dim ibtWarnings As ImageButton = DirectCast(sender, ImageButton)
Dim SelectedRow As GridViewRow = DirectCast(ibtWarnings.NamingContainer, GridViewRow)
Dim hdfMessage As HiddenField = DirectCast(SelectedRow.FindControl("hdfWarningMessage"), HiddenField)
Dim lblSource As Label = DirectCast(SelectedRow.FindControl("lblSourceName"), Label)
Dim aryMessages As New ArrayList
Me.lblMessageHeading.Text = "Warnings For Source " & lblSource.Text
Me.bltMessages.DataSource = aryMessages
Me.pnlPage.BackImageUrl = "~/App_Themes/Images/Gradient Fills/Blue/Gradient Med Blue Beige 1000 x 400.png"
I understand that it doesn't consider a gridview row as a rad grid row, but how do you declare a rad grid row?
I found one demo in the samples that does something similar but it used java script.
Is there a way to get the row of the button that was clicked in the code behind using vb or c?
Thanks for you help.