iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello,
We have an issue with delete method. We use a custom delete
void wg_DeleteRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e) { var myObject= (MyObject)e.Row.GetObjectRow(); myObject.Delete(); e.ReturnValue = false }
The delete works well, and remove the object from the webgrid.
But If I do a refresh right after the deletion, the deleted object re-appears !
Other problem : if I add a new object, the wg.ClientAction.Refresh(); method doesn't show the new object.
Here is the datasource :
<ISDataSource:ISDataSource ID="ids" runat="server"> <Tables> <ISDataSource:ISDataSourceTable SelectMethod="GetData" SelectCountMethod="GetCount" TableName="table" TypeName="MyType" EnablePaging="true"> </ISDataSource:ISDataSourceTable> </Tables> </ISDataSource:ISDataSource>
Based on the given snippet, I suspect the deletion is only done on the WebGrid object level not on the database level. When you refresh, the WebGrid will load the data from the database again which will show the deleted WebGrid data since it was not deleted from the database.
Attach is a simple sample of the scenario you wish to achieve, during the Add, Update, and Delete WebGrid event handler the data operation is done to the database. The sample will require dsNorthwind.xsd which already supplied in the WebGrid sample
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