views:

339

answers:

1

I have made a RowClickable GridView which allow us to postback if we click any row in the gridview.

The problem is i don't want postback to happen if i click in certain column of the gridview.

The way around can be even the postback happens i need to know the Column Index from which the postback is happening.

Does any body out there knows the Solution to it.

Please let me know if you have something similar,

Thanks,

+1  A: 

I found the solution for my problem which is as follow:

We have to cancel the Event Bubbling from Checkbox so that it won't bubble up to the Gridview RowClicked event.

The way of canceling the event bubbling form checkbox is as follow:

cb.Attributes("onclick") = "event.cancelBubble=true;"

where cb is the checkbox.

Hope this will help others having same problem as i did,

Thanks,

prsthapit