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
I am attempting to bring rows from a database into a WebGrid. The table has an identity column. I'd like to make any row in the grid that has a value in the idenity column readonly. Any new row that is added on the front end should be editable. How can I do this?
In WebGridRow class, there is a public property named “ForceNoEdit” that will suit with your scenario. “ForceNoEdit” determines whether this row will be forced to not allow editing. Enabling this property on row will force the corresponding row to be read-only. Below is the snippet code that shows how to enable a read-only row from server side event.
protected void productGrid_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e) { e.Row.ForceNoEdit = true; }
You can also disabling row editing on client side event by invoking “SetForceNoEdit(parameter)” method of WebGridRow. The parameter has a Boolean value, true means Not Editable, false means Editable. Below is the snippet code that shows how to enable a read-only row from client side event.
selectedRow.SetForceNoEdit(forceNoEdit); // set the row as editable (false) or not editable (true)
For more detail, please check ProductCatalog.aspx and Client_ProgrammaticEdit.aspx reference sample in WebGridSamples project. Hope this helps.
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