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
412
Detect Header Row click in Ultrawebgrid
posted

I'm having user inadvertantely click the header row and it throws and error.  How can I detect a header row click and prevent anything from happening?

I'm looking for something like this...

        If UltraWebGrid1.DisplayLayout.ActiveRow = HeaderRow Then
            label1.Text = "Header Click"
        Else
            label1.Text = e.Row.Cells(2).Value.ToString
        End If

Parents
  • 45049
    posted

    Determining the best solution to this depends on what event you're currently handling, and what result you're trying to get.

    It sounds like you're using the grid's server-side Click event.  The grid's headers cannot become an "active row," so the for-example code you provided wouldn't work.  You might be able to intercept the client-side Click event (which provides a way to determine what was clicked) and cancel the postback if a column header was clicked.

Reply Children
No Data