iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Ok, no need for the example, calling WebGrid1.ClientAction.Refresh() solved the problem.
Thank you very much!
It is the .Data.ID() method rsSchedule.Data.ID()
But it might be easier for me to understand if we start from your example.
Is your DoInsert method called from the Webgrid AddRow event? If so, after the method is called, what do you do with the returned OrderID parameter? How is it assigned to the webgrid?
In fact it is a 3rd party object that does the database commands.
Here is the VB.NET code:
Private Sub WebGrid1_AddRow(ByVal sender As Object, ByVal e As ISNet.WebUI.WebGrid.RowEventArgs) Handles WebGrid1.AddRow Dim cells As New ISNet.WebUI.WebGrid.WebGridCellCollection cells = e.Row.Cells If cells.Item(0).Text <> "" Then UpdateSchedule(cells) End If End Sub
Private Sub UpdateSchedule(ByVal cells As ISNet.WebUI.WebGrid.WebGridCellCollection) Dim rsSchedule As TxAppFramework.Core.Metabase = New TxAppFramework.Core.Metabase(1000000110, TxSession) rsSchedule.Data.Open() rsSchedule.Data.AddNew() rsSchedule.Data.Value("SERVICEMEMORANDUM_ID") = Context.Request("RecordID") rsSchedule.Data.Value("TIME") = cells.Item(0).Text rsSchedule.Data.Value("V_PAP_CAR_TYPE_ID") = cells.Item(1).Value rsSchedule.Data.Value("ADDRESS") = UCase(cells.Item(2).Text) rsSchedule.Data.Value("DRIVER") = UCase(cells.Item(3).Text) rsSchedule.Data.Value("V_PAP_SCHED_TYPE_ID") = cells.Item(4).Value rsSchedule.Data.Value("NO_CARS") = cells.Item(5).Text rsSchedule.Data.Value("NOTES") = cells.Item(6).Text) rsSchedule.Data.Update() 'This is where the ID is read and set in the Grid cell cells.Item(8).Value = CStr(rsSchedule.Data.ID()) cells.Item(8).Text = CStr(rsSchedule.Data.ID()) rsSchedule.Data.Close() rsSchedule = Nothing End Sub
So the new identity is returned by the "rsSchedule" object,
and is set as the value and text of the cell corresponding to the column that has the key field (index #8). Is there somewhere else it should be set?
Hi, thank you for the reply.
But no, it is there:
<iswebgrid:WebGrid ID="WebGrid1" runat="server" DataMember="PAP_CAR_SCHEDULE" Width="776px" RenderingMode="HTML5" UseDefaultStyle="True"> <RootTable DataKeyField="CAR_SCHEDULE_ID" CaptionImage="order-details.gif" TableHeaderVis ible="True" Caption="Car Schedule" DataMember="PAP_CAR_SCHEDULE">
... </RootTable> ... </iswebgrid:WebGrid>
What I forgot to mention is that if I reload the page, the added row is there and can be edited just fine without giving errors. It happens only with rows that have just been added.
Finally got it working. When hitting "Copy SmartWebResource to Project Folder" in Deployment Manager,
I realized it copied the DLLs to the root of the website, not in the Bin folder.
After copying thoses DLLs from the root to the Bin folder, the message went away.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname