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 trying to compare to cells in two column of a specific grid and change the format of the cells depending on the results. For instance.
Column 1 Column 2
160.00 168.00 Change Format to Bold
168.00 168.00 No Change
160.00 159.00 Change Format to Bold
I was thinkgin of using the WebGridFormatCondition, but all the examples only contain a comparison to a value, not another cell in the same row.
Any ideas?
Hello,
You can use InitializeRow Server-side event in WebGrid. You put the validation over there and set the Font style like following:
protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e) { if (e.Row.Cells.GetNamedItem("Column1").Text.ToString() == e.Row.Cells.GetNamedItem("Column2").Text.ToString()) { e.Row.Cells.GetNamedItem("Column1").Style.Font.Bold = true; e.Row.Cells.GetNamedItem("Column2").Style.Font.Bold = true; } }
Attached is the sample file for your reference. Hope this helps.
Thank you.
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