Is it possible that __doPostBack() would ever send a GET request?
Posted
by Galilyou
on Stack Overflow
See other posts from Stack Overflow
or by Galilyou
Published on 2010-03-16T18:03:01Z
Indexed on
2010/03/16
18:11 UTC
Read the original article
Hit count: 305
I'm having a problem with telerik RadGrid, I want to enable multiple row selection. I also want to go to the server whenever a row is selected or deselected. I created a javascript function to handle the Grid's client side events (OnRowSelected, and OnRowDeSelected). The functions look like this:
function onOperationRowSelected(sender, eventArgs) {
__doPostBack("<%=myControl.ClientID %>", "rowSelected:" + eventArgs.get_itemIndexHierarchical());
}
The other function is very similar, the only difference is that it sends the string "rowDeselcted" instead of "rowSelected".
On Page_Load I check to see if the request is a Post request using "IsPostBack" and if so, I check to see if it's a rowSelected or rowdeselected.
My problem is when I select a first raw on my grid, a Post request happens (which is expected), however, when I select the second row, a GET request is issued, which (obviously) will result in IsPostBack returning false.
What am I missing here?
© Stack Overflow or respective owner