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,
With a WebGrid, how can I determine if First Row is being Added or Last Row has been Deleted?
I have a WebGrid with an ISDataSource.
I have tried the following but can't figure out a valid WebGrid Count:
- WebGrid.OnAddRow Event - ISDataSource.OnInserting Event
I need to know this before the row is added so I can supply a Foreign Key to the Row being Added.
- WebGrid.OnDeletedRow Event- ISDataSource.OnDeleted Event
I need to know this after the last row of the WebGrid is deleted so I can delete a Parent Table Row using the Foreign Key of the Row being Deleted.
Thanks,
Doug
You could use the ISDataSource selected event handler to buffer rows count of the selecting query retrun value object. The ISDataSource selected event will be triggered before WebGrid OnAddRow and OnDeleteRow.
Here is the snippet to buffer the rows count of Customers table:
protected void ISDataSource1_Selected(object sender, ISNet.WebUI.DataSource.ISDataSourceStatusEventArgs e){ if (((DataTable)e.ReturnValue).TableName == "Customers") { rowCount = ((DataTable)e.ReturnValue).Rows.Count; }}
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