I am using the windows gridview control.Actualy i want to take a textbox events from gridview textbox column.I was used one example from telerik help like below for combobox.
Dim colName As String = radGvItemDetail.MasterGridViewTemplate.CurrentColumn.UniqueName
If colName = "ItemName" Then
Dim ComboEditor As New RadComboBoxEditor()
Dim ddlItemName As RadComboBox = TryCast(ComboEditor.HostedControl, RadComboBox)
ddlItemName.BindingContext = radGvItemDetail.BindingContext
Dim cell As GridComboBoxCellElement = TryCast(radGvItemDetail.CurrentCell, GridComboBoxCellElement)
ItemDs = DDLPopulate("SELECT ItemIntCode,ItemName FROM TB_Item_Master ORDER BY ItemName", "ItemName")
ddlItemName.DisplayMember = "ItemName"
ddlItemName.ValueMember = "ItemName"
ddlItemName.MaxDropDownItems = 8
' Use the RadComboBox data vitualization
ddlItemName.IntegralHeight = True
ddlItemName.BeginUpdate()
Dim comboitem As New RadComboBoxItem()
comboitem.Value = 0
comboitem.Text = ""
ddlItemName.Items.Add(comboitem)
ddlItemName.DataSource = ItemDs.Tables(0).DefaultView
ddlItemName.EndUpdate()
e.Editor = ComboEditor
If ddlItemName IsNot Nothing Then
AddHandler DirectCast(ComboEditor.HostedControl, RadComboBox).SelectedValueChanged, AddressOf ItemNameComboChange
End If
End If
By same like that what is the equalant code for gridviewtexbox column.
I was used below method but its not working.
Dim TextEditor1 As New RadTextBoxEditor
Dim txtItemName1 As RadTextBox = TryCast(TextEditor1.HostedControl, RadTextBox)
Regards,
Sakthi