hi,
i am using the telerik rad grid my code is as follows please see the code . i am using the dataset with the relations for hierarchy that code is like this i am using vb.net and telerik q3 version when i click on the edit the row is in edit mode but when i click on the update it did not go to ItemUpdated event why? all of your examples are based on objectect datasource or sql data data source please give at least one example with dataset or data table that is really good for programmers .
i wrote like this
Protected Sub dgproduct_ItemUpdated(ByVal source As Object, ByVal e As Telerik.Web.UI.GridUpdatedEventArgs) Handles dgProduct.ItemUpdated
Dim item As String = getItemName(e.Item.OwnerTableView.Name)
Dim field As String = getFieldName(e.Item.OwnerTableView.Name)
If Not e.Exception Is Nothing Then
e.KeepInEditMode = True
e.ExceptionHandled = True
DisplayMessage(item + " " + e.Item(field).Text + " cannot be updated. Reason: " + e.Exception.Message)
Else
DisplayMessage(item + " " + e.Item(field).Text + " updated")
End If
End Sub
i need solution for this to update the row as early as possible
Thanks & Regards,
M.Koteswara Rao
i am using the telerik rad grid my code is as follows please see the code . i am using the dataset with the relations for hierarchy that code is like this i am using vb.net and telerik q3 version when i click on the edit the row is in edit mode but when i click on the update it did not go to ItemUpdated event why? all of your examples are based on objectect datasource or sql data data source please give at least one example with dataset or data table that is really good for programmers .
i wrote like this
Protected Sub dgproduct_ItemUpdated(ByVal source As Object, ByVal e As Telerik.Web.UI.GridUpdatedEventArgs) Handles dgProduct.ItemUpdated
Dim item As String = getItemName(e.Item.OwnerTableView.Name)
Dim field As String = getFieldName(e.Item.OwnerTableView.Name)
If Not e.Exception Is Nothing Then
e.KeepInEditMode = True
e.ExceptionHandled = True
DisplayMessage(item + " " + e.Item(field).Text + " cannot be updated. Reason: " + e.Exception.Message)
Else
DisplayMessage(item + " " + e.Item(field).Text + " updated")
End If
End Sub
ds = ProductBO.GetProductChainDetailsList(ddlCategory.SelectedValue, "", txtStyle.Text, ddlStyleActive.SelectedValue, CInt(ViewState("cp").ToString), CInt(SystemSettingsBO.GetSettings("PageSize")))
ds.Relations.Add("ProductRelation", ds.Tables(0).Columns("PKProductID"), ds.Tables(1).Columns("FKProductID"))
If Not ds.Tables(2) Is Nothing Then
If ds.Tables(2).Rows.Count > 0 Then
ds.Relations.Add("ProductRelation2", ds.Tables(1).Columns("PKProductID"), ds.Tables(2).Columns("FKProductID"))
End If
End If
'dgProduct.DisplayLayout.AllowUpdateDefault = AllowUpdate.Yes
dgProduct.DataSource = ds
dgProduct.DataBind()
<
telerik:RadGrid
ID
=
"dgProduct"
runat
=
"server"
AutoGenerateColumns
=
"false"
AutoGenerateHierarchy
=
"true"
GroupingEnabled
=
"true"
AllowMultiRowSelection
=
"true"
AllowAutomaticDeletes
=
"True"
AllowAutomaticInserts
=
"True"
AllowAutomaticUpdates
=
"True"
>
<
MasterTableView
EditMode
=
"InPlace"
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn1"
>
<
HeaderStyle
Width
=
"20px"
/>
<
ItemStyle
CssClass
=
"MyImageButton"
/>
</
telerik:GridEditCommandColumn
>
<
telerik:GridBoundColumn
DataField
=
"PKProductID"
HeaderText
=
"PKProductID"
Visible
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"SourceID"
HeaderText
=
"Style #"
/>
<
telerik:GridBoundColumn
DataField
=
"Language1Title"
HeaderText
=
"Title"
/>
<
telerik:GridBoundColumn
DataField
=
"Language1SubTitle"
HeaderText
=
"Sub Title"
/>
<
telerik:GridDropDownColumn
HeaderText
=
"Clearance"
UniqueName
=
"StyleClearance"
DataSourceID
=
"SourceCheck"
ListTextField
=
"Text"
ListValueField
=
"Text"
SortExpression
=
"Text"
DataField
=
"ClearanceItem"
/>
<
telerik:GridDropDownColumn
HeaderText
=
"Active"
UniqueName
=
"StyleActive"
DataSourceID
=
"SourceCheck"
ListTextField
=
"Text"
ListValueField
=
"Text"
SortExpression
=
"Text"
DataField
=
"Active"
/>
<
telerik:GridBoundColumn
DataField
=
"Price"
HeaderText
=
"Price"
/>
<
telerik:GridBoundColumn
DataField
=
"SalePrice"
HeaderText
=
"Sale Price"
/>
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this product?"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"DeleteColumn1"
>
<
HeaderStyle
Width
=
"20px"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
CssClass
=
"MyImageButton"
/>
</
telerik:GridButtonColumn
>
</
Columns
>
<
DetailTables
>
<
telerik:GridTableView
DataMember
=
"Colors"
HierarchyLoadMode
=
"ServerOnDemand"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"FKProductid"
HeaderText
=
"FKProductid"
Visible
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"Language1Title"
HeaderText
=
"Title"
ReadOnly
=
"true"
/>
<
telerik:GridBoundColumn
DataField
=
"PKGroupScaleItemID"
HeaderText
=
"Color Id"
ReadOnly
=
"true"
/>
<
telerik:GridTemplateColumn
UniqueName
=
"TemplateColumn"
>
<
ItemTemplate
>
sfsdadf
</
ItemTemplate
>
<
EditItemTemplate
>
<
asp:DropDownList
DataSourceID
=
"SourceColors"
DataTextField
=
"ScaleLanguage1Name"
DataValueField
=
"ScaleType"
ID
=
"ddlList"
runat
=
"server"
AutoPostBack
=
"true"
selectedValue='<%# Eval("ScaleLanguage1Name") %>'></
asp:DropDownList
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridDropDownColumn
UniqueName
=
"ColorSourceID"
DataSourceID
=
"SourceColors"
HeaderText
=
"Colors"
DataField
=
"SourceID"
SortExpression
=
"ScaleLanguage1Name"
ListTextField
=
"ScaleLanguage1Name"
ListValueField
=
"ScaleType"
/>
<
telerik:GridDropDownColumn
HeaderText
=
"Active"
UniqueName
=
"ColorActive"
DataSourceID
=
"SourceCheck"
ListTextField
=
"Text"
ListValueField
=
"Text"
SortExpression
=
"Text"
DataField
=
"Active"
/>
</
Columns
>
<
DetailTables
>
<
telerik:GridTableView
DataMember
=
"Sizes"
HierarchyLoadMode
=
"ServerOnDemand"
Width
=
"300px"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"FKProductid"
HeaderText
=
"FKProductid"
Visible
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"Language1Title"
HeaderText
=
"Title"
ReadOnly
=
"true"
/>
<
telerik:GridBoundColumn
DataField
=
"SourceID"
HeaderText
=
"Size ID"
ReadOnly
=
"true"
/>
<
telerik:GridDropDownColumn
UniqueName
=
"SizeSourceID"
DataSourceID
=
"SourceSizes"
HeaderText
=
"Sizes"
DataField
=
"SourceID"
SortExpression
=
"ScaleLanguage1Name"
ListTextField
=
"ScaleLanguage1Name"
ListValueField
=
"PKGroupScaleItemID"
/>
<
telerik:GridBoundColumn
DataField
=
"BackOrderDays"
HeaderText
=
"Back Order Days"
/>
<
telerik:GridBoundColumn
DataField
=
"SKU"
HeaderText
=
"SKU"
/>
<
telerik:GridBoundColumn
DataField
=
"QuantityAvailable"
HeaderText
=
"Quantity"
/>
<
telerik:GridDropDownColumn
HeaderText
=
"Active"
UniqueName
=
"SizeActive"
DataSourceID
=
"SourceCheck"
ListTextField
=
"Text"
ListValueField
=
"Text"
SortExpression
=
"Text"
DataField
=
"Active"
/>
</
Columns
>
</
telerik:GridTableView
>
</
DetailTables
>
</
telerik:GridTableView
>
</
DetailTables
>
<
EditFormSettings
>
<
EditColumn
Reorderable
=
"false"
Resizable
=
"false"
/>
</
EditFormSettings
>
</
MasterTableView
>
<
ClientSettings
>
<
ClientEvents
OnRowClick
=
"RowClick"
OnRowDblClick
=
"RowDblClick"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
i need solution for this to update the row as early as possible
Thanks & Regards,
M.Koteswara Rao