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 tried emulating a hyperlink by leaving the column's ColumnType as Hyperlink and attmtempting to capture the click event but the first time I click on it, it fails (it tries to open the link as a hyperlink but I do not have an address). I cannot use a real hyperlink because I am opening the webpage modally and there is javascript code to execute.
Is there a way I can emulate a hyperlink with the visited link changing color and such?
I figured it out. The problem was that it was still trying to act like a hyperlink because there was no value being returned from the function. So in the CustomObjectAttributes where you have onclick="javascriptfunction();", I added return false; to it like this onclick="javascriptfunction(); return false;". Returning false, seems to prevent any more from taking place.
In my test, you could use the InitializeRow server side event handler in order to attach the onclick client side event handler and set the hyperlink to # in order to acachieve the scenario you wanted. You will still need to set the column type as hyperlink. Here is the snippet for InitializeRow server side event handler:
protected void wgTest_InitializeRow(object sender, RowEventArgs e){ if (e.Row.Type == RowType.Record) { e.Row.Cells.GetNamedItem("Link").CustomObjectAttributes = "onclick=\"alert('link click');\" href=\"#\" target=\"_self\""; }}
This only partially worked for me. The link is on a grid in a modal dialog. When the link opens, everything is fine (it links to another modal window). When I exit the modal window, a browser window opens up saying IIS 7.5 Detailed Error - 404.0 Not found.
Please help...
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