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
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 ?
Hello,
You can use the event ClickCellButtonHandler of ClientSideEvents tag and use the javascript function CellButtonClick
...
<ClientSideEvents ClickCellButtonHandler="CellButtonClick" />
Function:
<script type="text/javascript" language="javascript">
function CellButtonClick(gridId, cellId) {
var oRow = igtbl_getRowById(cellId);
alert('function CellButtonClick is FIRE!!!');
}
</script>
Thanks a ton !!! ....