This is a migrated thread and some comments may be shown as answers.

RadGridView Add Button and Get Value from another cell On Click

1 Answer 79 Views
This is a migrated thread and some comments may be shown as answers.
Simon Brassington
Top achievements
Rank 1
Simon Brassington asked on 20 Feb 2017, 05:58 PM



I've added a button to my RadGridView via the below:


Dim col As New MyDeleteButtonColumn()

Public Class MyDeleteButtonColumn
Inherits Telerik.Windows.Controls.GridViewColumn
Public Overrides Function CreateCellElement(cell As GridViewCell, dataItem As Object) As FrameworkElement
Dim btn As New RadButton()
btn.Content = "MD"
btn.[AddHandler](Button.ClickEvent, New RoutedEventHandler(AddressOf btn_Click))
Return btn
End Function
Private Sub btn_Click(sender As Object, e As RoutedEventArgs)
     Dim win2 As New form2("gvcell0value:)")
End Sub


Within the but_Click I need to get the value of from cell 0 to pass throught to a new form opening

How could I achive this?

Many thanks

1 Answer, 1 is accepted

Sort by
Stefan Nenchev
Telerik team
answered on 23 Feb 2017, 02:37 PM
Hi Simon,

You need to extract the content of the cell through the underlying item. Please check the attached sample that shows a possible approach. 

Stefan Nenchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Simon Brassington
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Share this question