Jump to content


Photo

FirstVisibleCol


  • Please log in to reply
10 replies to this topic

#1 DelphiToday

DelphiToday
  • Members
  • 99 posts
  • Gender:Male

Posted 16 April 2020 - 05:47 AM

Hi Bojan,

 

Can you add FirstVisibleCol ?

 

This is to be used in:

SelectCell(FirstVisibleCol, FirstVisibleRow, Shift);

 

You can also change it in CustomGrid6:

(But happy with only: FirstVisibleCol)

 

procedure TNxCustomGrid6.SelectFirst(Shift: TShiftState = []);

procedure TNxCustomGrid6.SelectLast(Shift: TShiftState = []);

 

Why?

When the first column is not Visible (VirtualGrid) and SelectFullRow = True when calling SelectFirst() the SelectionBar is not visible!

 

Regards,

Ed.

 

 

 

 



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,893 posts
  • Gender:Male

Posted 17 April 2020 - 01:30 PM

Hi,

 

I will try to add it. You probably want to get column that is first visible in the view?


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 DelphiToday

DelphiToday
  • Members
  • 99 posts
  • Gender:Male

Posted 17 April 2020 - 02:04 PM

That's correct. :)
Sometimes my first (0) column is turned off and then the first one is visible: column (1)
You can calculate that yourself, but a handy function is still nicer.



#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,893 posts
  • Gender:Male

Posted 17 April 2020 - 07:22 PM

Hi,

 

I will try to add it into upcoming release.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 DelphiToday

DelphiToday
  • Members
  • 99 posts
  • Gender:Male

Posted 18 April 2020 - 07:41 AM

Thank you ;)



#6 DelphiToday

DelphiToday
  • Members
  • 99 posts
  • Gender:Male

Posted 05 June 2020 - 05:36 PM

Hi,

 

I see Update but not 'FirstVisibleCol' ?



#7 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,893 posts
  • Gender:Male

Posted 05 June 2020 - 08:58 PM

Hi,

 

Look for FirstColInView inside report view object.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#8 DelphiToday

DelphiToday
  • Members
  • 99 posts
  • Gender:Male

Posted 06 June 2020 - 05:55 AM

Now I understand what you meant. I actually mean it simpler by just displaying the first visible column as a result.

Here's an example of how I see it:

function FirstVisibleCol: Integer;
begin
  Result := -1;
  for i := 0 to Pred(Columns.Count) do
  begin
    if Columns[i].Visible then Exit(i);
  end;
end;

FirstColInView maybe useful in future time.

Sorry for the misunderstanding. :wacko:



#9 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,893 posts
  • Gender:Male

Posted 06 June 2020 - 05:14 PM

Aha, I see now.

 

I will add this property inside Columns.FirstVisible. Only not sure if you want to have Position property used into the consideration?


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#10 DelphiToday

DelphiToday
  • Members
  • 99 posts
  • Gender:Male

Posted 06 June 2020 - 07:39 PM

This is to be used in:

 

SelectCell(FirstVisibleCol, FirstVisibleRow, Shift);

 

So i need result.

 

Very easy if you look at SelectCell what i mean?

 

I was wondering there was ONLY FirstVisibleRow.

 

Hope now we think the same :)

 

See first post:

When the first column is not Visible (VirtualGrid) and SelectFullRow = True when calling SelectFirst() the SelectionBar is not visible!

etc.

 

If you look at NextGrid.SelectFirst(); you always assume that the first column is visible / Selected. See you code:

procedure TNxCustomGrid6.SelectFirst(Shift: TShiftState = []);
begin
  SelectCell(SelectedCol, FirstVisibleRow, Shift);
end;

But when using (SelectFullRow = True) then mostly SelectedCol = 0 and not valid if this column is NOT visible.
 

I am using the VirtualGrid! (TNextVirtualGrid6)



#11 DelphiToday

DelphiToday
  • Members
  • 99 posts
  • Gender:Male

Posted 09 June 2020 - 11:07 AM

See if you can do it and if you feel like it. No problem.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users