OnClick issue

  • Thread starter Thread starter EMW
  • Start date Start date
E

EMW

Hi,

In my datagrid I have the first column set as a buttoncolumn with
linkbuttons.
In my code I have some line to color the row the cursor is hovering over and
what to do when the user clicks on a rowitem in the first column.
It will then respond to the OnClick event and do a postback so that the
program knows which row was clicked.
After that it will retrieve some data what I want to show in a popup
modaldialog window.

basicly:
1) user clicks on the linkbutton in a row
2) code-behind checks which line and looksup some data in the database
3) A window should popup showing that data.

But there I have a problem: there is already a OnClick attribute set on each
row.
So I cannot call my ShowModalDialog function with the OnClick attribute.

Is there any other way?

rg,
Eric
 
Eric,

You need to insert javascript call to showModalDialog into the Http
response. You can do it in the code handling OnClick event at the end of
processing. Translate following C# lines to VB:
Page.Response.Write("<script language=\"Javascript\">");
Page.Response.Write("showModalDialog("myUrl");");

Page.Response.Write("</script>");


Eliyahu
 
Thanks, also for the other reply....

rg,
Eric


Eliyahu Goldin said:
Eric,

You need to insert javascript call to showModalDialog into the Http
response. You can do it in the code handling OnClick event at the end of
processing. Translate following C# lines to VB:
Page.Response.Write("<script language=\"Javascript\">");
Page.Response.Write("showModalDialog("myUrl");");

Page.Response.Write("</script>");


Eliyahu
 
Back
Top