OnClick issue

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
 
E

Eliyahu Goldin

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
 
E

EMW

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top