Jump to content

How to have not checked current row in dbgrid?


delagoutte

Recommended Posts

Hi, 

i have a unidbgrid with dgCheckSelect + multiselect for having a column with checkbox and set my selection.

When i load data the checkbox for the current row is automatically checked. I don't want the current row automatically checked ? how to do this ? i don't dfind the option if it exist

Link to comment
Share on other sites

hi

use this code

procedure TMainForm.UniDBGrid1AfterLoad(Sender: TUniDBGrid);
var
  DBGridJSName: string;
begin
  DBGridJSName := (Sender as TUniDBGrid).JSName;
  UniSession.AddJS('Ext.defer(function(){' + DBGridJSName + '.getSelectionModel().deselectAll(); '
+ DBGridJSName + '.view.refresh()}, 20); '
  );
end;

from Delphi Developerhttp://forums.unigui.com/index.php?/topic/7022-issue-with-gridselected/


but your DBGrid will be refreshed twice
we need a DBGrid property to avoid this action 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...