Hello Sir,
I am facing one problem regarding finding control value from MasteTtableVieweditForm. We follow your c# code sample from -'ManualInsertUpdateUsingFormTemplate ' project. There we find the following code which is perfectly running.
-------------------------------- c# code
//Get the GridEditableItem of the RadGrid
GridEditableItem editedItem = e.Item as GridEditableItem;
//Get the primary key value using the DataKeyValue.
string CustomerID = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["CustomerID"].ToString();
//Access the textbox from the edit form template and store the values in string variables.
string CompanyName= (editedItem.FindControl("txtCompanyName") as TextBox).Text;
--------------------------------
But in our project we are useing the following code -
---------------------------- vb.net code
'Get the GridEditFormInsertItem of the RadGrid
Dim insertedItem As GridEditFormInsertItem = DirectCast(e.Item, GridEditFormInsertItem)
'Access the textbox from the insert form template and store the values in string variables.
Dim CustomerID As String = TryCast(insertedItem.FindControl("txtCustomerID"), TextBox).Text
Dim CompanyName As String = TryCast(insertedItem.FindControl("txtCompanyName"), TextBox).Text
But in this case the code is not working. It actually did not find the control by --- insertedItem.FindControl("txtCustomerID"), TextBox
method. What ever we observed that the - in c# -- GridCommandEventArgs e is different from e of GridCommandEventArgs in vb.net.
Please reply.