hi there,
I have some textboxes (for name, surname etc) and and a radgrid on my web page.(for products for example). all radgrid's rows are in "inplace" edit mode.. When I press to external button, form postbacks. meanwhile All information user entered in ragrid get lost. I think I have to update radgrid first but I don't know how ? because there's no update command column in grid. all rows in edit mode and while postingback I need to update all of them at once. How can achieve this ?
best
I have some textboxes (for name, surname etc) and and a radgrid on my web page.(for products for example). all radgrid's rows are in "inplace" edit mode.. When I press to external button, form postbacks. meanwhile All information user entered in ragrid get lost. I think I have to update radgrid first but I don't know how ? because there's no update command column in grid. all rows in edit mode and while postingback I need to update all of them at once. How can achieve this ?
best
Protected Sub radGridProducts_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs) Handles radGridProducts.NeedDataSource
Dim dt As New DataTable dt = DirectCast(Session("RequestMonetDataTable"), DataTable) radGridProducts.DataSource = dt End Sub Protected Sub radGridProducts_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles radGridProducts.PreRender If Not IsPostBack Then For Each item As GridItem In radGridProducts.MasterTableView.Items If TypeOf item Is GridEditableItem Then Dim editableItem As GridEditableItem = CType(item, GridDataItem) editableItem.Edit = True End If Next radGridProducts.Rebind() End If End Sub Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If IsPostBack = False Then CreateDataSource() end If Protected Sub CreateDataSource() Dim dt As New DataTable Dim dr As DataRow dt.Columns.Add(New Data.DataColumn("ID", GetType(String))) dt.Columns.Add(New Data.DataColumn("product", GetType(String))) dt.Columns.Add(New Data.DataColumn("quantity", GetType(Integer))) dt.Columns.Add(New Data.DataColumn("price", GetType(Decimal))) dr = dt.NewRow dr("ID") = 1 dr("product") = "aaa" dr("quantity") = 0 dr("price") = 0 dt.Rows.Add(dr) ' here I add some more rows..... Session("RequestMonetDataTable") = dt End Sub