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 webgrid with a hyperlink column type, that continues to show the default hyperlink even when the column is null. I have tried to change the text on InitializeRow, but I cannot.
Hello George,
I finally found a way to implement your scenario.
First, you need to set the ColumnType to Custom like following:
<Columns> <ISWebGrid:WebGridColumn Name="Region" Width="100px" ColumnType="Custom" Caption="Region" DataMember="Region"> </ISWebGrid:WebGridColumn> </Columns>
Then, use NullText property in InitializeRow Server-side event like following:
protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e) { WebGrid1.RootTable.Columns.GetNamedItem("Region").NullText = "<a href='http://www.intersoftpt.com' target='_blank'>Intersoft</a>"; }
NullText property will automatically detect your database that has a null value.
Attached is the sample file for your reference.
Hope this helps.
Thank you.
Hello,
You can change the hyperlink text using InitializeRow like following:
protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e) { WebGrid1.RootTable.Columns.GetNamedItem("HyperlinkColumn").HyperlinkDisplayText = "Hyperlink Text"; }
No this does not help. I do not want to change the hyperlinkdisplaytext for all rows, only for the rows that are DBNull.However there is not a hyperlinkdisplaytext off the e.row.cells.
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