Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
How to attach an event to a button on the grid?
posted

Hi,

I am using Ultrawebgrid which has buttons on all the row. I have achieved that using

webGrid.Bands[0].Columns.FromKey("ViewIt").Type = ColumnType.Button; 

I need to have a client side event attached for the same button.

I tried with ultraWebGrid.DisplayLayout.ClientSideEvents.CellClickHandler = "ViewClicked"; This is causing the event to be fired on click of any of the cells in the grid.

What needs to be done so that I can have a clientside event attached only to this button?

 

Thanks

Sharath 

Parents
No Data
Reply
  • 110
    posted

     Hi,

    Thanks for the response. 

    The problem that I am facing is that event is fired on click of all the cells in the grid except for the one which has button.

    When i looked at the page source i am seeing a client side method "OnClick"  attached to the  button .onclick="igtbl_colButtonClick(event,'ctl00xmxgx3a4b7842xbd5bx43b4xb3a5x40a64f98ccd3xHitListGridView',null, igtbl_srcElement(event));".

    I am presently registering for the event on the "OnInit" method. Do I need to register this client side method in any other place ?

    Thanks

    Sharath 

Children