Hi.
I want to fill a form with data from a GridView on my main form, this form is brought up when i click on an item in a context menu. Using the standard data grid view in supplied by MS in Visual Studio 2010 my code looks something like this.
Now this works fine with the standard DataGridView but the Telerik GridView says that 'RowIndex' is not a member of 'Telerik.WinControls.UI.GridViewCellInfo'.
My Question is: How can I get the same effect using the Telerik GridView and what is the Correct syntax for this then.
Also please bear in mind that I am new to the programming game and I am learning as I go along any and all help would be much appreciated.
I want to fill a form with data from a GridView on my main form, this form is brought up when i click on an item in a context menu. Using the standard data grid view in supplied by MS in Visual Studio 2010 my code looks something like this.
Private
Sub
EditToolStripMenuItem_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
EditToolStripMenuItem.Click
Dim
frm
As
New
frmAddEdit
frm.GUID_User =
Me
.dgvUsers.Item(0,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString()
frm.GUID_Group =
Me
.dgvUsers.Item(1,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString()
frm.txtADName.Text =
Me
.dgvUsers.Item(2,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString()
frm.txtUserName.Text =
Me
.dgvUsers.Item(3,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString()
frm.txtEmail.Text =
Me
.dgvUsers.Item(4,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString()
frm.txtLogin.Text =
Me
.dgvUsers.Item(5,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString()
frm.txtPassword.Text =
Me
.dgvUsers.Item(6,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString()
frm.txtTelNo.Text =
Me
.dgvUsers.Item(7,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString()
frm.txtFax.Text =
Me
.dgvUsers.Item(8,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString()
frm.cbActive.Checked = IIf(
Me
.dgvUsers.Item(9,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString() =
"True"
,
True
,
False
)
frm.GUID_Company =
Me
.dgvUsers.Item(10,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString()
frm.cbLead.Checked = IIf(
Me
.dgvUsers.Item(11,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString() =
"True"
,
True
,
False
)
frm.cbSplit.Checked = IIf(
Me
.dgvUsers.Item(12,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString() =
"True"
,
True
,
False
)
frm.cbTelesales.Checked = IIf(
Me
.dgvUsers.Item(13,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString() =
"True"
,
True
,
False
)
frm.cboOffice.SelectedValue =
Me
.dgvUsers.Item(14,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString()
frm.txtAddress.Text =
Me
.dgvUsers.Item(15,
Me
.dgvUsers.SelectedCells(0).RowIndex).Value.ToString()
frm.Text =
"Edit User"
frm.ShowDialog()
End
Sub
Now this works fine with the standard DataGridView but the Telerik GridView says that 'RowIndex' is not a member of 'Telerik.WinControls.UI.GridViewCellInfo'.
My Question is: How can I get the same effect using the Telerik GridView and what is the Correct syntax for this then.
Also please bear in mind that I am new to the programming game and I am learning as I go along any and all help would be much appreciated.