I have a set of Radcomboboxes, RadInputs, etc. outside of my Radgrid. For layout purposes they could not be placed inside the CommandItemTemplate.
I want the user to be able to update the DB with values in these external controls (price, category, etc.), for all currently selected rows in the Radgrid.
I have wired the following event to the Update button in the CommandItemtemplate, but it just seems to postback the grid without any update actually happening:
I am a little bit confused about whether the Griditems need to be in Editmode, but the point is I basically want the Griditems to -appear- readonly, because all the data update input is done in the external group of controls.
Thanks
I want the user to be able to update the DB with values in these external controls (price, category, etc.), for all currently selected rows in the Radgrid.
I have wired the following event to the Update button in the CommandItemtemplate, but it just seems to postback the grid without any update actually happening:
Protected Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) |
IF RadGrid1.SelectedItems.Count > 0 THEN |
For Each SelectedItem As GridEditableItem In RadGrid1.SelectedItems |
Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem) |
Dim formItem As GridEditFormItem = CType(e.Item,GridEditFormItem) |
Dim parentItem As GridDataItem = CType(formItem.ParentItem,GridDataItem) |
Dim strProductID As String = parentItem("ProductID").Text |
Dim strCategoryID As String = RadComboBoxBatchDescribeCat.SelectedValue |
Dim Price As String = RadComboBoxBatchDescribePrice.SelectedValue |
SqlHelper.ExecuteNonQuery(_connectionString, "Batch_Apply", strProductID,strCategoryID,Price) |
Next |
ELSE |
End if RadGrid1.Rebind() |
End Sub |
I am a little bit confused about whether the Griditems need to be in Editmode, but the point is I basically want the Griditems to -appear- readonly, because all the data update input is done in the external group of controls.
Thanks