Jump to content


czbird's Content

There have been 4 items by czbird (Search limited from 19-April 23)


By content type

See this member's

Sort by                Order  

#19658 Sort by value in hidden column

Posted by czbird on 20 April 2018 - 03:49 PM in General Discussion

nevermind... I managed to take advance of Text/DisplayText difference to achieve this.




#19657 Sort by value in hidden column

Posted by czbird on 20 April 2018 - 11:32 AM in General Discussion

Hi,

I want to sort one column (visible) by values in other column (hidden) - is this possible?

The values in visible column are reformatted representation for end user and cannot be used for sorting by themselves.

I tried to implement onCompare, but it does not know the position of the cells it is comparing, so I cannot link to another cells from there.

Thanks

 

Simply put -- when user clicks on column A header, I need the grid to get sorted by column B values, but still show that column A is the sorted column :)

 

Thanks

 

 

 




#19402 SelectNone not working in TNextGrid v6.0.55

Posted by czbird on 05 October 2017 - 12:10 PM in NextGrid v6 Component

Posting updated code to make this work as I expected...

procedure TNxCustomGrid6.SelectNone(DelayedRefresh: Boolean);
var
  i: Integer;
begin
  if gtMultiSelected in FState then begin
    try
      if DelayedRefresh then BeginUpdate([]);
    	for i := 0 to Pred(RowCount)
        do Selected[i] := False;
      Exclude(FState, gtMultiSelected);
    finally
      if DelayedRefresh then EndUpdate;
    end;
  end
  // BEGIN_CODE_UPDATE czbird@2017-10-05 added this so that it works also when just 1 row is selected
  else
    if FSelectedRow <> -1 then Selected[FSelectedRow] := False;
  // END_CODE_UPDATE

  FSelectedCol := -1;
  FSelectedRow := -1;
end;



#19401 SelectNone not working in TNextGrid v6.0.55

Posted by czbird on 05 October 2017 - 11:58 AM in NextGrid v6 Component

Hi,

just updated first grid to TNextGrid6, and replaced old NoSelection call with new SelectNone in my code.

 

I click on a single row in the grid, and it gets selected.

Then I call SelectNone -- the row still remains selected

Then when I click on any other row in the grid, it properly gets selected, but the first row still remains displayed as selected.

 

 

What's wrong?

Thanks

 

EDIT -- So, it only works when multiple rows are selected (gtMultiSelected in FState)... but it does not work when just single row is selected... why is that?