Jump to content


Photo

How to realize "color rows" function


  • Please log in to reply
3 replies to this topic

#1 y88886666c

y88886666c
  • Members
  • 2 posts

Posted 24 April 2017 - 04:03 AM

Hi

    I am a new developer, there are some questions of NextGrid6 I'd like to ask:

   (1)How to realize "color  rows" and "show grid"  function

   (2)How to change the color of all grid edge (bordercolor) 

   (3)How to realize filter two values( col.filter )



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 26 April 2017 - 06:21 PM

Hi,

1) For coloring different rows in different color, I suggest using OnGetCellColor event of grid view.

To enable grid, simply set GridLines of view to True.

2) Immediately bellow GridLines is GridLinesColor

3) Most columns have 3 properties Filter, FilterEnabled and FilterOptions. You can set set Filter and then FilterEnable to True. Then, grid will filter by this column.

Also there is a Filtered property of grid to enable/disable filtering of whole grid.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.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 y88886666c

y88886666c
  • Members
  • 2 posts

Posted 27 April 2017 - 02:46 AM

Thanks Boki (Berg).

    The 1st Question is :  the one line bgcolor is clRed, another line bgclor is clGreen, next  line bgcolor is clRed, next  line bgclor is clGreen,   clRed, clGreen, ......

    The 3rd Question is : example column(2)  value has 'A' or 'B' or 'C',    use col.Filter='A' can only display column(2) string equal 'A'  cells, how set can i to only disply column(2) string equal  'B' or 'C' , without 'A'

 

Look forward to your reply



#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 27 April 2017 - 04:39 PM

Hi,

1) You can read ARow parameter inside this event (OnGetCellColor) and then set CellColor var parameter to desired color.

2) Maybe FilterOptions property and foExactMatch flag there can help?
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users