I have this piece of code in the page load event:
im
dtType As New DataTable
Dim daType As New SqlDataAdapter
Dim sqlCmd As New SqlCommand("spSelect", x.getConn)
sqlCmd.CommandType = CommandType.StoredProcedure
sqlCmd.Parameters.Add(New SqlParameter("@search", SqlDbType.NVarChar, 10)).Value = "All"
sqlCmd.Parameters.Add(New SqlParameter("@Type", SqlDbType.NVarChar, 10)).Value = "All"
daType.SelectCommand = sqlCmd
daType.Fill(dtCourse)
gridType.DataSource = dtType
gridType.DataBind()
This RADgrid has sorting enabled. I set a breakpoint at the page load event.
When the page was loading, yes indeed it hit the breakpoint and i press F11 to step into the code. But the strange thing is that it also step into this code:
<
ItemTemplate>
<a href="#" onclick="openRadWindow('<%#DataBinder.Eval(Container.DataItem,"TypeCode")%>'); return false;">Update</a>
</ItemTemplate>
several times. Same thing would happen every time i did a sort. Why is that so and how to make sure it does not step into this: <a href="#" onclick="openRadWindow('<%#DataBinder.Eval(Container.DataItem,"TypeCode")%>'); return false;">Update</a>
Thanks