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
For example, this Webgrid looks like:
MA 100
CT 200
CA 300
I want add link ONLY for MA and make the link, like <a href="anotherpage.aspx?number=100">MA</a>
And if the value of first column is not "MA", just display TEXT.
Can I do this?
Thanks!
David
Hi David,Could you please let me know where the snippet code placed ?
If you want to add a link in WebGrid base on the cell value, I suggest you to add code on InitializeRow WebGrid event. Then you have to add HyperlinkDisplayText to define text which is shown and HyperlinkFormatString to define where will be navigated after you click the display text. For the example, please follow this code:
WebGrid1.RootTable.Columns[1].HyperlinkDisplayText = " <img alt='" + "?id=" + e.Row.Cel ls[0].Text + "' src='" + e.Row.Cells[1].Text + "'/>"; WebGrid1.RootTable.Columns[1].HyperlinkFormatString = e.Row.Cells[0].Text + ".aspx";
Hope this helps.Riendy
Thank you very much!
It works!
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