Important alert: (current site time 7/16/2013 2:20:48 AM EDT)
 

winzip icon

LynxGrid 2.17.3 (A professional grid in a single CTL)

Email
Submitted on: 7/12/2011 2:57:37 PM
By: Morgan Haueisen  
Level: Advanced
User Rating: By 52 Users
Compatibility: VB 6.0
Views: 97432
 
     No voting please. The original author (Richard Mewett) has abandoned this Grid and is now using another; but this grid is too good to let die. This is a Major update (the number of changes made in this version are significant), so please read the HistoryLog before using. The HistoryLog also contains a list of all public subs, functions, and properties. Notes: Not all properties are illustrated in the demo. Oblivious omissions: Cell merging (got to complicated); Datacontrol support (which you should avoid anyway).---------------------------------------------------- (Update: Added RowUnselect)

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 28 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

4/17/2008 5:24:00 PMNeverGiveUp26

Sir this project stacks while is loading on any form
OS:WinXp Pro Sp1
Looks Like Subclassing problem!
(If this comment was disrespectful, please report it.)

 
4/18/2008 6:41:43 AMhai2hai

In Editable mode, I can't use "Delete" key to delete a char in cell. Please fix this.

Thanks!
(If this comment was disrespectful, please report it.)

 
4/18/2008 6:52:17 AMhai2hai

2. In Editable mode = fale (mean Lock mod), when I use Goto row: 30, the grid is able to edit in 30th cell. It is not correct I think!.

3. When I click "Add Items" button. It is too slow! --> It can be used in commercial application that usually deal with billion of records.

After some short test, I think this grid can't be used if the performance of adding items is not good.
(If this comment was disrespectful, please report it.)

 
4/18/2008 1:50:14 PMMorgan Haueisen

When adding data set Redraw = False

The Goto button in the Demo is set to ForceCellEdit the cell (see the code behind the button).

The grid will handle as many rows as your PC's memory can handle.

The Delete button can't be used during Edit, that is why the text is selected when edit is first started.

This control is running on over 80 machines with various OS (Win2000, XP, and Vista)
(If this comment was disrespectful, please report it.)

 
4/18/2008 2:19:08 PMMirko Kressmann

Great that anyone is here to develop this control in future. I have made my own changes to the old control and if you can make it possible to write text to cells when the cell is in progressbar-mode that would be great. Thanks for future developments.
(If this comment was disrespectful, please report it.)

 
4/18/2008 8:16:37 PMZhu JinYong

Not worth spending time on this control.There's a serious problem with subclasser or the way subclasser being used.You can try to change your non-unicode option to asia language such as Chinese (LCID=2052) or Japanese,the control is going to die straightly.The problem hasn't yet solved by the original author and Paul,Steppenwlofe...

It's worth trying to rewrite VBAccelerator's sGrid2,which is a nice control except of some small problems.
(If this comment was disrespectful, please report it.)

 
4/18/2008 11:38:27 PMFernos2

A probarlo se ha dicho ;)
(If this comment was disrespectful, please report it.)

 
4/18/2008 11:53:11 PMFernos2

BUG!!!!

crash by pressing the down key

http://vi01.no-ip.org/Pub/LynxGrid2%20BUG.gif

(If this comment was disrespectful, please report it.)

 
4/18/2008 11:55:21 PMFernos2

Sorry, crash by pressing the UP KEY.
(If this comment was disrespectful, please report it.)

 
4/19/2008 12:09:26 PMnik

i've found many crashes that it's no use writing them in here.
so, the best grid ever that i've found is still "s-grid 2.0" from vbAccelerator.
(If this comment was disrespectful, please report it.)

 
4/19/2008 8:06:58 PMzoe zhao

Crash on Win2003 when loading.
(If this comment was disrespectful, please report it.)

 
4/19/2008 8:07:19 PMzoe zhao

Crash on Win2003 server when loading.
(If this comment was disrespectful, please report it.)

 
4/20/2008 1:55:35 PMFaizan

I didn't use this control but due to it's awsome interface I rated it 5/5.
(If this comment was disrespectful, please report it.)

 
4/25/2008 12:05:46 PMSkidmonk

Vista, scroll bars are always FLAT until hovering the mouse over the scroll bar, then the proper scroll bar is drawn.

http://i29.tinypic.com/2wf8cv5.jpg

mouse is hovering over the vertical scroll bar.

anyone else experience this behavior?
(If this comment was disrespectful, please report it.)

 
4/28/2008 6:09:51 AMHassan

i've repalce CStr(vAvg) by Replace(CStr(vAvg), ",", ".")
because i'd an error convertion in sql request
(If this comment was disrespectful, please report it.)

 
5/6/2008 6:07:47 PMchenlin

Why can't run?
must rem "Redraw".
(If this comment was disrespectful, please report it.)

 
5/7/2008 9:45:30 AMWallonso

Give You 5 (sorry tehy don't allow more).Great Job as ever.

Couldn't figure it out :
Pressing PageUp/Down : there's no cursor/selection line. I'm sure, you can figure it out.

The thing with the scrollbar. It exists (on XP too). But is it dramatical ? Themes ?

To hai2Hai :
as written in the code use LynxGrid1.RowColSet lngRow, 2 instead

To Hassan :
It's not Morgan's (or the tester's) fault, that your decimal sign is something else than a dot. He just executes standard ADO.


(If this comment was disrespectful, please report it.)

 
5/7/2008 9:45:53 AMWallonso

Give You 5 (sorry they don't let me more). Great Job as ever.

Couldn't figure it out :
Pressing PageUp/Down : there's no cursor/selection line. I'm sure, you can figure it out.

The thing with the scrollbar. It exists (on XP too). But is it dramatical ? Themes ?

To hai2Hai :
as written in the code use LynxGrid1.RowColSet lngRow, 2 instead

To Hassan :
It's not Morgan's (or the tester's) fault, that your decimal sign is something else than a dot. He just executes standard ADO.


(If this comment was disrespectful, please report it.)

 
5/7/2008 11:17:36 AML. M. Trivette

This is some of the best stuff I have seen. Thank you for sharing. So much to learn from.
(If this comment was disrespectful, please report it.)

 
5/13/2008 1:33:55 PM

Did he/she want to understand as working with this control, in database?
Some example?
(If this comment was disrespectful, please report it.)

 
5/13/2008 6:39:03 PMchenlin

still can't run?
always must rem "Redraw".

(If this comment was disrespectful, please report it.)

 
5/15/2008 8:47:16 PMpaulo

Private Sub Command4_Click()

LynxGrid1.Sort , lgSTNormal

End Sub
erro: subscript out of range
(If this comment was disrespectful, please report it.)

 
5/19/2008 2:48:31 AMErwin Christiaens

'i have create a button in to the grid very usefull.
'Can you import this button option into the grid
.AddColumn " ", 400, lgAlignCenterCenter, lgbutton '1
Select Case mCols(mColPtr(lCol)).nType
Case lgBoolean
Case lgbutton
nImage = mCF(mItems(mRowPtr(lRow)).Cell(mColPtr(lCol)).nFormat).nImage
If nImage = 0 Then
Call SetRect(R, mCols(mColPtr(lCol)).lX + 1, RowTop(lRow), mCols(mColPtr(lCol)).lX + mCols(mColPtr(lCol)).lWidth - 1, RowTop(lRow) + mItems(mRowPtr(lRow)).lHeight)
DrawXPButton .hDC, R, lgNormal


(If this comment was disrespectful, please report it.)

 
5/20/2008 4:02:00 PMMirko Kressmann

Last week i was porting me listviews in a current project to this lynxgrid. In one part i am using the "SetOleData" Event for Drag and Drop items to onother form. Could you add this Events to your grid. That would be a great step to make this grid realy professional. Thank you very much for you work on this.
(If this comment was disrespectful, please report it.)

 
5/26/2008 3:22:27 PMNoName

Hello, i have 2 requests:
1. Please add BackcolorHdr (backcolor for column header) option.
2. Please make the horizontal scroll bar set to width of grid. Eliminating the empty space to the right.
Thank you.
(If this comment was disrespectful, please report it.)

 
5/26/2008 4:12:21 PMNoName

oops..nevermind my first request. found the custom header color property.

With my second request, maybe something like the user32 lvm_setcolumnwidth (listview) that will autosize headers to control width to get rid of the blank space at right.

last i would like to see descriptions in the properties window to really give it that pro look.

Thanks
(If this comment was disrespectful, please report it.)

 
5/27/2008 3:06:05 PMMorgan Haueisen

NoName: You can autofit the column width by using VisibleWidth in the Form_resize event. (see ADO_Demo_Pictures)
(If this comment was disrespectful, please report it.)

 
5/27/2008 4:36:11 PMNoName

Hi Morgan, ty but still a problem. With the (ado demo pictures example), if you maximize window then return it to normal size - the horizontal scrollbar now shows and when moved to right there is a large empty space beyond the last column.

I would prefer an option so the horizontal scrollbar only moves = to the width of the total columns (not beyond into empty area) if possible.

In other words, like a listview the far right is the last column using the horiz scrollbar. [with the ability to add a new column too, but without the empty area to right of right most column].

This is an awesome project TY for the improvements and support.
TY
(If this comment was disrespectful, please report it.)

 
6/4/2008 9:55:49 AMmarshalfaulkner

Thanks for continuing with this great grid. I like the changes too.
(If this comment was disrespectful, please report it.)

 
6/5/2008 2:14:36 AMAmol Tarte

Really Good Work! 5 Stars from me!!!
But you can get some inspiration from ucVHGrid of SteppenWolf! (John)
(If this comment was disrespectful, please report it.)

 
6/5/2008 10:22:53 AMMorgan Haueisen

The scroll in LynxGrid acts like other grid/spread sheets (moving 1 column at a time) while the scroll in ListView is more like scrolling a picture (smooth).

This “smooth” kind of scrolling is not possible in this control.

The only way to eliminate the blank space on the right is to make the total width of all of the columns equal the grid’s width

(If this comment was disrespectful, please report it.)

 
6/13/2008 1:21:23 PMJames Dougherty

Very nice, thank you. It would be great if you could add an AutoFilter feature to it. 5*
(If this comment was disrespectful, please report it.)

 
6/19/2008 3:22:47 AMMike

Thanks for the good ongoing work! I wonder how hard it would be to keep the selections (using multiselect), and clicking the right mousebutton. I want to use this with a popup for changing multiple properties at once on the selected rows
(If this comment was disrespectful, please report it.)

 
6/19/2008 4:41:07 PMMorgan Haueisen

Mike, not a problem to make this change. see version 12a
(If this comment was disrespectful, please report it.)

 
6/20/2008 9:54:44 PMMaster_Coder

Hey Morgan,

I wanted to suggest a small change that I was able to make myself, but would like to know if you could make it part of your build so I can take advantage of updates without having to recode everytime. It's simple, the icon for multi-line rows instead of always being an up/down arrow icon, make it change to a down arrow when single line and an up arrow when in multi-line view.

Thanks
(If this comment was disrespectful, please report it.)

 
6/20/2008 11:30:22 PMPurshotam K Hotwani

Morgan, brilliant work. I have been following this since the day one. Some error I would like to highlight here. When you remove an Item, The Totals aren't updated. If you were to add a row and then make an entry in the Premium Dollar Cents Column, a Type Mismatch error occurs. I have a few Suggestions to make. Allow Column Headers with Font Face selection and Include Icons. Once Again Great Code ! 100 Globes !
(If this comment was disrespectful, please report it.)

 
6/23/2008 5:34:52 PMAmacedo

Morgan, great code my friend!! im using it right now but i found a bud when you change the pos of a collumn and then try to order that collum i get a real mess. Thanks in advance for that great piece of work!!!!
(If this comment was disrespectful, please report it.)

 
6/25/2008 12:46:00 PMAmacedo

Morgan you have done an excelent work continuing the control, i have a question, there is some method to clear the columns estructure??
(If this comment was disrespectful, please report it.)

 
6/26/2008 12:08:35 PM

Morgan, thanks, I'am using your control and it works wery well but there's an issue concerning total row: totals are not set to zeros when executing clear method.
(If this comment was disrespectful, please report it.)

 
7/9/2008 11:54:50 PMBen Ng

Great work, Morgan! Keep up with your excellent sharing work.

I would appreciate if you can modify the LynxComboBox also as it can only be used in SDI project. For MDI-child forms, it crashed.

Thank you.
(If this comment was disrespectful, please report it.)

 
7/14/2008 9:11:54 AMmarshalfaulkner

Nice updates, Thanks.
(If this comment was disrespectful, please report it.)

 
7/23/2008 1:51:25 PMTony

a couple of questions:

I am using lynxgrid for some data entry. I would like to highlight cells that have invalid data by changing the fontcolor to red for those cells. Tried .cellforecolor but that doesn't do it. Any suggestions?

Also, for reasons I can't figure out, occasionally after program termination, the grids will appear with a diagonal hatch marks and the docked properties table changes to a MSFT properties table. THe only way to resolve this is to exit VB and start it up again.

Thanks in advance for any replies.

(If this comment was disrespectful, please report it.)

 
7/25/2008 10:27:13 AMkibe

not work under vista
(If this comment was disrespectful, please report it.)

 
7/25/2008 11:48:01 AMMorgan Haueisen

It must be something with your machine because it is running on 4 Vista machines that I know of (1 Vista Home and 3 Vista Business). Do you have VB's SP5 installed?
(If this comment was disrespectful, please report it.)

 
7/30/2008 3:37:31 AMkibe

i have vista ultimate sp1,
and vb6 sp6 installed on it
i think,what problem maybe in regional settings...
because, i remember, what and in XP SP3 also grid can't run

(If this comment was disrespectful, please report it.)

 
7/31/2008 7:20:44 AMMorgan Haueisen

I am not sure what I can do to help you. I have this control running on the following 32-bit systems: Win2000 SP4, XP SP2 & 3, and Vista (all versions).

I know that there is a problem with the sub-classing on non-English version of Windows but I have no way to test those systems.

Do you have any other controls that use sub-classing? You could try to fix the problem by replacing the sub-classing.
(If this comment was disrespectful, please report it.)

 
8/5/2008 5:10:22 AMharry

nice code, and work under XP
..but not work under Vista (not responding) when i clik on it after i fill data.. and hang.. i belive you can fix it.. keep coding..
(If this comment was disrespectful, please report it.)

 
8/12/2008 7:21:00 AMxfighter9

xp or vista crash maybe use font. try Font change. Not work some country font. i try and work it.
(If this comment was disrespectful, please report it.)

 
8/29/2008 9:50:00 AMDavid Cunha

Good work, is a great control only one feature is missing to be 100% completed.
It should have the feature to group records (lines) by dragging columns to a gouping box like Outlook grid.
(If this comment was disrespectful, please report it.)

 
8/29/2008 10:10:37 AMDavid Cunha

For those who have problems running this control in Windows XP/Vista/2003 try the following:
Find this code "Optional ByVal bIdeSafety The Boolean = True)" and change it to "Optional ByVal bIdeSafety The Boolean = False)".
The problem is probably caused by Windows DEP (Data Execution Prevention).
(If this comment was disrespectful, please report it.)

 
9/1/2008 4:55:41 AMBill

This is great! Keep up the good work.
(If this comment was disrespectful, please report it.)

 
9/4/2008 2:24:54 AMsal


Type mismatch in cbool...
SetFlag mItems(mRowPtr(mRowCount)).Cell(lCol).nFlags, lgFLChecked, CBool(sText(lCount))
(If this comment was disrespectful, please report it.)

 
9/5/2008 9:50:23 AMMorgan Haueisen

sal, You tried to add a null string in a column that you defined as boolean. I will prevent this from happening in the next release.
(If this comment was disrespectful, please report it.)

 
9/8/2008 10:28:25 PMPurshotam K Hotwani

Scroll to the right and click any button, you will find the next immediate row disappears!, then click it again and it re-appears. Delete all rows except one and you will find the totals incorrect.
(If this comment was disrespectful, please report it.)

 
9/9/2008 1:58:28 PMMorgan Haueisen

Purshotam, Look at the code behind the button and you will see why the row disappears.
(If this comment was disrespectful, please report it.)

 
9/12/2008 2:04:18 AMErwin Christiaens

Can i use this control in vb 2008
(If this comment was disrespectful, please report it.)

 
9/17/2008 9:34:19 AMAlex

Morgan you can help by recreating the error and you don't need XP in another language.

The control crashes when your REGIONAL SETTINGS are not UK OR US.

If you change to another country then the control crashes. I'm trying to figure this out, but still got a way to go.

Nice control
(If this comment was disrespectful, please report it.)

 
9/21/2008 11:00:49 AMKeleBack

I dont know why (cant debug it) but it hangs and crashes all the time. I test it under win2k srv sp4 and winXP Pro SP3 and both the same.. When I run the main project it loads rows on the grid and hangs. Any ideas?
(If this comment was disrespectful, please report it.)

 
9/22/2008 4:21:05 AMMuh.Abd.Gafur

Not work if Set to in Indodesian Regional Setting
(If this comment was disrespectful, please report it.)

 
9/24/2008 4:24:56 PMMorgan Haueisen

I know that there is a problem with the sub-classing on non-English version of Windows but I have no way to test those systems.

(If this comment was disrespectful, please report it.)

 
9/25/2008 2:15:05 AMThe typist

The problem exists when you use a regional setting that require the sub-classing to be unicode aware. Like for example when using Indonesian regional settings.
When using standard regional

Morgan:

Have a look at Unicode ucComboBoxEx for an implementation that solves this problem.
http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=66273&ln gWId=1


(If this comment was disrespectful, please report it.)

 
9/26/2008 4:23:32 AMKeleBack

Hi ppl..
Yes the crush problem absolutely depends on regional settings. When I change from Turkish to English it works. Morgan; you can fire error by just changing your regional settings to any other than English. So you dont need a non-English version of OS.
Best regards..
(If this comment was disrespectful, please report it.)

 
9/26/2008 7:09:07 AMMirko Kressmann

I have a project where i use your control for a pagewise showing of the data (like on ebay, 16 Rows per page). The higth of the control endet under the last row. In this case all rows are visible, but when i load the data of the first page, the vertikal scrollbar shows. When i changed the marked row 3 times the scrollbar disapears (and never shows for this session, this is also true for selecting next page etc.)
The size of the srolling area seems to be rowcount+1 at first time. It would be nice , to fix this. Thank you very much.
(If this comment was disrespectful, please report it.)

 
10/8/2008 5:14:38 AMRojalde Arintok

i downloaded i like the form1 screenshot i looking for that kind of property but i cant find that sample in the zip file.
(If this comment was disrespectful, please report it.)

 
10/15/2008 5:39:15 AMJuned Chhipa

When AllowColumnsort is set to False, AllowColomnHover don't works.
When AllowColumnsort is set to True, Columnhover works.
Please fix this minor problem.
Otherwise, the control is fabulous.
Thank you
(If this comment was disrespectful, please report it.)

 
10/15/2008 5:53:17 AMJuned Chhipa

It's so fast.....
Excellent work
(If this comment was disrespectful, please report it.)

 
10/21/2008 5:33:53 PMAAM

It's great if you add print option, 5 from me
(If this comment was disrespectful, please report it.)

 
10/22/2008 11:41:59 PMHennyere

Hello,
This Grid is very nice!
Grid with a ProgressBar
.AddColumn "Progress"

Don't works property... Bar's updates incorrect!

ThankYou
(If this comment was disrespectful, please report it.)

 
10/29/2008 8:10:52 PMqyasn

support Ctrl+C & V?
(If this comment was disrespectful, please report it.)

 
10/30/2008 8:21:00 AMHennyere

Run-Time error '7' out of memory if you set:

For lCount = 1 To 150000

To add items
(If this comment was disrespectful, please report it.)

 
11/4/2008 8:54:22 AMvietteiv

nice grid
you should add event stretchLastColumnToFit (like vbAccelerator S-Grid Control - http://vbaccelerator.com)


(If this comment was disrespectful, please report it.)

 
11/10/2008 3:09:27 AMRojalde Arintok

how can i load entries from the database using the grouped rows i having problem with the rowdata
(If this comment was disrespectful, please report it.)

 
11/14/2008 5:58:40 PMAAM

It's great if you add print option
(If this comment was disrespectful, please report it.)

 
11/15/2008 12:48:02 PMLorin

have you implemented OLEDrag and OLEDrop?
(If this comment was disrespectful, please report it.)

 
11/15/2008 3:51:14 PMDriss HANIB

very nice grid.
But there is a little problem. When you use the GroupRow, the sorting doesn't work well : it would be intersting to sort inside the groups.

(If this comment was disrespectful, please report it.)

 
11/20/2008 3:45:14 PMMorgan Haueisen

* Grid printing is handled by Exporting the grid data to a csv file and using a third party software application (like Excel) to print. I started to add printing capibilities to the control but the code to produce a deacent print was larger then the control itself. There are too many variables to handle (column and text widths, font sizes, paper sizes, how to handle printing beyond the paper's margens, etc.)

* Row grouping is just the ability to hide rows. How it works is handled outside of the control (see the demos); therefore you can not allow column sorting and expect the "grouped" rows to stay together.
(If this comment was disrespectful, please report it.)

 
11/20/2008 3:54:07 PMMorgan Haueisen

Hennyere: How many columns were in the 150000 rows? Why would you even add that many rows to a grid? It is too much for any user to search through. In any case, this is not a control problem; adding more memory to your PC will fix your problem.

(If this comment was disrespectful, please report it.)

 
11/26/2008 4:48:48 AMMarco Lacera

FANTASTIC!!
CONGRATULATIONS!
(If this comment was disrespectful, please report it.)

 
11/26/2008 5:17:00 AMToddB-USN

Morgan, I too would like the printing feature much like I have in DBGrid. What about using one of the many code sources here on the planet for print preview engines and incorpotating that into the Lynx grid? It would save you a lot of coding.. Printing from the grid is much more needed in that many people do not use Excel or possibly need external apps. And we would have to insure something like that were installed so someone could print... With build in printing that problem goes away..

The second point is yes you can have 150000 rows also easily! :-)

I am using the grid in a law enforcement dispatching software package. Between officer reports, call logs, incident reports, use of force reports and dispatching center logs we easily get that many records for a given month. Many times we will have to search all records for court information etc and so calling up all records and logs for a period of time can lead to large amounts of data...

(If this comment was disrespectful, please report it.)

 
11/26/2008 11:04:26 AMMarco Lacera

I am needing to build a research for this GRID!
Would anybody have an example?
(If this comment was disrespectful, please report it.)

 
11/26/2008 11:44:36 AMMorgan Haueisen

I included as example of someone's attempt at grid printing (see Print_and_2066795212007). I have used several professional grid ActiveX controls in the past and have never been satisfied with the result. Most are used as a way to dump the data to a printer. There are too many variables to consider and too many options you would need to give the user in order to produce a decent printout of the grid data. I started to add printing but the amount of code to do this was enormous; more that twice that of the control itself (and it was not even complete). This adds a lot of overhead that would be seldom used.
(If this comment was disrespectful, please report it.)

 
11/26/2008 11:44:53 AMMorgan Haueisen

I don’t agree that you should ever fill any grid with 150,000 rows. Grids should be used to display meaningful information to the user. A grid with 150,000 rows is not useful; it is just data overload. You should filter the data to something manageable before you present it to the user. Even querying a SQL database that returned 150,000 rows would probably return a Timeout error.
(If this comment was disrespectful, please report it.)

 
12/4/2008 9:48:16 AMmarshalfaulkner

Excel 2002 has a limit of 65,536 rows. Results should be filtered. Users shouldn't look through 150,000 rows for information. Congrats, on the regional settings fix!
(If this comment was disrespectful, please report it.)

 
12/6/2008 10:09:40 AMMauricio Cunha

I change the method AddItem because the default method did crashes on simply load the samples...

SetFlag mItems(mRowPtr(mRowCount)).Cell(lCol).nFlags, lgFLChecked, IIf(sText(lCount) <> "", True, False)
(If this comment was disrespectful, please report it.)

 
12/8/2008 11:44:49 PMJuned Chhipa

Thanks for the update.
As always, excellent!
(If this comment was disrespectful, please report it.)

 
12/9/2008 3:26:03 AMRojalde Arintok

Morgan sample for loading the boys and girls in LynxGrid from Database table
(If this comment was disrespectful, please report it.)

 
12/14/2008 10:31:30 AMmangcikVB

NICE work,
good job,
welldone,
keep update, ok?
(If this comment was disrespectful, please report it.)

 
12/17/2008 6:17:10 AMJuned Chhipa

I dont know why other people are facing so many problems??

I 've used it in my project, and everything s working very fyn.

Thanks Morgan
Keep updating this nice project
(If this comment was disrespectful, please report it.)

 
12/22/2008 5:11:59 PMAmacedo

Hi Morgan, great job dude, i found a bug, but the way to solve too, if you try to change rowforecolor or rowbackcolor or any related to calling ApplyCellFormat if you have been sorted by another column then the format is not applied to the correct row, if guess because in applycellformat the line nIndex = mItems(vRow).Cell(vCol).nFormat should use the pointer as all others cell related properties, so i change the line to nIndex = mItems(mRowPtr(vRow)).Cell(vCol).nFormat and then all work fine, just include in the next update. Greetings!!!
(If this comment was disrespectful, please report it.)

 
12/31/2008 1:27:40 AMsmartstar

Hello Friends, great idea!!!

Any body can figure out how to bind lynxgrid in lynixgrid as combobox. My purpose is to bind a combobox which is MULTICOLUMN. as there is no any good multicolumn combo, so i thought it will be good idea to somehow link the another lynxgrid to any combo control which we can bind to any column and when user will drop down the combo, that another hidden grid should pop up on right place, so it will look like a multicolumn combo. Please advice! i really need to make it work. Please let me know if there is any substitute of it. if some body have example code, please mail me at smartstar@coolgoose.com

thanks
(If this comment was disrespectful, please report it.)

 
1/17/2009 12:45:59 PMPurshotam K Hotwani

Hi Morgan,
There is something seriously wrong with the BindControl particularly with the date, please observe carefully between your second last and last posting.
(If this comment was disrespectful, please report it.)

 
2/13/2009 8:22:38 PMHennyere

Hello,

Bug in RowType = progressbar when bar's update

Please change this line:
lValue = ((mCols(mColPtr(lCol)).lWidth - 2) / 100) * mItems(mRowPtr(lRow)).Cell(mColPtr(lCol)).nFlags

TO:
lValue = ((mCols(mColPtr(lCol)).lWidth - 2) / 100) * Me.CellValue(lRow, lCol)

Thanks!
(If this comment was disrespectful, please report it.)

 
2/16/2009 10:55:28 AMMorgan Haueisen

Hennyere,
It is not a bug.
CellValue and CellText share the same string variable; the only difference is that CellValue converts the string into a numeric value for you.
The progress bar value (0 to 100) is set using CellProgressValue which is stored in mItems(mRowPtr(lRow)).Cell(mColPtr(lCol)).nFlags
If I made the change you requested, then you would not be able to have text on the progress bar. Check out the demo included in frmFormatting.
(If this comment was disrespectful, please report it.)

 
2/18/2009 7:29:13 PMHennyere

Hello,

I found a bug in Scroll event. Please select any row on list and try to use scroll of your mouse to reproduce this error

Thanks
(If this comment was disrespectful, please report it.)

 
3/2/2009 7:16:26 AMHennyere

Hello,

I found a bug in Scrool Event of mouse. Please populate a grid and click on a cell. After try to use scroll of your mouse

ThankYou
(If this comment was disrespectful, please report it.)

 
3/9/2009 10:09:07 AMMorgan Haueisen

This must be a problem with your machine. None of the known 200+ users of this grid are having the problem you describe.
(If this comment was disrespectful, please report it.)

 
3/20/2009 11:46:47 AMim a beginner

Its found that you are using vb in vista.. dont you get some errors with MS Felx grid and Common dialog control?
(If this comment was disrespectful, please report it.)

 
4/13/2009 12:30:49 AMLorin

LynxGrid needs to more than just a pretty face. As it stands it does not perform well. Add 50,000 entries (mod the code). See how long it takes to add these. This is Ok but could be better. Now for the really bad part. Sort on one of the columns. The grid locks up and the form becomes immovable and locked until the sort is completed. This is a real world number and really not very large at all. Adding DoEvents in the sort subs just makes it worse since the grid will now accept other inputs. The grid should be locked during the sort. Anyway, real world grid it is not yet but all this can be done.
(If this comment was disrespectful, please report it.)

 
4/13/2009 9:57:52 AMMorgan Haueisen

We are dealing with VB here. The speed of the sort is influenced by the number cells (rows * columns) in the grid; the more cells the longer the sort. As I have said before, Grids should be used to display meaningful information to the user. A grid with 50,000 rows is not useful; it is just data overload. You should filter the data to something manageable before you present it to the user. If you need speed and have a large number of cells, then you need to use a commercial product or write your own in C, not VB.
(If this comment was disrespectful, please report it.)

 
4/15/2009 10:10:19 AMmarshalfaulkner

That print class is massive, thanks for sharing.
Lorin, your definition of "real world grid" is bad.
(If this comment was disrespectful, please report it.)

 
4/16/2009 11:16:02 AMrishal

lorin is yours user realy want lookup 50.000 row at the time . come on, get a real. morgan thanks for the update. please keep update.
(If this comment was disrespectful, please report it.)

 
5/5/2009 4:14:56 AMRojalde Arintok

Hello

I just want to see a sample with paging like the first page 1-50 rows of data then the second page 51-100, Thanks

Love this control, it improve my programming design.
(If this comment was disrespectful, please report it.)

 
5/6/2009 1:19:27 AMvietteiv

i love this control so much. thanks for updated.
Morgan Haueisen, can u do print unicode character in demo-printing project?

(If this comment was disrespectful, please report it.)

 
5/9/2009 3:08:23 AMlupetalo

can you make it virtual, so its load only viewable portion of data. rest of data load on scroll or select.
its very slow on more than 10000 items at once. on site is a 'virtual grid' code, something like that.
(If this comment was disrespectful, please report it.)

 
5/11/2009 1:35:23 AMAnil

hello, how to upgrade the updated lynxGrid in vb project which is using old ver lynxGrid.
(If this comment was disrespectful, please report it.)

 
5/11/2009 3:27:06 AMUmberto

Great job! i like it very much.
Just one bug to fix: changing whole grid .font at runtime wont work. Please fix.
Best for me if there is the possibility to set HeaderFont and GridFont separately.
(If this comment was disrespectful, please report it.)

 
5/12/2009 4:02:08 AMUmberto

Hi Morgan and thanks for the reply.
I wil check the FormatCells sub today.
One more request: it's possible to add new CellFormat Style type Hyperlink (underline Font and Hand mouse cursor). This will help so much adding cells with links to documents. Clicking on it will fire a CellHyperlink_click event where the user can fully control the shell process.
Thanks
(If this comment was disrespectful, please report it.)

 
5/15/2009 10:44:46 AMBob

This is a great control for me. Those who have 50,000 or 150,000 records to load and sort must have a budget large enough to pay for a custom program for their work. This is the VB world.
(If this comment was disrespectful, please report it.)

 
5/17/2009 5:06:29 AMvietteiv

Hi morgan
pls check bug when u unload form, a msgbox appear:Client site not available at HandCursorVisible Property
(If this comment was disrespectful, please report it.)

 
5/19/2009 2:40:17 AMccbfrank@sina.com.cn

how to merge cell?
(If this comment was disrespectful, please report it.)

 
5/28/2009 10:40:03 AMMaster_Coder

Morgan, Great work on a great project started by Richard.

I do have one suggestion for a small problem. Take this as an example, when you are editing a cell and the user selects "Save" for example while still in the EDIT mode, the control doesn't save the modified information. What I did was simply make the "UPDATECELL" function public, so I could call it prior to executing the code to save the spreadsheet. Just a suggestion. :)
(If this comment was disrespectful, please report it.)

 
6/1/2009 2:29:14 AMWindows VLx - Veli Kayikçi

Wooooowwwwwww You Are Wanderfull :)
This is great jop.
(If this comment was disrespectful, please report it.)

 
6/8/2009 8:24:56 AMJucko13

I have a big problem... when i add a colum type:Progressbar and editable column. everything go's right but when i edit the text in the progressbar cell, it change the value of the progressbar to +- 10%, but when i edit again and typ the same text again, it change the value back to 0. I was trying to fix it but it doesn't work.

btw. nice work! one of the best usercontrols ever!!!
(If this comment was disrespectful, please report it.)

 
6/10/2009 3:41:14 AMUmberto

Hi Morgan, all your new features works fine, thanks. I found a big problem running compiled exe: my program freeze loading forms( but compiled demo works fine).. debugging code i verified that calling SetScrollBars sub whit no rows defined cause infinite loop. I tried changing all calling with "If mRowCount > 0 Then Call SetScrollBars" and now works for me. Can you check/update your source code?
(If this comment was disrespectful, please report it.)

 
6/10/2009 7:24:50 AMsmartstar

Hi Morgan,

Pls assist me how to get total of any column in a variable.
I want to get total upon AfterEdit in a variable. Pls reply back. thanks
(If this comment was disrespectful, please report it.)

 
6/17/2009 1:51:57 AMEnegede

when was this version posted as you said it was abandoned
(If this comment was disrespectful, please report it.)

 
6/22/2009 2:49:44 AMrick

Works for me which is more than I can say for S-Grid. A lot of effort has gone into this.

Don't suppose you could get it to work with a form resizer (specifically ResizeXtra by Evova Technology www.evova.com) - thanks
(If this comment was disrespectful, please report it.)

 
6/22/2009 7:48:35 AMMorgan Haueisen

Enegede, Read the control header and history log.
(If this comment was disrespectful, please report it.)

 
6/22/2009 9:05:31 AMMorgan Haueisen

Rick, The control has all of the resizing properties.
I did not have, nor am I going to install, ResizeXtra. I can only assume that it needs the control's window handle to do the resizing.

The grid control does not have a public hWnd but you could add it by inserting the following code.

Public Property Get hWnd() As Long
hWnd = UserControl.hWnd
End Property
Hope this helps.
(If this comment was disrespectful, please report it.)

 
7/12/2009 7:02:23 PMKoushik Shee

Hi Morgan,

Thanks a lot for sharing the great code.
However, I am getting the following issues when developing a wrapper control with some action buttons, toolbar and the LynxGrid.

1. Even the "AllowColumnSort" is true, when I run my control, columns are not sorting when click on the header(sorting icon at the column level are also not appearing).

2. If we set rowImages then the imagebox is being drawn, however the images are not appearing. I debug the LynxGrid code and verified that
moImageList.ListImages().Draw is being executed from the DrawGrid for the cell 0, also verified that the imageList and image is valid by printing the image using
Printer.PaintPicture method.

When I use LynxGrid directly in a form, its working fine, but facing the above issues only when I use the LynxGrid control within another control.
I will be thankful if you can please help me or let me know if I am missing something.

Koushik
(If this comment was disrespectful, please report it.)

 
7/12/2009 7:05:57 PMKoushik Shee

Hi Morgan,

Thanks a lot for sharing the great code.
However, I am getting the following issues when developing a wrapper control with some action buttons, toolbar and the LynxGrid.

1. Even the "AllowColumnSort" is true, when I run my control, columns are not sorting when click on the header(sorting icon at the column level are also not appearing).

2. If we set rowImages then the imagebox is being drawn, however the images are not appearing. I debug the LynxGrid code and verified that
moImageList.ListImages().Draw is being executed from the DrawGrid for the cell 0, also verified that the imageList and image is valid by printing the image using
Printer.PaintPicture method.

When I use LynxGrid directly in a form, its working fine, but facing the above issues only when I use the LynxGrid control within another control.
I will be thankful if you can please help me or let me know if I am missing something.

Koushik
(If this comment was disrespectful, please report it.)

 
7/27/2009 8:06:55 AMPaul Turcksin

Morgan, found a bug ;) CellImage puts images in wrong spot when the grid is sorted (on other column): It puts the image on the spot where the item would have been located if not sorted. I made a small program demonstrating the behavior and can send it if you want it. Thanks.
(If this comment was disrespectful, please report it.)

 
7/28/2009 8:25:53 PMPaul Turcksin

Sorry Morgan, I screwed up! Using the latest version doesn't show the behavior I experienced. Thanks for your help.
(If this comment was disrespectful, please report it.)

 
8/2/2009 6:38:27 AMthebrake

sir, we have a raffle in our church, can you create a program for charity that will be able to create a booklet number and ticket number database using this lynxgrid.. and having client name and the solicitor... thank you...
(If this comment was disrespectful, please report it.)

 
8/2/2009 8:23:34 AMHennyere

Hello,

ColForceFit don't works if scalemode sets to value different of 1

Sorry my bad english!
(If this comment was disrespectful, please report it.)

 
8/7/2009 4:08:45 AMTom Moran

Hi Morgan. Great job on the Lynx Grid. One problem... After populating the Grid if I attempt to add an additional column I'm getting an subscript out of range error. It adds the column, however if I click on any cell in the new column I get the subscript out of range error. Am I doing something wrong?
(If this comment was disrespectful, please report it.)

 
8/12/2009 11:44:30 AMMorgan Haueisen

Tom, that is one I did not think of. I added the ability to add columns after the grid is filled with data.
(If this comment was disrespectful, please report it.)

 
8/14/2009 5:58:00 AMhuvulu

Great Grid!
However, I have one problem! I can't use the "Word Wrap".
I set:
"AllowWordWrap" = True
"MaxLineCount" = 0
for the LynxGrid and I added a "True" in the column definition:
.AddColumn "Info", 3200, , , , , , True

However, the if the text is longer than the column, its still indicated by "..."

What do I wrong ??? Anyone can help please!!! THANKS!

(If this comment was disrespectful, please report it.)

 
8/14/2009 9:04:02 AMMorgan Haueisen

huvulu, set DisplayEllipsis=False
(If this comment was disrespectful, please report it.)

 
8/17/2009 2:33:17 PMhuvulu

Just for info:
This was fixed with V2.16.3a

Many thanks for great email support, Morgan!


(If this comment was disrespectful, please report it.)

 
8/18/2009 5:39:33 AMjohn

Can LynxGrid merge cells just like MSHFlexGrid? Thanks a lot.
(If this comment was disrespectful, please report it.)

 
8/19/2009 3:21:15 AMErwin Christiaens


'Can you import this RaiseEvent BeforeDrawText into the grid
Now i need paste it every time into the grid
I use this event to fill a datapicker from (b8 GS - Grading System) program

'Added by: Erwin Christiaens
Public Event BeforeDrawText(Row As Long, Col As Long, ByRef sNewValue As String)



'// format text if necessary
If LenB(mCols(mColPtr(lCol)).sFormat) Then
sText = Format$(.sValue, mCols(mColPtr(lCol)).sFormat)
Else
sText = .sValue
End If

'added by: Erwin Christiaens op 15/08/2009
RaiseEvent BeforeDrawText((mRowPtr(lRow)), mColPtr(lCol), sText)
.sValue = sText

Thx
(If this comment was disrespectful, please report it.)

 
8/20/2009 5:22:11 PMHeriberto Mantilla Santamaria

Is gr8 to see this code don't die, is an amazing usercontrol.
(If this comment was disrespectful, please report it.)

 
8/21/2009 3:11:38 PMAmacedo

Hi Morgan, great job dude, please, i need that you check RowColSet and ForceCellEdit, if you change the orders of the columns, not only one col, try 3 or 4 col´s moves, then try to call RowColSet or ForceCellEdit, then the selected or Edited col is wrong, please, help!!!

Greattings for your great Job!!!

amacedo
(If this comment was disrespectful, please report it.)

 
9/20/2009 3:57:02 PMJorgen Levesen

Hi Morgan,
as usual a nice piece of work. 5 stars from me.
Got a small problem though, I can not figure out how to add a new row. Was it possible for you to explain ?
Kind regards
(If this comment was disrespectful, please report it.)

 
9/21/2009 2:06:57 PMJorgen Levesen

thanks for the repply Morgan, but I did figure out progamatically to add a row, what I could not figure out was how the user could add one. Finally I tried the Keyboard Insert-key, and that did the trick.
Another problem I have is resizing the control when the rest of the screen resize. If it is placed in another container (fx a frame), the container will not resize properly.
Any ideas anyone ?
(If this comment was disrespectful, please report it.)

 
9/28/2009 8:14:38 AMMarco Lacera

FILTER

If the user Filters "LARA", and soon later tries to only filter "L", no there is any alteration in the list!

Observation:
In my opinion each column should have the native research in GRATING!

Example:
Then under the header of DRID, a line could exist with the fields that correspond to each column and in this the user to accomplish researches for each column.
(If this comment was disrespectful, please report it.)

 
9/28/2009 4:11:05 PMMorgan Haueisen

Marco, The filter is made to built on the previous search. If you want to search for "L" after you search for "LARA" then you need to clear the first filter first.
(If this comment was disrespectful, please report it.)

 
10/2/2009 1:22:04 PMNigel

Morgan, super job!

Are there print_preview and print functions available for this control, with and without a menu-bar and with the gridlines = false?

Thanks!
(If this comment was disrespectful, please report it.)

 
10/6/2009 12:19:23 AMarchie

hi Morgan. How to use the tab key to move the cells.?because it only accepts the navigation key.

thank you for giving time.
(If this comment was disrespectful, please report it.)

 
10/6/2009 12:17:56 PMMorgan Haueisen

Archie, VB6 uses the Tab to move the focus to another control. Therefore you can not use the Tab key to move cells.
(If this comment was disrespectful, please report it.)

 
10/8/2009 12:34:30 AMarchie

Hi Morgan:

Thank you for emmediate response about tabbing.

My last question is, can i identify thos rows that only contains data.?Example, i have added 50 rows but only 10 of those rows contains data and some of the data is posted in row(50),row(5) etc. total count data is only 10 for 50 rows added.

Can i identify those data and save it into database or to array()?

Thank you for giving time and thank you for this grid.
(If this comment was disrespectful, please report it.)

 
10/12/2009 9:01:19 PMvietteiv

Archie, this lynxgrid can do all of your questions.
ex: use .celltext(row,col) to add data to identify row (col)

(If this comment was disrespectful, please report it.)

 
10/13/2009 4:30:29 PMmarshalfaulkner

It is possible to use the tab key, but can get messy. First set TabStop=False for all controls on the form. Then...
Private Sub gridDisplayInfo_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 9 Then
editNextCell Shift
End If
End Sub

Private Sub editNextCell(Shift As Integer)
...determine were to go
.ForceCellEdit newRow, newCol
End Sub
(If this comment was disrespectful, please report it.)

 
10/14/2009 2:25:02 PMJR

Question, it seems like I can only compile my projects as P-Code. If I use NativeCode, my application will hang trying to load a form with the LynxGrid on it.. Is this a known issue? (This happens with the demo project that's supplied as well, if you try compiling it using Ncode... or at least on my computer)
(If this comment was disrespectful, please report it.)

 
10/20/2009 12:26:29 AMarchie

Hi Morgan:

I am having problem regarding to get the sum of all row value in column 1. It does not add all the values.I code it like this in afteredit event:


dim totalsum as long

with lynxgrid
select case col
case 0
case 1
for counter=0 to .itemcount-1
totalsum=val(totalsum)+ val(.cellvalue(counter,1)
next
end select
end with
msgbox totalsum

Thank you for giving time with this.thank you for the grid.




(If this comment was disrespectful, please report it.)

 
10/20/2009 9:06:19 AMMorgan Haueisen

archie,
In AfterEdit, the last cell changed is not updated in the cell field until after the AfterEdit sub is complete. The editied value is in vNewValue and transferred to the Cell if the Cancel is not set to True.

You need do do something like:

Private Sub LynxGrid1_AfterEdit(ByVal Row As Long, ByVal Col As Long, vNewValue As String, Cancel As Boolean)
Dim lRow As Long
Dim dValue As Double

With LynxGrid1
For lRow = 0 To .Rows - 1
If Row = lRow then
dValue = dValue + vNewValue
Else
dValue = dValue + .CellValue(lRow, 7)
End If
Next lRow
End With

MsgBox "Total = " & Format$(dValue, "$#,0.00")
End Sub

(If this comment was disrespectful, please report it.)

 
10/22/2009 4:59:16 PMMarco Lacera

I need to obtain the caption and I number of the column, that was ordered!
How to proceed?
(If this comment was disrespectful, please report it.)

 
10/25/2009 10:52:53 AMbwired

Hi
Great grid
Why is the LynxGrid1_AfterEdit not triggered when I alter the cells form within the program. So data comes in enad loops through the grid updating some records and changing some of them.
Would be nice when an event is triggered then also.
Please advise.

And looks like the grid uses dome more CPU time the other gris like farpoint etc, like 8 times more, not that much but the less cpu the better.
But overall of cource 5 stars!!
(If this comment was disrespectful, please report it.)

 
10/26/2009 4:45:45 PMhuvulu

Hi,
is there an easy way to check if the mouse pointer is over a grid incl. the scrollbar?
TNX!
(If this comment was disrespectful, please report it.)

 
10/27/2009 12:24:35 PMMorgan Haueisen

bwired,
Trigger events are there so you know when the user is doing something like editing a cell. If you are editing a cell in the code of the application then there is no need to raise an event to notify you that the cell was edited; you already know. You would not want to raise the AfterEdit event every time you edit a cell in code, especially if you are changing multiple cells at a time. This would have a negative impact on the grids response time.
(If this comment was disrespectful, please report it.)

 
10/29/2009 9:37:49 AMvaggelis

Excellent!!! but... when i click on a row, then scrolls too slowly.. If try to scroll with the Scrollbar (After form's Show) without click on the grid all is good!!!
(If this comment was disrespectful, please report it.)

 
11/4/2009 12:37:25 AMarchie

Hi Morgan

I just want to ask a little problem because when i clear a certain cell, it leaves 0 on a cell. Is their another way to clear a cell just like a fresh/blank cell? I use this code to clear the cell but it leaves 0 value.

lynxgrid1.celltext(1,1)=""

Thank you for this grid.Thank you for giving time of this post.



(If this comment was disrespectful, please report it.)

 
11/4/2009 3:19:04 AMWindows VLx - Veli Kayikçi

Hi Morgan Haueisen,
This grid is great but there is a problem in the grid.
When I selected a row, it works very slowly ? why do you know ?
please help... because I did a program with this grid. if you want to see it, look at here = http://img8.imageshack.us/img8/4068/venue2010.jpg

(If this comment was disrespectful, please report it.)

 
11/5/2009 9:46:34 AMMorgan Haueisen

archie,
If the cell type is numeric then setting CellText(?,?)="" is the same as CellValue(?,?)=0. If you want the cell to be blank then you need to change the cell type to string.

(If this comment was disrespectful, please report it.)

 
11/5/2009 10:24:47 AMbrandon

stretch last column to fit? is it possible..
(If this comment was disrespectful, please report it.)

 
11/6/2009 8:24:24 AMMorgan Haueisen

brandon,
With LynxGrid1
.AddColumn "Last", .VisibleWidth-(Total width of all the columns)
End With

Or

LynxGrid1.ColWidth(?)=LynxGrid1.VisibleWidth-(width of all the columns)

(If this comment was disrespectful, please report it.)

 
11/10/2009 1:17:25 PMhuvulu

Hi,
is it possible to select the text content of the grid and copy it into the windows clipboard without possibility to let the user allow to "edit" the content?
TNX
(If this comment was disrespectful, please report it.)

 
11/14/2009 1:26:56 AMchrl

×îÖ÷ÒªÊÇËÙ¶ÈÌ«ÂýÁË
(If this comment was disrespectful, please report it.)

 
11/16/2009 5:56:35 AMWindows VLx - Veli Kayikçi

Hi Morgan Haueisen again

When I selected a row, it works very slowly, I said.

this problem there is not in your computer, because your computer language is english, but my computer language is turkish, please think other computer language when you write code.
(If this comment was disrespectful, please report it.)

 
11/18/2009 10:43:13 PMarchie

Hi Morgan:

I am having problem regarding resizing all the visible column witdh to fit to the witdh of the grid when it is dynamically resized.

Is it possible to handle this situation.?

thank you for giving time with this post. Thank you for this grid.
(If this comment was disrespectful, please report it.)

 
11/24/2009 2:27:29 PMHennyere

HI,

I found a bug. PLease Try:

LynxGrid1.Redraw = False
LynxGrid1.AllowColumnSort = True
LynxGrid1.AddColumn "A", 2000
LynxGrid1.AddColumn "B", 2000
LynxGrid1.AddColumn "C", 2000
LynxGrid1.AddColumn "D", 2000
Dim nContador1 As Long
Dim nContador2 As Long
nContador2 = 1
For nContador1 = 0 To 10000
LynxGrid1.AddItem nContador1 & vbTab & nContador2 & vbTab & 10 & vbTab & "TEST"
nContador2 = nContador2 + 1
If nContador2 = 4 Then
nContador2 = 1
End If
Next
LynxGrid1.Redraw = True


Click over Column b or c or d to see the bug.

ThankYou for your Help!
(If this comment was disrespectful, please report it.)

 
11/29/2009 10:37:27 PMarchie

hi Morgan. Good day!

I just want to ask if is it possible to mouse scroll or move between cells when the mouse pointer is focus on a combo box/text box that was binded on the grid.

Thank you for giving time. Thank you for this grid.
(If this comment was disrespectful, please report it.)

 
12/11/2009 8:34:10 PMrishal

hi morgan
Nice coutinued Update this lynxGrid control, if not to much can you provide us some feature to support merge columns, i'm try to modified this control so far but won't work. thank a lot for your countless effort.
(If this comment was disrespectful, please report it.)

 
12/12/2009 11:17:47 PMKevin

Hi morgan
This simply great control. I have included this control in my several projests.

I would also like to see merge columns and rows like in MSHFlexGrid.

Thankyou for your continued support on this grid
(If this comment was disrespectful, please report it.)

 
1/2/2010 11:04:14 PMrube

hai
its great control
could you add functionality to bind control to specific row and specific column? i think with those this control would be more valuable.....
(If this comment was disrespectful, please report it.)

 
1/5/2010 2:32:41 PMMarco Lacera

TO ACCUMULATE ORDINATION

I AM HAVING DIFFICULTIES, TO ORDER TWO COLUMNS OR THREE AT THE SAME TIME!
IT WOULD BE COMING WELL, IF IN THE CONTROL OPTION EXISTED, TO ORDER VARIES COLUMNS AT THE SAME TIME!
(If this comment was disrespectful, please report it.)

 
1/24/2010 11:12:55 PMAl Weisenborn

Morgan,

Thank you for your continued support. I use this control for virtually all my applications. I have had to change the subclassing entirely but this is probably a problem with my application and not the control. I am a previous user of S-Grid2 from vbAccelerator and find this superior in every way. I have tried to take the same approach you have taken with LynxGrid with another vbAccelerator control, vbCommandBar, but have failed miserably. Thanks again for clear, concise, elegant and superb coding. I get nothing but compliments on my applications and it is due primarily to the utility of this control.

Best Regards,

Al
(If this comment was disrespectful, please report it.)

 
1/25/2010 8:17:31 AMPurshotam K Hotwani

Thanks man for this wonderful grid, if you can let us add column header Icons that will make this grid control fantabulous ! You can even try the Aero vista looks (Crystal Glass effect)!
(If this comment was disrespectful, please report it.)

 
1/27/2010 2:40:18 AMrube

Nice control.. but please tell me how to remove all column and then create new other column with this control.....
best regard
(If this comment was disrespectful, please report it.)

 
2/25/2010 4:16:11 AMCode Generator

Nice control. But let me know how to use tab key navigation.
(If this comment was disrespectful, please report it.)

 
2/25/2010 4:17:24 AMCode Generator

Nice Control. Can I store time in a seperate column of this grid?
Thanks.
(If this comment was disrespectful, please report it.)

 
3/12/2010 8:41:25 AMPhilippe

Hi Morgan, and many thanks for this magic control !!!
Seems there is a small bug in cell colors when sorting :

Private Sub lxGrid_Click()

With lxGrid
.Redraw = False
.CellText(.Row, .Col) = "ANOTHER TEXT"
.CellBackColor(.Row, .Col) = vbRed
.CellForeColor(.Row, .Col) = vbBlack
.Redraw = True
End With

End Sub

make the selected Cell changing its content, but changes Back- and ForeColor of another Cell of the same Col, if the Sort order is different from the initial Sort (col(0)).
Best regards and sorry for my poor english.
Philippe, FRANCE
(If this comment was disrespectful, please report it.)

 
3/23/2010 9:38:51 AMT.Jackson

Time to merge over to .net mate.
(If this comment was disrespectful, please report it.)

 
3/27/2010 5:03:14 AMT.Jackson

^*^*& 356KB of mildly commented code. You know I always did like Richard -- he had a lot of time for people and he was quite genuine too. Take that as a very big complement Richard, because most people in this world I do not like. I see straight through them.
(If this comment was disrespectful, please report it.)

 
4/27/2010 9:08:14 PMmarshalfaulkner

Not really the place for debates, but VB6 is still where it's at.
(If this comment was disrespectful, please report it.)

 
10/20/2010 6:19:14 AMRojalde Arintok

I have a question how to delete an entry or a row using the checkboxes on every row.

thanks
(If this comment was disrespectful, please report it.)

 
10/23/2010 2:23:41 AMRojalde Arintok

can someone know how to Print Preview the Lynxgrid to this other submisson here of print preview by Leontti A. Ramos M.

RamoSoft PrintPreview Dll

http://pscode.com/vb/scripts/ShowCode.asp?txtCodeId=21431&lngWId=1
(If this comment was disrespectful, please report it.)

 
10/31/2010 2:54:00 AMRojalde Arintok

dim itm as ListItem
'assume you have a RS (recordset) open to your table

for each itm in lvLIST.ListItem
rs.addnew
rs.fields("SERIAL_NUMBER").value=itm.Text
rs.Fields("PRODUCT_NAME").Value=itm.subitems(1)
rs.Fields("PRODUCT_DESC").Value=itm.subitems(2)
'etc
rs.update
next


Please convert this code using LynxGrid Thank you, I really need it
(If this comment was disrespectful, please report it.)

 
11/3/2010 10:05:28 AMmarshalfaulkner

For some reason the sort routine used is a disaster when all of the values are the same.
(If this comment was disrespectful, please report it.)

 
11/4/2010 4:39:06 AMRojalde Arintok

I have a featured to suggest the checkboxes on a rows, there should be a checkbox on the columnheaders to check all the checkboxes when its check, by the user.
(If this comment was disrespectful, please report it.)

 
11/12/2010 11:19:50 AMRob C

Drag & Drop within the Control ?
Can this grid be used to re-order items ?
Say there are items A to H loaded (A in row 1 B in row 2 etc)
Can the user click B row and drag it to between G and H rows ?
(If this comment was disrespectful, please report it.)

 
11/14/2010 7:07:40 AMRob C

I tried this grid for the first time today.
I noticed that the Filter button (in the main example) took nearly 10 seconds to apply the filter, and took about 7 seconds to un-filiter
With the free Sgrid2 we can avoid that looooong delay, by turning off Redraw.
It did not appear to help with Lynxgrid.
However out of curiosity, I tried making it invisible, and it took less than one second to apply a Filter, and then just as quick to un-filter.
Private Sub Command6_Click()
Dim strTemp As String
strTemp = Trim$(InputBox("Filter Last Name Begins With:" & vbNewLine & "(Empty value will restore normal view)"))
LynxGrid1.Visible = False
If LenB(strTemp) Then
LynxGrid1.FilterOn strTemp, 3, lgSMBeginsWith, False
Else
LynxGrid1.FilterOff
End If
LynxGrid1.Visible = True
End Sub

Some may dislike the brief flash.
So this may be food for thought on how to improve the drawing speed (without the flash)
(If this comment was disrespectful, please report it.)

 
11/17/2010 8:45:14 AMRob C

Here is a better solution.
This reduces a 10 second filtering time down to instant. AND THIS HAS NO ANNOYING FLASH
'
Option Explicit

Private Declare Function LockWindowUpdate Lib "user32" (ByVal hWnd As Long) As Long
'
Private Sub Command6_Click()
Dim strTemp As String
strTemp = Trim$(InputBox("Filter Last Name Begins With:" & vbNewLine & "(Empty value will restore normal view)"))
LockWindowUpdate Me.hWnd
If LenB(strTemp) Then
LynxGrid1.FilterOn strTemp, 3, lgSMBeginsWith, False
Else
LynxGrid1.FilterOff
End If
LockWindowUpdate 0
End Sub
(If this comment was disrespectful, please report it.)

 
11/19/2010 1:26:27 PMMorgan Haueisen

Rob C, You could set LynxGrid1.Redraw = False to accomplish the same thing as using LockWindowUpdate.
Remember the demo is just that and is not demonstrate the best way to do things.
(If this comment was disrespectful, please report it.)

 
11/22/2010 3:01:22 PMGoran

Hi, I've been using this awesome grid in almost all of my projects. My problem : unable to use 2 grids on same form - when user opens form and moves mouse over second grid and then unload the form program crashes.Any help?
(If this comment was disrespectful, please report it.)

 
12/18/2010 5:59:04 AMJeffB

I want to use this like a tree control.
Is there a way to use Option Buttons instead of Checkboxes?
(If this comment was disrespectful, please report it.)

 
1/17/2011 8:37:58 PMarchie

hi Morgan!

I just want to ask on how to insert a row between row 19 and row 18 and fill inserted rows with data...?


Thanks for giving time!
(If this comment was disrespectful, please report it.)

 
2/4/2011 11:52:35 AMmarshalfaulkner

If mItems(mRowPtr(lRow)).bVisible Then
in
SetScrollBars

breaks mouse scrolling in some instances with hidden rows
(If this comment was disrespectful, please report it.)

 
3/9/2011 2:59:19 PMGerry

I admit I'm lost. How do I get the lynx grid into my project
(If this comment was disrespectful, please report it.)

 
3/28/2011 6:01:00 AMvu minh

i run this control on window japanese verry slow
(If this comment was disrespectful, please report it.)

 
4/11/2011 4:03:39 AMLothar

Hi Morgan,

I did some modifications I'd like to inform you:
1) Get CellWordWrap returned lgFLFontItalic
2) handling of WordWrap and SingleLine, so you can have two lines in a cell, the first not being wrapped but displayed with ellipses.

Questions: is it possible to merge tow or more cells in one row? I would like to display some text in a fixed row. The text should cover lets say col 4 to 7.

Regards,
Lothar
(If this comment was disrespectful, please report it.)

 
6/2/2011 11:11:20 PMthuy

You can help me edit the code ExportGrid Unicode CSV file?

Thank you for your help
(If this comment was disrespectful, please report it.)

 
6/3/2011 11:48:54 AMMorgan Haueisen

thuy, Just write three bytes at the beginning of CSV file (0xEF 0xBB 0xBF). That makes Excel to display Unicode characters.
(If this comment was disrespectful, please report it.)

 
6/23/2011 2:46:15 AMBrian

Hi morgan, can you please send me to my email Brian40302000@yahoo.com a code on how to delete per colum or whole column on lynx. I want to add it in Clear function. Tnx
(If this comment was disrespectful, please report it.)

 
6/23/2011 3:38:15 PMMorgan Haueisen

You can remove all columns by using ClearAll but you can not delete a single column. It gets to complicated to compress the column arrays (eliminating the hole left by the deleted column). You could just make the column invisible.

(If this comment was disrespectful, please report it.)

 
7/9/2011 11:10:39 AMNanni

Hi Morgan

First of all great job.

I am having problem using .FocusRectMode = lgNone

I get error: name not unique

You have used lgNone also in
lgEditTriggerEnum
lgBorderStyleEnum

I have changed :

Public Enum lgBorderStyleEnum
lgNoBorder = 0
lgSingle = 1
End Enum

Public Enum lgEditTriggerEnum
lgNoTrigger = 0
lgEnterKey = 2
lgF2Key = 4
lgMouseClick = 8
lgMouseDblClick = 16
lgAnyKey = 32
lgAnyF2DblCk = 52
End Enum

Now the error is gone

Regards
Nanni
(If this comment was disrespectful, please report it.)

 
7/12/2011 5:47:55 PMnordex

nice, but waaaaay to slow
(If this comment was disrespectful, please report it.)

 
7/15/2011 2:50:26 AMPurshotam K Hotwani

Hi Morgan ! I have been following this project for years ! I wish I could have given you all the globes ! I have a suggestion, if you could please put in header icons that will look really nice ...
(If this comment was disrespectful, please report it.)

 
7/18/2011 10:07:58 PMClaudio Escobar

>> marshalfaulkne says: "For some reason the sort routine used is a disaster when all of the values are the same."

I can't believe that they never changed the code to sort. It's there from the first version. Try this (copied from a Wikipedia entry!)

(sorry but the text is to large...)
(If this comment was disrespectful, please report it.)

 
7/18/2011 10:08:32 PMClaudio Escobar

Private Sub SortArrayNumeric(ByVal lFirst As Long, ByVal lLast As Long, ByVal lSortColumn As Long, ByVal nSortType As Integer)
Dim i As Long, j As Long, pivot As Double
i = lFirst:j = lLast
pivot = Val(mItems(mRowPtr((i + j) / 2)).Cell(lSortColumn).sValue)
Do
If nSortType = 0 Then
Do While Val(mItems(mRowPtr(i)).Cell(lSortColumn).sValue) > pivot
i = i + 1
Loop
Do While Val(mItems(mRowPtr(j)).Cell(lSortColumn).sValue) < pivot
j = j - 1
Loop
Else
Do While Val(mItems(mRowPtr(i)).Cell(lSortColumn).sValue) < pivot
i = i + 1
Loop
Do While Val(mItems(mRowPtr(j)).Cell(lSortColumn).sValue) > pivot
j = j - 1
Loop
End If
If i <= j Then
SwapLng mRowPtr(i), mRowPtr(j)
i = i + 1
j = j - 1
End If
Loop While i <= j
If lFirst < j Then SortArrayNumeric lFirst, j, lSortColumn, nSortType
If lLast > i Then SortArrayNumeric i, lLast, lSortColumn, nSortType
End Sub
(If this comment was disrespectful, please report it.)

 
7/21/2011 1:50:50 PMDavid M Rice

So far the only problem I have had with the control is running out of memory. It looks like the control works fine if one only uses it to display text, without some of the awesome fancy features.
(If this comment was disrespectful, please report it.)

 
8/3/2011 8:34:53 AMT.Jackson

Gee wiz. Indeed this project has been cycling through for literally many years. Hope you are on someone's payroll or at least getting something for it.
(If this comment was disrespectful, please report it.)

 
8/5/2011 5:13:15 AMLothar

Morgan,
I discovered a problem when using LynxGrid on a multi monitor system: the preview of a cell (holding too much chars) will not be displayed on the same monitor as the grid.

Lothar
(If this comment was disrespectful, please report it.)

 
8/18/2011 5:37:26 AMLothar

Morgan,

I found two other problems with LynGrid.

1) LynxGrid triggers a _RwoColChanged when clicking with the right mousebutton on a row. This is not consistent with normal mousedown behavior. So I have problems to create a context menue on a row other than the selected one.

2) .RowColSet has no effect when .Refresh is False. If you set .Refresh to True a previous .RowColSet is ignored.

Of course I could modify LynxdGrid by my own. However I would prefer that any changes to the grid are available to all users.

Lothar
(If this comment was disrespectful, please report it.)

 
8/18/2011 3:10:35 PMMorgan Haueisen

Lothar,
1.) The row needs to change or you not return the correct row number/information for use with your context menu.
2.) If you set .Redraw = false all redraws of the grid are disabled (this allows for faster updating the grid). If you change the row using the RowColSet, then the result will be visible when .Redraw is set to True.

(If this comment was disrespectful, please report it.)

 
10/1/2011 2:18:06 AMrube

Great Work...
But when sorting column, i get the previous columns shift to left. I think this would be annoying.. make the user to use cursor/mouse to see previous columns.
Please correct this...

I wait for next update..

Regards
(If this comment was disrespectful, please report it.)

 
10/20/2011 7:55:28 PMrube

in wrapping sample, how to move focus after typing some text without mouse, but using keyboard?
(If this comment was disrespectful, please report it.)

 
11/10/2011 1:58:14 PMLothar

Morgan,

are there any plans to implement an OLE drag and drop functionality? E.g. to drag .celltext to an editor or to drag a row to another grid?

Lothar Geyer
(If this comment was disrespectful, please report it.)

 
1/11/2012 9:33:08 PMArchie

anybody has a code for this that supports tab key when moving to each cell?

Thank you!
(If this comment was disrespectful, please report it.)

 
1/13/2012 11:56:36 AMMorgan Haueisen

Archie, To have the Tab key change cells you need to modify Usercontrol.KeyDown event

Add the vbKeyTab in with the vbKeyRight (Case vbKeyRight, vbKeyTab)
(If this comment was disrespectful, please report it.)

 
2/3/2012 3:20:54 AMSyamsul Arifin

We are so difficult to change the Free LynxGrid user CTL to VB .NET. One of the big differences is "Redim Preserve for mCols() array" that ReDim statements can no longer be used to declare array variables in VB .NET. Has anybody success on LynxGrid code convert to VB .NET ?
(If this comment was disrespectful, please report it.)

 
5/22/2012 9:02:12 PMArchie

Hi morgan!

I need to bind a MFC combo box to create multi column but the grid does not show it? Is there a solution?

Thank you!
(If this comment was disrespectful, please report it.)

 
6/16/2012 3:19:24 PMRadioDJ

Hi Morgan.
I have also a question,
Can I on a easy way change the text on the header after I have create the grid.
In my program I have multilanguages and if the user change language I will on a easy way change the columnheader text to the new language.
How??
(If this comment was disrespectful, please report it.)

 
6/19/2012 8:53:42 AMMorgan Haueisen

RadioDJ, The information can be found in the HistoryLog.htm. The answer is ColHeading
(If this comment was disrespectful, please report it.)

 
7/12/2012 2:37:13 PMColinB

This is a great control, nice work Morgan continuing the development.
(If this comment was disrespectful, please report it.)

 
7/21/2012 2:52:34 PMthuy


Hello Morgan Haueisen
He can adjust to it TotalslineShow always on the grid is not (TotalslineShowFooter). In order to look at always see the line of such facilities rather than the end of the Scroll to see the total line.

Thank you
(If this comment was disrespectful, please report it.)

 
7/22/2012 8:17:01 AMMark

Excellent work. Thank you for the control.

Not sure if its a bug or something I have missed, but when sorting via column, after the click has been processed, the grid moves the horizontal scrollbar so that the column clicked is aligned with the left control position. Would be nice for the control to not move the horizontal scrollbar.

Thanks
(If this comment was disrespectful, please report it.)

 
8/3/2012 9:08:27 PMCam

Excellent!!! I will definitely be using this in the future.

I agree with Mark though, it would be an improvement if the column sort did not align the column to the left.
(If this comment was disrespectful, please report it.)

 
8/16/2012 6:28:54 PMMark Bestwick

Mark and Cam: to stop the grid from jumping to the column you click on do the foowing;

In the LynxGrid Control under the procedure "UserControl_MouseUp()"
Search for the code "Call RowColSet(, mMouseDownCol)" and then comment it out of remove that line and that issue will be fixed :D
(If this comment was disrespectful, please report it.)

 
8/22/2012 10:02:00 AMMark Bestwick

as an extra feature would be awesome if it wiould be possible to move rows up and down simply by dragging them :D

(If this comment was disrespectful, please report it.)

 
9/25/2012 5:49:33 PMFotis

great job generally. a big problem for this grid, especially when you want to add many rows, is that redraw slowly when user press keyup, keydown or use mouse whell. If you can fix the code for this will be a amazing grid.
(If this comment was disrespectful, please report it.)

 
2/17/2013 8:54:24 AMHarald Littschwager

ist it possible to count filtered lines and get data from them?
(If this comment was disrespectful, please report it.)

 
5/16/2013 9:49:21 AMm poser

Year 2012 xp subclassing problem is still there . Easy fix (migh disable font update) remove lines with .font in drawgrid and also comment out wm_setfocus wm_killfocus drawdrid calls like sup801 said:
finally I fixed looping WM_KILLFOCUS & WM_SETFOCUS massages.

- Do not use direct related font proptery(ex. "UserControl.FontName" or "UserControl.FontBold" to "UserControl.Font.Name" , "UserControl.Font.Bold")


he is right ;

So, it was the font loading references on drawgrid function causing XP non english regional settings to hang or crash.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.