Jump to content


Bagong's Content

There have been 14 items by Bagong (Search limited from 30-March 23)


By content type

See this member's

Sort by                Order  

#21189 How to multi sort on NextDBGrid v6?

Posted by Bagong on 01 December 2021 - 04:19 AM in NextDBGrid v6 Component

How to multi sort on NextDBGrid v6?

the same logic as sql multi sort / order




#21177 How to hide active selection while scrolling down or up?

Posted by Bagong on 01 November 2021 - 06:20 AM in NextDBGrid v6 Component

How to hide active selection while scrolling down or up?

 

As attached, auto multiple row selection appear while i scrolled up or down




#21163 How to save scroll bar position..

Posted by Bagong on 03 October 2021 - 09:09 AM in NextDBGrid v6 Component

How to save scroll bar position on NextDB Grid..

 

the goal is to keep position screen while be refreshed.




#21162 how to assign fieldname columns dynamicly

Posted by Bagong on 03 October 2021 - 04:54 AM in NextDBGrid v6 Component

Code :

 

NextDBGrid6.Columns[0].Fieldname := 

 

Fine error




#21019 How to Coloring Font base on value in NextDBGrid 6

Posted by Bagong on 25 March 2021 - 03:27 AM in NextDBGrid v6 Component

 

Probably something like this:

procedure TFLinPM.CoLinStaStyleText(Sender: TObject; ACol, ARow: Integer;
  var FontColor: TColor; FillColor: TColor; var FontStyle: TFontStyles;
  CellValue: INxBase; CellState: TNxCellPaintingState);
begin
 
if ACol = 12 then
  if CellValue.AsString = 'Closed' then
    begin
       FontColor := clGreen;
    end;
end;

 

 

Hi Boki, 

that code will make green color just for its column.

I need the green color in arow with status "Closed".

I have no problem with version 5, cause there was a cellformating event there.




#21008 How to Coloring Font base on value in NextDBGrid 6

Posted by Bagong on 21 March 2021 - 02:16 AM in NextDBGrid v6 Component

Hi,

 

You are pretty close to the solution. You just need to set var parameters from this procedure, such as FontColor, FontStyle or FillColor, but not set properties of columns. 

 

could you write the code should be..




#21005 How to Coloring Font base on value in NextDBGrid 6

Posted by Bagong on 20 March 2021 - 12:13 PM in NextDBGrid v6 Component

a simple thing, please convert this code (ver 5)

 

procedure TForm1.NextGrid1CellFormating(Sender: TObject; ACol, ARow: Integer; var TextColor: TColor; var FontStyle: TFontStyles; CellState: TCellState);

begin

if (ACol = 3) and not(csSelected in CellState) then

begin

TextColor := clRed;

FontStyle := [fsBold];

end;

end;

 

 

to ver 6th.

 

 

my goal is gives possibility to set custom Font TColor or TFontStyle based on ACol and ARow parameters.




#21004 color cell in column 1 based upon value in column 2

Posted by Bagong on 20 March 2021 - 12:04 PM in NextDBGrid Component

Hello,

 

There is an event for Column (you need to select the column) and the you have an event for styling cell text. It have very much the same var parameters.

 

I hope that this helps.

 

 

could you please make an example code




#21003 How to Coloring Font base on value in NextDBGrid 6

Posted by Bagong on 20 March 2021 - 11:51 AM in NextDBGrid v6 Component

procedure TFLinPM.CoLinStaStyleText(Sender: TObject; ACol, ARow: Integer;
  var FontColor: TColor; FillColor: TColor; var FontStyle: TFontStyles;
  CellValue: INxBase; CellState: TNxCellPaintingState);
begin
 
  if CellValue.AsString = 'Closed' then
    begin
    GrLin.Cell[ARow,ACol].Color := clGreen;
    GrLin.Cell[ARow,2].Color := clGreen;
    GrLin.Cell[2,ACol].Color := clGreen;
    end;
 
end;
 
 
 
 
i try this, doesnt work too



#21002 How to Coloring Font base on value in NextDBGrid 6

Posted by Bagong on 20 March 2021 - 10:54 AM in NextDBGrid v6 Component

Hello,

 

You can also check ARow parameter and depending on its value do the change. 

Boki,

please correct me in this code..

 

procedure TFLinPM.CoLinStaStyleText(Sender: TObject; ACol, ARow: Integer;
  var FontColor: TColor; FillColor: TColor; var FontStyle: TFontStyles;
  CellValue: INxBase; CellState: TNxCellPaintingState);
begin
 
if ACol = 12 then
  if CellValue.AsString = 'Closed' then
    begin
    GrLin.Columns[1].Font.Color := clGreen;
    end;
 
 
end;



#20990 color cell in column 1 based upon value in column 2

Posted by Bagong on 15 March 2021 - 03:50 AM in NextDBGrid Component

Can it be implemented on nextdbgrid v6??




#20989 How to Coloring Font base on value in NextDBGrid 6

Posted by Bagong on 15 March 2021 - 03:31 AM in NextDBGrid v6 Component

i mean, all row will be change color if that column value is defined




#20987 How to Coloring Font base on value in NextDBGrid 6

Posted by Bagong on 14 March 2021 - 03:51 PM in NextDBGrid v6 Component

 

Hi,

 

You can use next event. This event is located in Column:

procedure TForm1.NxTextColumn61StyleText(Sender: TObject; ACol, ARow: Integer;
  var FontColor: TColor; FillColor: TColor; var FontStyle: TFontStyles;
  CellValue: INxBase; CellState: TNxCellPaintingState);
begin
// Set some of var parameters
end;

Boki, could you please explain more with example..

i need coloring rows with content "close"




#20986 Showing / editing TNxDBMemoColumn6 full

Posted by Bagong on 14 March 2021 - 03:49 PM in NextDBGrid v6 Component

Hi Lothar,

 

I'm not sure if I understood completely, but maybe ExpandContent property may help you? It is inside TNxDBMemoColumn6 class. Try setting it to True.

Boki, better you set default true by default