Home All Groups Group Topic Archive Search About

How to call javascript when click update command(it Edit command c

Author
8 Apr 2005 9:15 AM
prakash
hi

can any one help out....

It is possible to call the javascript..when i click update command in
datagrid.
(in Edit Command Column) For validation.

eg:- like button.Attribute.Add("onclick","function name()")

I am  using EDIT Commnad Column.


Another query...

    my required field validator is working in my local system,when i click
the update command in datagrid. But it not workin in the main server machine.
so i gone 1 query.

Thanks In advance

Regards
Prakash.S

Author
8 Apr 2005 7:07 PM
Steve Goodyear
Hi Prakash,

Yes it is possible to add a JavaScript onClick attribute exactly like you
mentioned. Another way thought if you want to use the built in .NET
validators is to create template columns in your DataGrid and just handle the
validator controls the same as you would on a regular page.

Cheers,
Steve Goodyear
Vancouver, Canada
Author
11 Apr 2005 4:07 AM
prakash
hi steve,

how can i add javascript onclick attribute to update command(i am using Edit
Command Colume).can u give sample code plz .it would be helpful for me.

if we have button then it is easy by specifiying it id(name) we can add the
attributes to it.
but i am using Edit command column,how can i achive it ,how can i specify
the button name for the update command.

Thanks in advance

Regards
Prakash.S