Important alert: (current site time 7/16/2013 2:35:51 AM EDT)
 

winzip icon

LynxGrid v1.89 (owner-drawn editable grid)

Email
Submitted on: 5/10/2007 6:41:08 AM
By: Richard Mewett 
Level: Intermediate
User Rating: By 103 Users
Compatibility: VB 6.0
Views: 56000
author picture
(About the author)
 
     Added FormatCells method for fast bulk formatting and per cell Fontname properties. Owner-drawn Grid. Features include CheckBoxes, Images, Multi-select, dynamic Column Sorting/Resizing, Cell Formatting (BackColor, ForeColor, FontBold etc), datatype aware sorts, custom sorts, Independent Row Heights, Word Wrap, Column Drag, Cell Images and auto-scrolling (when mouse dragged out of control). A Control Binding System allows external controls to be used for editing Cells (ComboBox, DateTimePicker etc). Supports native XP Themes & emulation of XP/Office XP Themes. Feedback welcome (votes appreciated!) Credits in source for PSC authors who have helped make this possible.

 
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 11 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 Intermediate 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
6/4/2006 9:25:22 AMOption Explicit

Nice control Richard, it was fun to help beta test this! Glad I could also help with the all-important arrow-draw routine :D Have fun with the coming flood of feature requests lol.
(If this comment was disrespectful, please report it.)

 
6/4/2006 11:59:15 AMJeff Mayes

Great Control. May I be the first to make a request? 8) It seems that typing will not go to an entry as in the list box. Can this be implented? I cannot seem to use the mouse scrollwheel, either.... Other than those 2 (minor) things, this is EXACTLY what I was looking for. Thanks, Richard, Thanks, Matt, for beta testing.
(If this comment was disrespectful, please report it.)

 
6/4/2006 12:24:16 PMSteppenwolfe

It is a very nice grid, my 5..
Some suggestions: Why not implement owner drawn/custom headers? By hooking NM_CUSTOMDRAW, and set forecolor/backcolor properties during CDDS_ITEMPREPAINT /or/ implement a completely ownerdrawn header.. in this way you could make grid more customizable and meld with application themes, (email me for example code).
Item add/remove could be improved tremendously. Two possible methods, use a 'virtual' list, (I have this ported to v6 of listview control if you want it, and should be fairly straightforward to build into control), or, implement a user defined collection class..
(If this comment was disrespectful, please report it.)

 
6/4/2006 1:00:55 PMJeff Mayes

Sorry about the scroll not working comment, it works fine, just me screwing up again 8). Still would like to see typing go to the list item. How do you call a column sort from code?
(If this comment was disrespectful, please report it.)

 
6/4/2006 1:46:52 PMCobein

Good job 5* but I have a big problem whit this uc if i select a row then scrolldown/up with the mousewheel and then try to select a row again the selection goes to anywhere.
(If this comment was disrespectful, please report it.)

 
6/4/2006 2:43:29 PMHeriberto Mantilla Santamaria

Hi Richard, excellent beta version.

I have problem with resize the column and when I put the mouse the grid after try to resize grid the mouse in all grid is the resize cursor.
(If this comment was disrespectful, please report it.)

 
6/4/2006 5:03:17 PMRichard Mewett

Thanks guys for your feedback and votes. I am aware that this version needs some fine tuning and will try to fix problems ASAP - nothing like PSC to focus the mind on finishing a project! :)
(If this comment was disrespectful, please report it.)

 
6/4/2006 5:42:35 PMOption Explicit

^ Yeah, thousands of people pointing out your faults tends to motivate you. :D

Anyway, the problem that Heriberto described is the one I told you about but thought my PC must have been glitchy. Apparently it's worth taking a look at after all.


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

 
6/5/2006 7:19:50 AMRichard Mewett

Jeff, I have added the keypress search system. The mouse-pointer sticking as a resize cursor should also be fixed.
(If this comment was disrespectful, please report it.)

 
6/5/2006 7:58:02 AMBeepy

Wow! It's nice to have a VB6 control that makes use of the XP themes, plus feature packed grids are always nice :)
(If this comment was disrespectful, please report it.)

 
6/5/2006 8:59:41 AMTerriTop

Whoa, what a nice bit of code! Thanks for sharing this little GEM! TerriTop
(If this comment was disrespectful, please report it.)

 
6/5/2006 10:00:01 AMPhantom Man

Hi Richard
First of all - well done, your code is excellent.

At a glance there may be few things that you might want to look at:

1) When you double click the header, the selected cell goes into edit mode? Try putting : If mMouseRow > -1 Then .... End If in the ToggleEdit function, this will stop the current cell going into edit mode.

2) After you edit a cell and press enter the control automatically selects the First row instead of the edited cell.

3) The arrow keys (L+R) don't work within the editbox.

4) When the editbox is shown and you press the up or down arrow the edit box should disappear, but it doesn't?

Please keep working on this, it has the potential to be a very good grid component.

Kind regards
Gary

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

 
6/5/2006 11:18:56 AMRichard Mewett

Gary, I can always rely on getting useful feedback from you :) I have posted an update (v1.41) which addreses the issues you mentioned as well as fixing the RTE 9 reported by rm_code.
(If this comment was disrespectful, please report it.)

 
6/5/2006 11:27:50 AMJeff Mayes

Richard, I see the code for the keypress search, but cannot get it working. Is there a property to set before it works? Also, any word on how to do a column sort from code? Thank you.
(If this comment was disrespectful, please report it.)

 
6/5/2006 11:58:26 AMZinzin

5 globes and more if it was possible... Your code and control look professionnal.
do you plan to make it editable with ComboBox and DateTimePicker ?
(If this comment was disrespectful, please report it.)

 
6/5/2006 12:10:18 PMRichard Mewett

Hi Zinzin & thankyou for your comments. My intention is to make it very easy to bind other controls to the grid for editing. The grid has several Events and Properties that allow you to determine Cell Position, stop an edit starting, prevent edits from comitting and know when a row has moved. I will put another sample in the demo to show this. I will not add any custom controls (such as datepicker) directly to the UC because I don't want it to have unneccesary dependencies.
(If this comment was disrespectful, please report it.)

 
6/5/2006 12:20:30 PMLaVolpe

Richard, regarding the date picker: To prevent dependencies, maybe consider building your own. I can see how that can be a big plus for your control. The date picker design may be debated (or customized by individual coders), but the logic behind a date picker is simple enough. The same could be said about a progessbar, up/dn control, image combobox, etc.
(If this comment was disrespectful, please report it.)

 
6/5/2006 2:04:02 PMBroken Arrow

5*s from me!!! you've done a great job man... any idea on integrating the combo box feacher?
(If this comment was disrespectful, please report it.)

 
6/5/2006 3:59:49 PMRiccardo Cohen

Wow very nice code! Very light weight! Only a couple bugs though...
- Do mouse down on a header, hold it and release it on a row: you will see that it selects a row.
- Effects: Do mouse down on header hold it and move out of its area, header doesn't do a button up...
- During header resize, horizontal scrollbar doesn't respond to resizing until mouse is released. Maby you can give it a property to react after mouse is released or something. You added a way to cancel resizing header by clicking right mouse button, but after this mouse left button doesn't release till mouse button is up. Maby you can ad a virtual MouseUp event for Releasing it.
- Set property multiselect to true. Then click one row to select it, Scrol one down and select a f.e. 5 rows below it. You will see that there are more rows selecting without holding CTRL down.
(If this comment was disrespectful, please report it.)

 
6/5/2006 4:00:07 PMRiccardo Cohen

Just some suggestions:
- Public Property Header Height
- Public Property Row Height
- Header Icon/Picture (with variable offset)
- Header resizing when mouse is up, for effects like Split Separator, as seen in Outlook 2003 ListView (I can send you examples).
- Property for Scrolling Lines with MouseScrollButton, now this is 1 row.
- Separate property for each headers/coloumns like Coloum Resizing/Clicking/Moving/etc.
- The possibility to add a coloumn in selecting a row.
- Property to automatically strech last coloumn to fit.
- The ability to use Windows XP icons.

Keep up the good work, love to see this control getting greater then it is now! Btw 5 globes from me!!!
(If this comment was disrespectful, please report it.)

 
6/5/2006 4:56:18 PMPhantom Man

Hi Richard

One I forgot to mention earlier: When you select a row then click on the header to sort. The actual selected row is not kept, rather than keep the selected row It selects the row index.

Does that make sense?
Gary

Well done on the updates, kept them coming.
(If this comment was disrespectful, please report it.)

 
6/5/2006 6:46:38 PMOption Explicit

Riccardo's got his electron microscope out... you're in trouble now Richard ;)
(If this comment was disrespectful, please report it.)

 
6/5/2006 9:16:35 PMHeriberto Mantilla Santamaria

Wow is great to see votes and comments, about this excellent UC.

Richard you can guide you of my poor :)SMGrid control to create a combobox runtime and other simples controls.

Nice update I check out and comment any problem too.

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

 
6/6/2006 4:48:53 AMLight Templer

Hi Richard, great piece of code, ***** of course :-) ! Ownerdrawn, selfcontained, readable code, fast, best subclassing ;-) , credits, good demo: A perfect submission! Suggestions: (*) Check the var types: Use 'longs' instead of 'integers', don't use 'singles' (e.g. as property parameters) and use implicit converion when comparing to 'longs'. (*) When editing a cell the text is jumping one pixel row up (tested on 1154*862 resolution). (*) Supporting themes is fine, but on W2K we like a more modern look, too ;-) (*) A 'extend last colum to right border' feature would be nice to have.
Thx for sharing this and regads - LiTe
(If this comment was disrespectful, please report it.)

 
6/6/2006 8:55:25 AMLight Templer

More after closer look: (*) Descriptions to properties for IDE propgrid when finished ;-) (*) Fixing the bug when deselecting lines in a multiline selection (*) For grids with many lines splitting the sort part into single loops (one for every data type) would give a speed improvement. (*) How about tag properties for colums, rows and cells? Easy to implement by adding variants to udts and some more properties subs. --- btw: This sort with subsort solution is COOL! Never seen before, I like it very much! - LiTe
(If this comment was disrespectful, please report it.)

 
6/6/2006 10:54:01 AMEric O''Sullivan

- double-click on column seperator not resizing column automatically.
- Resize icon needs wider area to come into effect - you currently need it pixel perfect with is tricky at large resolutions (am on 1600x1200)
- multiselect=on, click and drag select while holding Ctrl selects the row for down and up??
- would love to see click-drag column re-order (turned on via property)
- the SortSubList() routine could be speeded up signifigantly using a BinarySearch() instead of cycling through all the items in the grid. Shame to waste the advantage of a sorted list.
- you need a LockDrawing property. Removing SetScrollbars from AddItem speeds it up no end. I suspect other methods will also benifet - especially for large volumns of data.

***** from me - that's good work there. Still some to do, but very good all the same. Almost beats ComponentOne's flexGrid - and will once the bugs are fixed :-)
(If this comment was disrespectful, please report it.)

 
6/6/2006 11:38:43 AMRichard Mewett

LiTe, thanks very much for your very positive feedback. I am glad you like the Sort functionality. I have added Tag properties to Columns & Items. I will also look into adding some emulated Theme support for non XP OS. :)
(If this comment was disrespectful, please report it.)

 
6/6/2006 11:42:21 AMRichard Mewett

Eric, thankyou for your concise comments. I have increased the "hot-spot" area for resizing columns and will look into your suggestion for optimising the Sub-Sort (as well as LiTes suggestion)! I have a Redraw property to lock display updates but it was not preventing scroll-bar updates on AddItem - well spotted.
(If this comment was disrespectful, please report it.)

 
6/6/2006 11:53:14 AMRichard Mewett

It will take a little time for this to become as stable as I want since it needs a fair bit of testing (a lot of tracking and state data is processed) - I appreciate that you are all evaluating it based on what I hope is a good foundation. I will post further updates over intervals of a few days - I don't want to hog the code ticker :(
(If this comment was disrespectful, please report it.)

 
6/6/2006 1:13:17 PMJeff Mayes

As I said, good control, I think you may be underestimating yourself. However, there is no listcount property (mItemCount is private), also no NewIndex property. Unless you are loading from a loop, it makes it difficult to format the row you just added.
(If this comment was disrespectful, please report it.)

 
6/6/2006 1:35:41 PMRichard Mewett

Jeff, I will add a Count property (I honestly thought I had already added a .Rows one!). AddItem returns the new Item Index so you can use that when in a loop.
(If this comment was disrespectful, please report it.)

 
6/6/2006 2:19:10 PMJeff Mayes

Thank you Richard. No removeitem method or equivalent?
(If this comment was disrespectful, please report it.)

 
6/6/2006 2:22:00 PMRichard Mewett

Jeff - you have me again :( LiTe pointed that ommision out to me earlier so it will be in next upload.
(If this comment was disrespectful, please report it.)

 
6/6/2006 3:00:18 PMLaVolpe

Richard, another bug; easy fix. Select row/cell, then double right click on some other row.
(If this comment was disrespectful, please report it.)

 
6/6/2006 4:03:12 PMLaVolpe

Hey buddy, found a way you can use VB's datepicker without adding it to your control. You can include it with your demo so others can see too. Email me.
(If this comment was disrespectful, please report it.)

 
6/6/2006 4:22:43 PMRichard Mewett

^Riccardo - thanks for your feedback. Its been very helpful in fixing behaviour issues. LaVolpe - that sounds very interesting! email on its way... :)
(If this comment was disrespectful, please report it.)

 
6/6/2006 4:59:20 PMCMResources

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

 
6/6/2006 5:05:20 PMJeff Mayes

I reallt do not mean to be a pest.... is anyone else having problems with .CheckBoxes = True when using the control in their own projects? On mine, I cannot get the checkboxes to show, even when using .Redraw = True after.
(If this comment was disrespectful, please report it.)

 
6/6/2006 6:42:35 PMJeff Mayes

Richard, or you going to implement .SmallChange and .LargeChange properties?
(If this comment was disrespectful, please report it.)

 
6/6/2006 8:19:06 PMHeriberto Mantilla Santamaria

Hi Richard, the problem with the resize cols are fixed, the UC is more fast.

I forgot thanks so much for put my name in the credits :),
(If this comment was disrespectful, please report it.)

 
6/10/2006 3:57:12 AMPaul Turcksin

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

 
6/11/2006 2:21:38 AMCodeFester

Its a really nice control and I am pleased to fork over 5 hot and sweating nutz from Texas for your effort... Any hope of making it bindable to a data source? btw, It does not crash for me on XP SP2...
(If this comment was disrespectful, please report it.)

 
6/11/2006 5:48:25 AMRichard Mewett

Thanks Paul & CodeFester. I am working on some major updates at the moment - a new version should appear shortly.
(If this comment was disrespectful, please report it.)

 
6/13/2006 10:55:50 AMGabor Madacs

HI! First and foremost It's absolutely cool! *****+* :-)


But i got the problem too: I have an XP, and the demo is hang in an infinite recoursive calling:

In the DrawGrid method there is a reference to some properties of the UserControl:
> UserControl.FontBold = .lFlags And lgFontBold

and this row is triggering the zSubclass_Proc:

DrawGrid(UserControl.FontBold) -> [non-basic code] -> zSubclass_Proc -> Refresh -> DrawGrid...

infinitely. :(

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

 
6/14/2006 6:31:02 AMRichard Mewett

Hi Gabor, thanks for your comments. I will investigate the XP problem. It works fine on all the XP machines I have (SP1 & SP2) and has been OK on other PSC users XP machines. Maybe an Appearance/Performance setting causes the problem.
(If this comment was disrespectful, please report it.)

 
6/14/2006 6:34:28 AMRichard Mewett

v1.48 has numerous changes - including a system to make attaching other controls (ComboBox, DateTimePicker) much easier. Special thanks to LaVolpe who has suggested numerous enhancements.
(If this comment was disrespectful, please report it.)

 
6/14/2006 8:23:31 AMGabor Madacs

Hide-ous XP bug. :(

I made some debug-print in the Subclass_Proc call:
bBefore = false, bHandled = false, lReturn = 0, lng_hWnd = 1183022, uMsg = 8, wParam = 789810, lParam = 0

The WM_KILLFOCUS event triggers the Refresh sub, what triggers WM_KILLFOCUS.

The compiled .exe also feeds the bug.
(v1.48 hangs too)

For a workaround maybe we can count and lock the refreshes?

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

 
6/14/2006 6:36:56 PMXavierH

Great code. 5 globes. Here's my 2 cents, ADO datasource property set. Requires msado reference.
Public Property Set DataSource(rst As ADODB.Recordset)
Dim rsClone As ADODB.Recordset
Dim L As Long
Dim lRow As Long
Dim sRow As String
If rst Is Nothing Then Exit Property
If rst.State = 0 Then Exit Property
Set rsClone = rst.Clone
'Create the grid
Redraw = False
EditTrigger = lgNone ' no editing
RowHeightMin = 315
'Create the Columns
Clear
Cols = 0 'rsClone.Fields.count - 1
For L = 0 To rsClone.Fields.count - 1
AddColumn rsClone.Fields(L).Name, 1000
Next
' Populate the grid
While Not rsClone.EOF
sRow = ""
For L = 0 To rsClone.Fields.count - 1
sRow = sRow & rsClone.Fields(L).value & m_sDelim
Next
' remove last delim
sRow = Left$(sRow, Len(sRow) - Len(m_sDelim))
lRow = Me.AddItem(sRow)
rsClone.MoveNext
Wend
rsClone.Close
Set rsClone = Nothing
Redraw = True
End Property

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

 
6/14/2006 6:58:58 PMOption Explicit

Richard, if you stand on your hands on even-numbered days of months ending in "Y" (around sunset) and quadruple-left click the header of the penultimate column, the following error message appears:

Error 7493429563
Riccardo Cohen is WATCHING YOUR EVERY MOVE...

Just kidding Riccardo, your thorough debugging is always appreciated by us usercontrollers. This is a nice update Richard!
(If this comment was disrespectful, please report it.)

 
6/14/2006 7:07:49 PMRiccardo Cohen

LOL... Thanks Option Explicit (Matt) ;-)
(If this comment was disrespectful, please report it.)

 
6/14/2006 11:53:09 PMHeriberto Mantilla Santamaria

Hi Richard, I found a little problem, when the grid is clear but have columns headers, you move the mouse for the grid the headers is highlith or dblclick in the any place of the grid the headers put down style, you can check out this part. Comment me if you don't understand me for send you a snap.

Another thing was cool to put Alignment headers independient of columns of grid.

Anyway is an excellent update, I wait another one.
(If this comment was disrespectful, please report it.)

 
6/15/2006 5:27:42 AMRichard Mewett

Thanks to all for the bug reports! Riccardo, I use LockWindowUpdate because the API scrollbars redraw themselves when updating the Max property (even if Visible=False) which causes a nasty flicker as they are displayed and then hidden again. I know LockWindow update has its drawbacks but it is better the the flickering scrollbar IMHO. If I can fix the scrollbar behaviour I will happily remove it!
(If this comment was disrespectful, please report it.)

 
6/20/2006 1:52:45 AMMario Villanueva

Good Work! 5*!
(If this comment was disrespectful, please report it.)

 
6/20/2006 2:40:51 AMxfighter9

nice work. but amd cpu not working. why
(If this comment was disrespectful, please report it.)

 
6/20/2006 3:12:46 AMRichard Mewett

xfighter9, can you explain what is not working?
(If this comment was disrespectful, please report it.)

 
6/20/2006 4:41:23 AMLight Templer

Waoh! Getting better an better!
(If this comment was disrespectful, please report it.)

 
6/20/2006 4:56:12 AMRichard Mewett

Thanks LiTe! I split the sort routine into seperate subs per-datatype as suggested :)
(If this comment was disrespectful, please report it.)

 
6/20/2006 7:12:21 AMStefan Schermer

Great submission, good code, five from me. While testing version 1.50 i found two little problems. Sorting with type lgDate does take much longer than string sorting. sorting string types which have in 6000 rows which have only little different content in column e.g. "aaaa" and "bbbb" causes an stack overflow in string sorting routine.
(If this comment was disrespectful, please report it.)

 
6/20/2006 2:03:27 PMGeo

Crash for me on XP SP2 - 2-3 seconds after start...
(If this comment was disrespectful, please report it.)

 
6/20/2006 2:07:51 PMRichard Mewett

I have tested this several XP machines (most SP2) including Home & Professional Editions. I have not had any problems at all! Unfortunately that does not help much in fixing the problem :( I will try and resolve this ASAP...
(If this comment was disrespectful, please report it.)

 
6/20/2006 3:15:20 PMmarshal

The control is so intuitive and easy to use, thank you
(If this comment was disrespectful, please report it.)

 
6/20/2006 9:02:12 PMZhu JinYong

About Crash:
1.Tested based on XP,SP2,Chinese (PRC) as non-Unicode Language settings
Result: Demo keep flashing and crash.I have to bypass DrawGrid call from
SetFocus/LostFocus events in the subclassing.Grid is very slow showing.
Scrollbar has no XP style.

2.Tested based on XP,SP2,English (US) as non-Unicode Language settings
Result: Demo has no problem and run very fast.Scrollbar is flat without XP style.

Conclusion:
Please contact Paul about Unicode issue with his subclass.(???)
(If this comment was disrespectful, please report it.)

 
6/21/2006 3:04:43 AMRichard Mewett

Thanks very much Zhu - that's exactly the type of feedback I needed for the problem!
(If this comment was disrespectful, please report it.)

 
6/21/2006 3:33:31 AMT Jackson

Meow, *****, I'm currently using an enterprise version of VB5. Great difficulty exists with loading VB6 projects. Especially if they contain user controls. Any suggestions?
(If this comment was disrespectful, please report it.)

 
6/21/2006 8:57:10 AMJeff Mayes

I use a keypress event to detect if the user presses the enter key, which would then select the row. Worked fine in version 1.48, but does not work in version 1.50! Try locating a record by name using the keyboard and pressing the enter key in version 1.50.
(If this comment was disrespectful, please report it.)

 
6/21/2006 11:22:25 AMVorlon

Nice Job Richard! I think this is one of the best self contained lisview controls I have seen. Here are a few things I would love to see in future versions:
- Ability to reorder columns
- Ability to specify 'position' of column header
- access column header position by a Key (just store column headers in a collection)
- Basically mimic ColumnHeader methods - It would be nice to be able to save column header positions between sessions.
I think you can adapt some of the classes from the VBA listview control:
http://www.vbaccelerator.com/home/VB/Code/Controls/ListView/VB6_ListView_Full_Source .asp

Also,
for header notifications:
http://vbnet.mvps.org/index.html?code/subclass/lvheadernotifications.h tm

Thanks!

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

 
6/22/2006 10:07:58 AMLaVolpe

Richard, Zhu may have a valid point about Subclassing. It is possible his system requires use of the W-type APIs (i.e., SetWindowLongW, etc).
(If this comment was disrespectful, please report it.)

 
6/23/2006 3:00:01 AMxfighter9

i dont know not working. but demo run very slow and crash. i dont understand.
(If this comment was disrespectful, please report it.)

 
6/23/2006 4:11:20 PMRichard Mewett

I have created a version with patched subclassing (unicode aware) which hopefully will resolve the XP issue. I have emailed Zhu and await some more feedback...
(If this comment was disrespectful, please report it.)

 
6/23/2006 10:35:47 PMInuya5ha

Any ideas when will the new version with the .Rows property be ready?
I'm fed up with the MSFlexGrid control and started replacing it in my program with yours, but the lack of .Rows makes me impossible to go on with this.

I need it for my most important program so I'll be waiting for next version with great anticipation. Thanks.
(If this comment was disrespectful, please report it.)

 
6/24/2006 12:02:33 AMHeriberto Mantilla Santamaria

I found a little bug Richard, Try to resize the last column of the grid, the select border doesn't resize too to a new width of the column.
(If this comment was disrespectful, please report it.)

 
6/26/2006 11:52:52 AMVlad Vissoultchev

I've been waiting for 3 weeks to test it here -- still no go. Had to comment couple of DrawGrid's in WM_SET/KILLFOCUS -- no idea what're doing to get it in an infitite loop there. First impression: extremely slow; LockWindowUpdate is "flashing" the icons on my desktop (please stop using it at all); I can flip checkboxes on a non-editable grid.

A good start anyway -- hope you find the will to continue this project.

cheers,

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

 
6/26/2006 1:52:34 PMRichard Mewett

Thanks for the feedback Vlad. My Unicode updates to subclassing have not resolved the problem on Zhu's machine so still more work to do on that. I have updated the refresh system to eliminate the LockWindowUpdate call. There are quite a few fixes in latest verion but I am holding off from posting until I resolve the XP issue.
(If this comment was disrespectful, please report it.)

 
6/26/2006 11:55:19 PMInuya5ha

Anyone tested it under Windows 98 or 2000? Is it compatible?
(If this comment was disrespectful, please report it.)

 
6/27/2006 11:56:05 AMLaVolpe

Richard, this is gonna sound terrible because of the tweaks involved.
1. You are using one of Paul's older thunkers. Maybe retrofitting his latest version (txtCodeId=64867) might fix it?
2. Have you considered testing an old-fashioned (bas & subclassing style) vs Paul's thunkers? If it works on XP as designed, maybe the thunking is responsible. If not, then it most likely is something in your code/logic.
P.S. Don't have XP to help. Works on 2K though.
(If this comment was disrespectful, please report it.)

 
6/27/2006 12:29:31 PMmarshal

Works great on 2000

Only obvious issue i noticed on 98 is, cursor disappears on mousemove (reappears on stop)
(If this comment was disrespectful, please report it.)

 
6/30/2006 7:05:37 PM+frei+

Oops!! Overflow error!! Try to add 10000 items. Suggestion: progress bar for inclusion of significant amounts of data.
(If this comment was disrespectful, please report it.)

 
7/9/2006 10:14:05 PMÙ­mega

Richard,
Bugs when u have a single row. The grid is disabled??? I dont know if its just me..

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

 
7/14/2006 1:29:55 PMneurokaotix

I really hope this gets updated again! :) The ability to increase row size for all rows (or even individual rows) by grabbing the tiny line inbetween the rows and dragging would be great. How about full column selection when you click on a column header (instead of a-z sort)? Another great thing would be the little grey boxes with arrows that point at each individual row (ala MS Access) would be another awesome feature.

Thanks you for all the effort you've put into the project, it's been a real life-saver.
(If this comment was disrespectful, please report it.)

 
7/17/2006 2:14:06 AMJohn Manavalan

This is nice work
(If this comment was disrespectful, please report it.)

 
7/25/2006 7:44:06 AMSMSer

Can someone please send me a small project to conect this control to and access db. I can not get the records to show in all collumns all are in the first collumn. Please i am new at this

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

 
7/25/2006 7:40:22 PMMarcos Pedroso

Hi Richard Mewett,

You did a great work in this project. But, I don´t if it is right, when we have a single item (row), the grid didn´t work. Is this disabled???

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

 
7/26/2006 5:29:24 PMMarcos Pedroso

Hi Richard Mewett,

I was testing your example, to know what happened in a single item, and I realize when we have more then one item and I remove a item without click list, it works, but when I have 2 itens, remove one and click list it failed.
In this case, when I click in Remove item, the LynxGrid.Row = -1, but the correct is 0(zero).
The problem I think is in the zSubclass_Proc, Case WM_SETFOCUS, DrawGrid.

I don´t know if I explain well, but, try to test this.

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

 
7/27/2006 3:37:42 AMRob C

I'm a fan of the free sgrid-2 control
My quick look, sees yours is comparing well.
And yours appears to have less dependencies ? (I'm hoping that the Components referenced in your project, are just for the control binding that you mention above. Generally I hate referencing MS external controls, as sure as eggs, they will cause problems when trying to run our programs in future versions of windows.)

The sgrid lacks flexibility in it's Column headers.
I would like ability to control the column header colors, and would also like multi-line OR a Tooltip ability, when mousing over a column header.
Can yours do that ?

Mammoth effort, well done.
5 globes
(If this comment was disrespectful, please report it.)

 
7/27/2006 5:21:41 AMKeleBack

Hi Richard..
There is an interesting situation: This does not work for me! Platform: Win2k srv sp4, vb6 sp6, p4 2.66 1G ram. When I run the code as it is it freezes while drawing other forms but main. I disabled two form loads and it seems working. But when I first click on the grid it freezes again! (same for both ide and exe) (by the way sorry for the bad feedback, I have to say it looks great)
(If this comment was disrespectful, please report it.)

 
7/27/2006 8:46:09 AMBroken Arrow

Don't you think a CellType = Button would have been nice? 5* from me.
(If this comment was disrespectful, please report it.)

 
7/27/2006 1:36:39 PMMike Douglas

OMG! I installed this at a client site and when I ran the app it formatted the machine...then I found out it replicated to the network and formatted everyone elses machine's but not before transmitting all the company's financial data to a hacker site in Zimbabwe. jk...cool code, 5*
(If this comment was disrespectful, please report it.)

 
7/27/2006 2:05:46 PMRichard Mewett

^Mike, you are one of the few people on PSC who raises a smile on my face as I browse feedback. This time I didn't have far to look. :)
(If this comment was disrespectful, please report it.)

 
7/27/2006 5:11:24 PMFuture Sound of Budleigh Salterton

Great control. However, when the grid only has 1 row, it cannot be edited. Keep up the good work.
(If this comment was disrespectful, please report it.)

 
7/28/2006 3:43:15 AMDriss HANIB

Hi Richard
Tested on Win 98 SE. Very good control.
one suggestion : to edit a cell we have to press ENTER Key.
Can you add the ability to edit cell without pressing ENTER key.
A little bug : on your exemple when you select an item (row) and you press on RemoveItem button. This item is removed and no more selection. but if you press another time the removeitem button you can remove the next row, even is there's no row selected.. when item is removed the .row property seems not to be 'null'..
Another bug with the removeitem procedure
When you have selected more than one item, with shift or ctrl key et you try to press RemoveItem button:
- when first buttonpress, only the last item selected is removed. The others keep selected
- when second buttonpress its the item AFTER the last item select which is removed..
anyway I'm waiting for the next release.. ;o))
HTH
Driss (FRANCE)


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

 
7/28/2006 3:48:48 AMDriss HANIB

Another suggestion.
Can you add a combo editing cell option..
Driss
(If this comment was disrespectful, please report it.)

 
7/28/2006 11:56:15 AMIVan

Very Great!!!
*****
(If this comment was disrespectful, please report it.)

 
7/31/2006 8:37:19 AMRichard Mewett

Thanks for all the recent feedback & votes :) I hope to post an update soon to fix some of the bugs that have been reported.
(If this comment was disrespectful, please report it.)

 
8/1/2006 5:14:07 AMJoaquim Aparicio

Very nice code!
It would be great if you could add a merge cells feature
(If this comment was disrespectful, please report it.)

 
8/4/2006 6:01:22 AMMirko Kressmann

Very great Grid Richard. One Request: Is it possible to add multiline-support for the cells? If i add a text with a break (vbcrlf) there a these ugly stripes like in listview (reportmode). In multiline mode the lineheight should be adjustible for every line or automatic (all text visible). This would be great.

5***** from me :-)
(If this comment was disrespectful, please report it.)

 
8/4/2006 6:52:09 AMRichard Mewett

^Jacky, I hope to resolve the "freezing" with next update. Will email you when ready.
(If this comment was disrespectful, please report it.)

 
8/4/2006 6:58:12 AMRichard Mewett

Mirko, thank you for your kind feedback & vote! Secondly I would like to say its a pleasure to have a request from someone like yourself who gives feedback and vote with a feature request - I know many PSC authors (myself included) get no-vote/low-vote along with a feature request with the promise of ***** if we comply. I always intended the grid to have independent row heights and word-wrapping so I will try and add in a future version. :)
(If this comment was disrespectful, please report it.)

 
8/4/2006 11:58:19 AMAndreas Behr

First, wow, nice work. I fell in love with this the second I saw it.

I would like to second Mirko's request. The multiline text cells is something I would really need right now. And hey Richard, your brilliant, you can do such a simple thing, right? ;)

For now I might try it myself, but it always takes some time to understand someone elses code. Although, I added a alternating background color to the rows which was really simple.

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

 
8/4/2006 12:30:28 PMRichard Mewett

Thanks for your comments Andreas. I am working (very intermittently) on v1.60 and hopefully will find time to finish and post soon. I will add Cell wrapping to the To-Do list ;)
(If this comment was disrespectful, please report it.)

 
8/7/2006 5:10:38 AMAndreas Behr

Hi Richard,

I am nearly done with the multiline cells, the way I need them. I just have trouble with the scrollbars, the do not scroll all the way down. Maybe you can give me a pointer on how to extend the range of the scollbars, or where the range is set.
(If this comment was disrespectful, please report it.)

 
8/15/2006 4:34:39 AMRobin

Very nice control!
(If this comment was disrespectful, please report it.)

 
8/16/2006 4:44:38 AMOnlyNeo

Hi Richard...
your lynxgrid is too good..
When your new ver is launching..
Will it lanunch in this month.....

Thanks

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

 
8/16/2006 5:44:08 AMOnlyNeo

Hi Richard,
I've Used your Lynxgrid Its too Good But it would be more good if you add large icons view in lynxgrid like http://www.sendspace.com/file/w49bk5
And Chkecboxes XP Style like http://www.sendspace.com/file/v08rzw
And Last important thing tootip adder for any item......
Please check these jpg files on link

Thanks

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

 
8/25/2006 4:17:17 AMRobin

Great control!

But I am missing an easy way to keep track of a changed/edited cell (dirty flag or cell tag)!
(If this comment was disrespectful, please report it.)

 
9/4/2006 7:57:29 PMArvind Parmar

its excellent grid but i want one help from u that can i view u r grid in report format by which i can send to printer also kindly send some solution if possible
(If this comment was disrespectful, please report it.)

 
9/6/2006 7:19:26 AMSajey

nice work richard.. 5*s from me.
is it possible to give icons for differant columns & columns headers ?? if not then that would be an added advantage. waiting for the next release. best of luck for your future projects.
thanks
(If this comment was disrespectful, please report it.)

 
9/7/2006 4:35:55 AMSajey

a provision to export to excel, csv would be nice.
(If this comment was disrespectful, please report it.)

 
9/14/2006 5:32:04 AMJoaquim Aparicio

hi Richard
We are all looking forward for your update :)
(If this comment was disrespectful, please report it.)

 
9/17/2006 10:18:54 AMayta27

Hi
how i can add RighToLeft Property to this control?
Thank you
(If this comment was disrespectful, please report it.)

 
9/20/2006 12:36:56 PMfreelancer

wow! great job!!!!
(If this comment was disrespectful, please report it.)

 
9/24/2006 12:55:12 PMkilll

impressive!

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

 
9/24/2006 1:00:18 PMkilll

great but fail to run in winxpsp2...

got the window, but have to wait for a long time to display all. at last i got to quit
(If this comment was disrespectful, please report it.)

 
10/2/2006 5:50:45 AMFixedAsset

When I set the .row and .col property, the cell is not selected. Otherwise excellent code!
(If this comment was disrespectful, please report it.)

 
10/5/2006 3:16:56 AMSajey

waiting, waiting & waiting.... for the new realease :)
(If this comment was disrespectful, please report it.)

 
10/7/2006 2:45:47 AMricard

error in my computer, anyone can help?
i can't create a thing. thanks
(If this comment was disrespectful, please report it.)

 
10/19/2006 8:37:30 AMFederico

After using it for a while now, I'm getting an error when trying to compile my project. The truth is that I'm getting an error for each form with a lynxgrid in it. It happnes in the "Writing EXE..." parte, so compiling has allready be done. If I simply choose terminate the resulting exe works perfectly fine, but I can't automate the compiling process that way. When I tryied to debug it, the error is when is trying to use the Ubound(sc_aSubData) in the zIdx func.
Just before this line there's a comment in the code.

'Get the upper bound of sc_aSubData() - If you get an error here, you're probably Subclass_AddMsg-ing before Subclass_Start

But so I guess it's a sort of spected error, but don't know what all that means. I tryed different compiling options, but it's allways the same result.
Please, can you help me?

BTW, your control is awesome.

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

 
10/29/2006 12:33:46 PMNoName

Anyone know how to edit the column header's text color and font?
(If this comment was disrespectful, please report it.)

 
12/4/2006 6:04:33 AMRichard Mewett

This version is still a "work-in-progress" so probably a few updates to come!
(If this comment was disrespectful, please report it.)

 
12/4/2006 2:29:46 PMmarshal

Nice update. From what I can tell it fixes all the previous issues I had and adds some nice features to play around with.
(If this comment was disrespectful, please report it.)

 
12/5/2006 1:23:48 PMtdc

Is it possible to read a textfile into the grid,please an update for this.
If it is possible , i would use this.
so far 4 globes from me.
(If this comment was disrespectful, please report it.)

 
12/6/2006 1:21:24 AMT Jackson

tdc, you must be joking with your vote of 4 on this. Submission has had 14835 hits and there's over 200K of code in it. Do you have absolutely any idea as to how long this would have taken to do? (My guess is months!) This is nothing short nor far from ‘pro code’. There’s very few people on here that could have done this.
(If this comment was disrespectful, please report it.)

 
12/6/2006 6:23:04 AMNoName

How do you make the background/horizontal scrollbar to match size of grid. Instead of just one size?
(If this comment was disrespectful, please report it.)

 
12/7/2006 2:19:00 AMxfighter9

please help me winxp sp2 not working. crash lynxgrid. why
(If this comment was disrespectful, please report it.)

 
12/7/2006 5:55:49 AMRichard Mewett

The XP SP2 issue only affects certain languages. The control gets too many focus messages which makes it run very slowly/crash. I assume it is a Unicode issue but I have not been able to resolve it. 3 of the people who have problems can use my LynxCombo without errors - and that used exactly the same sublclasser. I updated LynxGrid with the same UniCode checks as Zhu JinYong's Unicode control - but still no joy!!
(If this comment was disrespectful, please report it.)

 
12/7/2006 4:14:40 PMtdc

Sorry T.Jackson
Of course this was a mistake from me typed the wrong number, it was late and dark and sleepy eyes.
I am a regular visitor of psc and i saw these submissions also.
But i still want to know about implementing textfiles(or any) into the grid.
if someone can help me,please do so.
I want to use this in my projects.
You're absolutly right this is a great submission so 5 globes from me.
(If this comment was disrespectful, please report it.)

 
12/8/2006 4:56:22 AMT Jackson

Err, I'm gifted but, I supposedly have quite a high IQ according to the Tickle test I took. (120 was my score) Your exact statement was 'so far 4 globes from me'. If you didn't say the 'so far' part I would have bought your above apology. Anyhow, Richard's quite a nice guy, perhaps if you ask him for some assistance he may oblige.
(If this comment was disrespectful, please report it.)

 
12/8/2006 2:52:58 PMtdc

Richard, If you have an example for me how to do this, i would be happy.
I use this in my projects in the future.But i want to use textfiles for my data.But i can't find any example on psc.Could you help me.So far i have no trouble using this.I have WinXP Sp2.
Runs perfectly. Great code. Sorry about my english, but i'm Dutch.
(If this comment was disrespectful, please report it.)

 
12/9/2006 2:41:44 PMSergei Farstov

Mister T Jackson certainly has a very high opinion of himself. He must be very "gifted" indeed. ;)
(If this comment was disrespectful, please report it.)

 
12/30/2006 5:13:30 PMDoomsday

Another great piece of work. 5 * from me. I dont know how you found the time to develop this, but I hope you find time to continue.

A few minor bugs from initial testing with your demo: -

1. Your sort routines are great, but sorting dates crashes with a NULL value in the column (NULL date are always a pain!!)

2. Column draging has some issues i.e. if I drag column Job Title to Surname it works fine, but I then try to swap them back, nothing happens. However, if I then move Forename to the Job Title column, I end up with two Surname columns. Keep playing and you can end up the same column 3 or 4 times.

3. If I move a column to "the end", I get an (understandable) subscript out of range error. You may like to handle or trap this.

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

 
12/31/2006 5:55:07 AMRichard Mewett

Doomsday - thanks very much for your comments. If only more PSC users could give such constructive feedback! I will try and post and update soon. :)
(If this comment was disrespectful, please report it.)

 
1/18/2007 4:28:29 PMJuan Carlos San Román

Hi Richard, you have made an excellent control, it's fantastic. You have ***** from me. Thanks for sharing this control.

I found small error. When you open Cell Wrap example and you want to reduce first column width an error occurs in DrawGrid subroutine in:
===============
If bLockColor Then
mImageList.ListImages(Abs(nImage)).Draw UserControl.hdc, ScaleX(IR.Left, vbPixels, mImageListScaleMode), ScaleY(lY + mR.ImageSpace, vbPixels, mImageListScaleMode), 2
Else
mImageList.ListImages(Abs(nImage)).Draw UserControl.hdc, ScaleX(IR.Left, vbPixels, mImageListScaleMode), ScaleY(lY + mR.ImageSpace, vbPixels, mImageListScaleMode), 1
End If
==============

Because IR.Left value is <0
(If this comment was disrespectful, please report it.)

 
1/19/2007 3:03:43 AMDoomsday

Richard

Many thanks for the update. The column dragging works perfectly now and the error when moving to the end has been trapped.

The NULL date sorting issue remains if you find the time.

I did find one further minor error - the horizontal scrollbar allows you to scroll past the end of the last column, and clicking in the area beyond the last column throws a subscript out of range error.

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

 
1/19/2007 6:13:09 AMDriss HANIB

Richard,

I have tested your new upload.
there is another pb ;o)

When you drag a column (eg the last one) and drop it on another place.
Try to sort it and you'll see the arrow of sorting on the new last column this arrow seems to be linked with the former place of a column.
Sorry for my english, i'm from France
(If this comment was disrespectful, please report it.)

 
1/19/2007 7:34:58 AMJoaquin Marcher

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

 
1/20/2007 2:12:47 AMxfighter9

new vesion for thanks alot.
(If this comment was disrespectful, please report it.)

 
1/20/2007 8:37:44 AMHardStream Software Development

Very nice indeed. I think that this control is much better than the one provided by M$. There's only one thing though: maybe it would be nice to add the possibility of using a picture in stead of a solid color on the background. 5 globes for this great submission! :D
(If this comment was disrespectful, please report it.)

 
1/20/2007 1:14:40 PMRichard Mewett

Thanks to all above who have provided me with valuable feedback. v1.81 has fixes for null dates when sorting, sort arrow position when dragging columns to a new position, clicking past the end column and reducing the size of the first column with an image to less than the image width. That will teach me to add new features and create new bugs ;)
(If this comment was disrespectful, please report it.)

 
1/20/2007 1:16:13 PMRichard Mewett

HardStream - thank you very much for your comments. I will investigate adding a background picture property :)
(If this comment was disrespectful, please report it.)

 
1/20/2007 10:51:11 PMunown

Can you add a databound property like the MS flexgrid control?
(If this comment was disrespectful, please report it.)

 
1/21/2007 5:07:20 AMJoaquin Marcher

i say i saw i know! you are the best
(If this comment was disrespectful, please report it.)

 
1/21/2007 11:08:54 PMRandyB30

Hi Richard. Good job. I noticed when adding strings to your grid that contain an "&", it is changed to an underscore instead of showing the "&" that is in the string. Thanks for the update. 5 from me.

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

 
1/22/2007 2:09:43 AMErwin Christiaens

Great program
can you when edit grid go down with enter key and is it possible to highlite cell(Color) like fullrow selectio but only cell
(If this comment was disrespectful, please report it.)

 
1/22/2007 4:00:11 AMDriss HANIB

Thanks Richard for bugs fixed..

I' ve some suggestions..
1. Can you put restrictions into your textbox for edition ?
- Numeric only
- only one decimal dot
- format with constant decimal numbers..
- only uppercase..
- date format control..

2. can you add the abbility to begin edition with every key pressed, instead of ENTER key.. it would be, if the option is checked, faster for many editions..



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

 
1/22/2007 4:17:34 PMmarshal

Great job on MultiSelect and Column Swapping in this version. Thanks for the update.
(If this comment was disrespectful, please report it.)

 
1/22/2007 6:17:10 PMJeff Mayes

Nice update, but you have lost the ability to select an object by using the enter key.
(If this comment was disrespectful, please report it.)

 
1/23/2007 6:37:47 AMSajey

richardddd..... u r simply great.. thanks soo much for sharing your time & knowledge... can i vote again ?? i did not checked the v.1.81. i m sure u might have covered the most of the area.. thax soo much again..
(If this comment was disrespectful, please report it.)

 
1/24/2007 9:44:07 AMABI SISTEMAS DEL PERU

I need put Split in LyngXGrid How do this?
(If this comment was disrespectful, please report it.)

 
2/5/2007 1:27:17 AMIan Cuello

Awesome! two hands up!
(If this comment was disrespectful, please report it.)

 
3/2/2007 3:48:35 PMBob

Hey, I really like this control but I'm having some problems getting it to respond the way that I want.
1. It would be nice to be able to lock specific columns from editing.
2. I would like to make the just added row visible.

Perhaps it is my own ignorance and someone can tell me how to do that.

This is a fantastic piece of code and I'm voting 5.

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

 
3/8/2007 3:34:04 PMRichard Mewett

Hi Bob and thanks for the feedback. By using the RequestEdit event (along with its Cancel parameter) you can prevent and edits from being invoked.
(If this comment was disrespectful, please report it.)

 
3/14/2007 3:58:27 AMrishal

good ... but scrollbars make flicker when data load into lynxgrid on my winXP and crashed but in w2k works fine .. any sugestion ?
(If this comment was disrespectful, please report it.)

 
3/16/2007 4:17:43 PMRichard Mewett

rishal, did you set the Redraw=False when you populated the grid?
(If this comment was disrespectful, please report it.)

 
3/17/2007 2:41:22 AMmzfhhhh

hi ,when i run the code ,the cpu 100%,the Form can't show full. why ?
vb6,win2000 chinese
(If this comment was disrespectful, please report it.)

 
3/17/2007 9:50:00 AMTerriTop

Richard, nice update....any chance I could request native system scrollbar support along with the current ones? This would allow for a more consistent LnF (Look and Feel) when running in XP emulation. GDuncan has a nice example of how to implement these with Paul Caton's subclasser....In any case, this work is worth another 5 point, I only wish this were allowed for updates! TerriTop
(If this comment was disrespectful, please report it.)

 
3/17/2007 10:45:55 AMHeriberto Mantilla Santamaria

Nice update Richard, you have a new project, friend?
(If this comment was disrespectful, please report it.)

 
3/17/2007 11:37:33 AMrishal

yes I do ... the error show at GDI32.dll ... scrollbars keep scrolls and crashed ... but only in winxp ... thanks
(If this comment was disrespectful, please report it.)

 
3/17/2007 3:01:46 PMRichard Mewett

^ with regard to above XP problems there is clearly a major issue with subclassing on XP with some non-english languages. My best guess would be a unicode issue. I have tried a major unicode overhaul and it did not help when tested by a PSC user with the problem, so I restored original code. I do not really have the time to investigate this myself but would welcome any debug feedback from someone who has the problem!
(If this comment was disrespectful, please report it.)

 
3/20/2007 9:32:18 AMmarshal

Thanks for sticking with this project, LynxGrid has saved me tons of time and headache.
(If this comment was disrespectful, please report it.)

 
3/21/2007 10:07:38 AMGdR

When Checkboxes are enabled then you hide column n°0, the chexkboxes are invisible and the resize column won't work
(If this comment was disrespectful, please report it.)

 
3/23/2007 6:41:31 AMGdR

For the rezising problem :

in UserControl_MouseMove find this code :

lWidth = lWidth + mCols(mColPtr(lCount)).lWidth

If (X < lWidth + SIZE_VARIANCE) And (X > lWidth - SIZE_VARIANCE) Then
nPointer = vbSizeWE
mResizeCol = lCount
Exit For
End If

lResizeX = lResizeX + mCols(mColPtr(lCount)).lWidth


and put an if between it like :

If mCols(mColPtr(lCount)).bVisible Then
...code finded...
End If


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

 
3/25/2007 10:03:25 AMnice but

cool but not support RightToLeft
(If this comment was disrespectful, please report it.)

 
3/27/2007 12:02:09 PMTom Level

5 globes from me - this control is really awesome!

some issues i found:
- when adding a boolean column the checkboxes don't show up by default if the row height isnt set
- dunno if i missed it but i can't read out a cell's background color
- i found it a bit hard to read out boolean columns (if checkbox is checked), it would be easier having a property like cell.checked

will there be a new version soon?

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

 
3/27/2007 1:02:48 PMRichard Mewett

^ I hope to post an update soon. Am holding off because I am trying to resolve the subclassing issue with XP SP2 and some non-english languages. As a temporary fix anyone with the problem can try commenting out the DrawGrid calls that relate to KILLFOCUS & SETFOCUS messages.
(If this comment was disrespectful, please report it.)

 
3/27/2007 1:45:47 PMRichard Mewett

@ Tom
Thanks for your comments. There is a CellChecked property for working with Boolean Columns! You can get a Cells color setting with the CellBackColor & CellForeColor properties.
(If this comment was disrespectful, please report it.)

 
3/28/2007 7:46:10 AMBody_of_Rays

Nice control. Some things that could make you control better:

* The Scrollbars, that navigate into one column to other. You could make an option to change grid mode and normal listview mode.

* We can't resize the column bigger than the width of the control.

* Drag N'Drop items in the list.

* Reorder files in the list (change the selected items' position)
(If this comment was disrespectful, please report it.)

 
4/4/2007 11:58:55 AMHelbert

Hi Richard.
First, it forgives me for the errors in english, because i´m brazilian and i do not dominate its language.
Second, congratulations and a lot tanks for your grid, LynxGrid.
I have a software where i implemented personalization for user. Example: for user "X" i save sizes of forms, order of fields, color of back and fore color, etc... Every time when user log, these configurations are loaded. My doubt is: how i can save the order of columns on your grid, because i can´t do this with the index of each column. For example: the default order of a grid is: Code, Name and Address. The user "X" change this order to Name, Address and Code. How i can read this order for save this configuration on database and read on a next load of the form?

I again thank for your attention and congratulations for the work developed with grid.

Thanks,

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

 
4/4/2007 1:12:00 PMTom

Great control but I found an error in v1.86. The Sub ApplyCellFormat does not use the row pointers to obtain the items which will cause problems if the list is sorted.
(If this comment was disrespectful, please report it.)

 
4/17/2007 3:14:12 AMOli

Thx a lot for sharing; 5 globes !!
But still some suggestions/wishes:
- Method CellEnabled(row,col) to enable cell focus; to realize non editable cells within the grid
- Editmode: additional trigger 'lgAnyKey' (editmode should be started by pressing any key)

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

 
5/8/2007 2:56:45 AMSteve

Brilliant control. Five Star!!! I am having trouble with binding the dtpicker. The RequestUpdate event fires as soon as you click the control not after you select a date. Any ideas??
(If this comment was disrespectful, please report it.)

 
5/10/2007 6:42:35 AMRichard Mewett

Thanks for all the recent feedback/emails I have received. I have made a few tweaks in response :)
(If this comment was disrespectful, please report it.)

 
5/10/2007 10:40:19 AMmarshalfaulkner

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

 
5/10/2007 2:06:04 PMBody_of_Rays

some things that i would change:

Multiselect changes for mousedown event:

Else ' Right Button
If mMouseDownRow > NULL_RESULT Then
If UpdateCell() Then
SetRowCol mMouseDownRow, lMCol
DrawGrid mRedraw
End If
End If
End If

Review the Sub SetScrollBars. Many times, the scroll max value became bigger than the sum of list's columns width, so, the user can scroll right even if there isn't any column seen.
(If this comment was disrespectful, please report it.)

 
5/11/2007 10:36:46 AMMaster_Coder

Richard,

Have you considered adding a tooltip window to show the full contents of cells that aren't fully displayed or ellipsed?

Could be very helpful.
(If this comment was disrespectful, please report it.)

 
5/11/2007 5:06:19 PMOliver Toro

Hi!

congratulations! excellent code!! have you considered add a print option? Or what do you suggest me to print the grid?


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

 
5/12/2007 2:45:25 AMHSN Murthy

excellent work/job. but on my machine i added about 37,000 records while unloading it will take lot of time and after it will show general protection error. why is that?
(If this comment was disrespectful, please report it.)

 
5/12/2007 11:55:10 AMTom Level

great code!
would it be possible to add ado recordset binding? (also with updating)
thx
tom
(If this comment was disrespectful, please report it.)

 
5/16/2007 4:25:54 AMRichard Mewett

* Stability Problem *
Subclassing problems with some non-english languages have plagued this control since I first posted it. The same subclasser works fine in LynxComboBox (from feedback from users).
I have made various unicode patches all to no avail.

John Underhill (aka Steppenwolfe) kindly tested an updated LynxGrid using his own subclasser class which is proven to be unicode stable. Unfortunately LynxGrid still crashed/ran very slowly when the users with the problem tried it. A big thanks for his assistance however - this version includes unicode changes based on is feedback.

If anyone has any other ideas I would welcome any comments!
(If this comment was disrespectful, please report it.)

 
5/19/2007 7:12:25 AMkibe

stability with russian language is unstable. :(
when app start, in frmMain LynxGrid are paint, after that all around are not loading. App busy. Richard, make it!
(If this comment was disrespectful, please report it.)

 
6/15/2007 3:35:47 PMNoName

[REQUEST] please add %of completion to progressbar. TY
(If this comment was disrespectful, please report it.)

 
6/16/2007 9:43:16 PMTony

To get familiar with Lynxgrid I put it on a form and in the form load proc put

With Lynxgrid1

.additem("123")
.additem ("234")

end With

No other code in the project

When I run it, the grid appears on the form with just the background an no items displayed. What am I doing wrong? No error messages either.
(If this comment was disrespectful, please report it.)

 
6/19/2007 2:33:07 PMmarshalfaulkner

There is a whole example written explaining what you did wrong
(If this comment was disrespectful, please report it.)

 
7/11/2007 7:48:20 PMMonki

Is there any chance that you will be adding the ability to drag rows?

Other than that, your control is great!
(If this comment was disrespectful, please report it.)

 
7/12/2007 4:41:15 PMMorgan Haueisen

Very nice code (*****). I added this sub and thought you might be interested.

Public Sub RowSet(ByVal lNewRow As Long, Optional ByVal lNewCol As Long = 0)
Dim bRedraw As Boolean
If lNewRow <= mItemCount And lNewRow >= 0 Then
If Not (mRow = lNewRow) Then
bRedraw = SetSelection(False)
End If
If lNewRow > NULL_RESULT Then
SetRowCol lNewRow, lNewCol
If Not mItems(mRowPtr(lNewRow)).nFlags And lgFLSelected Then
bRedraw = True
SetFlag mItems(mRowPtr(lNewRow)).nFlags, lgFLSelected, True
RaiseEvent SelectionChanged
End If
End If
If bRedraw Or SetRowCol(lNewRow, lNewCol, True) Then
If lNewRow < SBValue(efsVertical) Then
SBValue(efsVertical) = lNewRow
ElseIf lNewRow > (SBValue(efsVertical) + ItemsVisible()) Then
SBValue(efsVertical) = lNewRow
End If
DrawGrid mRedraw
End If
End If
End Sub
(If this comment was disrespectful, please report it.)

 
7/23/2007 10:46:25 AMpopo

vb6 IDE crashes every after I END the fifth (5th) Compilation/Run on my machine. Someone please try it.

Still, Richard, it's a nice work men! Thanks a lot!
(If this comment was disrespectful, please report it.)

 
8/5/2007 9:06:01 PMOnlyNeo

Hi Richard Mewett.Its really Cool But found bug that vb6 crashes every after I END (2,3) Run\Compilation on my PC.
(If this comment was disrespectful, please report it.)

 
8/8/2007 8:54:26 PMOnlyNeo

Hi.Sorting is good but not working on huge list.I'm not able to sort 100000 (or more then) items as string and numeric.Found error (Run time Error '9'
Sub Script out of range).Please Help me out..
(If this comment was disrespectful, please report it.)

 
8/10/2007 9:35:48 AMmarshalfaulkner

I have been using 1.86 extensively in my programs without problem. 1.89 has stability issues.
(If this comment was disrespectful, please report it.)

 
8/13/2007 11:17:19 AMmarshalfaulkner

I used 1.86 in this program if anyone needs the previous English stable version.
http://planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=68645&lngWId =1

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

 
8/18/2007 10:11:28 PMUpt3r_U

hi sir, i was wondering if i can implement this type of grid in delphi project? im currently working in a private company and the programming language they use is delphi, but i also program using vb and vb.net.

I will wait for your response sir...
thank you in advance....
(If this comment was disrespectful, please report it.)

 
9/27/2007 4:59:00 PMmarshalfaulkner

Richard, is 2.0 still in the works?
(If this comment was disrespectful, please report it.)

 
10/10/2007 7:22:49 AMVan

This is definitely a great user control. And the coding is very neat. 5 (*****) star from me.
There are something I just want to request. Could you make the column to fit automatically (like ListView) when I double-click the side of the column header?
Also when I scroll the horizontal scrollbar, the FocusRect is not adjusting correctly if the value of FocusRectMode is 'Row'.
I also experienced the crashing of VB6 IDE.
Despite of that, your work is really unbeatable!
I hope for the better updates on this control.
Thank you for sharing this, and keep up the good work!
(If this comment was disrespectful, please report it.)

 
12/24/2007 8:49:09 AMWaldo

Excellent, great grid !!!
(If this comment was disrespectful, please report it.)

 
1/28/2008 9:14:05 PMFernos2

I FOUND A BUG IN LynxGrid v1.70

FIXED VERSION: http://vi01.no-ip.org/pub/LynxGrid_1.70_Fixed_Test.rar

The current version v1.89 cause some crashes for me. I'm using WinXP SP2 Spanish

Sorry for my bad English ;)
(If this comment was disrespectful, please report it.)

 
5/25/2008 9:23:52 AMJohn Magill

Just picked up this code this weekend and implemented it in a project very quickly. 5 globes excellent work.

One question cannot seem to find from the demo code can the font size be changed for row,column and or cell and if so how.
Superb work.

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

 
2/21/2009 11:00:16 PMsup801

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")

sorry about my poor english
(If this comment was disrespectful, please report it.)

 
4/29/2009 3:11:47 PMTony

Using lynxgrid V2 I seem to have found a bug in the sort routine or possibly I am doing something wrong.

I have a grid with client names in column 1 that I want to sort alphabetically ascending. THe grid has seven columns.

lgrid.sort 1,1 sorts them in Descending order and
lgrid.sort 1,2 sorts them ascending

This does not agree with the Enum declaration for the sort type variables which are the other way around.
(If this comment was disrespectful, please report it.)

 
6/23/2011 1:19:13 AMBrian

Can somebody help me how to delete column in lynx? Please email me. It will be a big help thanks.
(If this comment was disrespectful, please report it.)

 
5/16/2013 9:42:26 AMm poser

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 ;

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.