tags:

views:

451

answers:

1

Hi,

I just want to check if a click is made in an datagrid whether the click is made on a header r on a cell content.

I am facing a problem when...

when cell is clicked i am manipulating with the data. But if the header is clicked for sorting ,same cell click event is triggered.

How can i stop this ?

A: 

In your event code, check if

e.RowIndex >= 0

prior to executing the code. If the user clicks on the header cell, the RowIndex will be -1 therefore the code will not be executed.

Nikos Steiakakis
Hi thanks.I really works. Thanks for ur help.