CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Focus row of TIWCGJQGrid by code

by antonsanta » 29 Oct 2019 12:29

Hi,
I've a grid with users and would like to focus the row with actual logged user when the user-grid is shown. I tried to set the
JQGridOptions.jsSetSelection(UserSession.memUtentiID.AsString, true)
and also with
JQGridOptions.SelRow := UserSession.memUtentiID.AsString;
followed by a
AjaxReRender(true, true);
but both do not highlight (show focused) any row of the grid.
the ID-field of the dataset is the key-field of the grid.
How can I accomplish this?
thanks and best regards
Toni
antonsanta
 
Posts: 11
Joined: 16 Aug 2019 15:55

by SaturnValley » 30 Oct 2019 02:43

Hi

You have to save the rowid you want to select in a private member of the form/frame, lets say FRowIdToSelect: string and call grid.JQGridOptions.SetSelection(FRowIdToSelect) on grid.JQGridOptions.OnSelectRow

:)
SaturnValley
 
Posts: 1
Joined: 03 Jul 2018 16:13


Return to General

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.