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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...