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
310
Passing Selected Row Information
posted

I have enabled a double click client function (See Below)

var grid = $find("<%=this.jobListGrid.ClientID %>");

var selectedRow = grid.get_behaviors().get_selection().get_selectedRows();

var row = selectedRow.getItem(0);

After l have the selected row in the "row" variable , l need to pass the information back to the server side.

I have done this by adding a __doPostBack('jobListGrid_DoubleClick');

When the postback is fired l check if l have a selected row (See Below) , but the count = 0. Why?

jobListGrid.Behaviors.Selection.SelectedRows.Count

Why does the client think l have a selected row and the server side doesn't.

I would then like to use the .DataItem to load by object.

Any Help?

Also V2010.2 have support for server side double click?

 

 

Parents
  • 5368
    Offline posted

    I use the RowSelectionChanged server side event.  Then, to get the value of individual cells, I use something like:

    MyValue = DataBinder.Eval(e.CurrentSelectedRows(0).DataItem, "note")

    If you can't use the RowSelectionChanged server-side event, another approach would be to put hiddenfield elements on the page and populate them via javascript in the code block where you have access to the values.

    You can then retrieve those values from the hiddenfields on postback.

     

Reply Children
No Data