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
Hi,
I've WebGrid, set BindingOperationMode="ClientBinding" and set AllowBatchUpdate="True"
I need to know how to handle BatchUpdating ServiceEvent. I can't find any sample for that.
Thanks,
Maged
Great,
Thank you.
Any update from any one from Intersoft support team?
We've a dead line to deliver this project and we need you help pls.
A sample of client binding and batch update has been provided on the ClientBinding_BatchUpdate.aspx sample page.
You will need to set the BatchUpdateMethod property in the ServiceMethods of ClientBindingSettings. Here is an excerpt of the ClientBindingSettings from the sample:
<ClientBindingSettings DataLoadMode="PagedData" DataSourceType="WebService" ItemTypeName="Bug" ServiceUrl="WebService.asmx"> <ServiceMethods BatchUpdateMethod="UpdateBugs" SelectMethod="GetPagedBugs" /></ClientBindingSettings>
Actually this is not what I'm looking for!!
I need to know how to handle "BatchUpdating". There is NO example explains how to handle "BatchUpdatin" client API, like what parameters it takes ...etc
I need an example that shows how to handle and write client function to handle BatchUpdating.
For example we have this:
<ClientBindingSettings DataSourceType="WebService" ServiceUrl="../MembershipDataService.asmx" DataLoadMode="AllData" ItemTypeName="MembershipNote"> <ServiceMethods SelectMethod="GetMembershipNotes" InsertMethod="InsertMembershipNote" /> <ServiceEvents Selecting="Selecting_MembershipNotes" Inserting="Inserting_Note" Inserted="Inserted_GridData" Updating="Updating_GridData"/> </ClientBindingSettings>
This is suppose to be very simple question, and for two days now I'm waiting for an answer! Please Glenn give me the proper answer ASAP!
The method is implemented in the sample that I pointed out on my previous post. Since the WebGrid is using WebService.asmx, the UpdateBugs method is defined in the WebService.cs under App_Data folder.
Here is the UpdateBugs method I copied from the WebService.cs:
[WebMethod][GenerateScriptType(typeof(Bug))]public TransactionResult UpdateBugs(List<ClientRowChanges> changes){ BugTrackerModelDataContext context = new BugTrackerModelDataContext(); WebGridDataProvider<Bug> provider = new WebGridDataProvider<Bug>(context.Bugs.AsQueryable()); return provider.BatchUpdate(changes);}
I need this one: BatchUpdating ServiceEvent
So in ClientBindingSettings, you can define BatchUpdating service events like:
<ClientBindingSettings ...... <ServiceEvents Selecting="Selecting_MembershipNotes"BatchUpdating="Batchupdating_MembershipNotes"/> </ClientBindingSettings>
I need to know how to write Batchupdating_MembershipNotes.
Please read my request carefully and please reply to me ASAP.... It’s taking too long now.
I am very sorry for the misunderstanding.
It seems the method definition is not available in the WebGrid docs, I inform our documentation team regarding this issue.
Based on my test with the event handler, the BatchUpdating event handler have 2 parameter the Grid object and the row changes collection object. Here is the snippet:
function Grid_BatchUpdating(gridObject, rowChanges) { }
Thanks Glenn for your support.
I still need more information here.
I need to know how to:
1- Iterate through row changes collection object.
2- The structure of the changes collection object on each item in the collection.
2- How to make changes (if it’s possible) to some of the items/fields in the collection.
You can iterate the collection using for loop. Here is a simple snippet to update a Component column for a specific row:
function Grid_BatchUpdating(gridObject, rowChanges) { debugger; for (var i in rowChanges) { currRow = rowChanges[i]; if (currRow.NewObject.BugId == "2875") currRow.NewObject.Component += "-rev"; }}
You could analyse the structure in more detail using the debugger. As shown in the snippet above, you could modify the data using the NewObject property and column information.
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