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 have a Hyperlink column which shows data of Yes or No. If Yes I want it to user the HyperLinkFormatString so that when clicked it opens a new page, but if No I don't want it to use the HyplerLinkFormatString and would like to convert it to just text.
I know that a TemplateColumn would work but due to other problems (SaveLayout can't deal with Template Columns) with Grid8, I can't use a Template Column.
I've tried to change the ColumnType to Text in the InitalizeRow event but it changes the entire column. Would like to convert just the cell.
Any ideas?
Thanks
Hello,
I made a simple WebGrid sample that perhaps similar with your scenario requirement.I bind WebGrid to access data source (Northwind.mdb database and Shippers table).
In my sample, if the value of ShipperID is “1”, the ShipperID will appear as a hyperlink to another page.
In ShipperID column, I set ColumnType property to "Custom".And in InitializeRow server side event I add some validation code:
protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e) { string shipperID = e.Row.Cells.GetNamedItem("ShipperID").Text; if (shipperID == "1") e.Row.Cells.GetNamedItem("ShipperID").Text = "<a href='http://google.com'>" + shipperID + " </a>"; else e.Row.Cells.GetNamedItem("ShipperID").Text = shipperID; }
Please kindly have on my sample and let me know your reponse.
Regards,Hans.
Thanks Hans, I wasn't aware of the Custom columntype.
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