-
May 22nd, 2021, 02:47 AM
#521
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Mustaphi
Hi Krool
I was using the VbFlexgrid 1.3 ocx and I wasable to use the datasource property without issue
Code:
Set VBFlexGrid1.FlexDataSource = DataSource.BindTo(Rs)
Now I'm using the VbFlexgrid 1.4 ocx, I get error type mismath.
thank you
Is the 1.3 de-referenced in your project?
-
May 22nd, 2021, 04:01 AM
#522
Fanatic Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Is the 1.3 de-referenced in your project?
Yes
Now I removed reference and it works
thanks a lot
Please Krool could you please help me in this issue?
I need to use the first column of my VbFlexgrid as autoincrement Is this possible and then sort the items on that column?
Code:
Set VBFlexGrid1.FlexDataSource = DataSource.BindTo(Rs)
For i = VBFlexGrid1.FixedRows To VBFlexGrid1.Rows - 1
VBFlexGrid1.TextMatrix(i, 0) = i
Next i
i = i + 1
Many thanks
Last edited by Mustaphi; May 22nd, 2021 at 04:26 AM.
-
May 22nd, 2021, 05:08 AM
#523
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Mustaphi
I need to use the first column of my VbFlexgrid as autoincrement Is this possible and then sort the items on that column?
Code:
Set VBFlexGrid1.FlexDataSource = DataSource.BindTo(Rs)
For i = VBFlexGrid1.FixedRows To VBFlexGrid1.Rows - 1
VBFlexGrid1.TextMatrix(i, 0) = i
Next i
i = i + 1
When you use a bound (SQLite-)cRecordset in your DataSource,
then the Sorting will have to be done on the Recordset itself (followed by a vbFlexGrid.Refresh).
Here is a thread with an example (in post #6) - how you can do that (using a slightly enhanced Binding-Class):
https://www.vbforums.com/showthread....=1#post5514140
And of course there's also the option, to already start-out with an Rs (in your Binding-call),
which comes (pre-)sorted by the initial SQL-query ... (via a normal Order By Clause).
Olaf
-
May 22nd, 2021, 06:21 AM
#524
Fanatic Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Olaf
The sample you submitted is fabulous.
I tested it and it is really marvellous work.
However in my case here I need to add a new auto increment column based on the number of items in the flexgrid.
I wonder if this is possible when using the bound method.
thanks
-
May 22nd, 2021, 08:10 AM
#525
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Mustaphi
However in my case here I need to add a new auto increment column based on the number of items in the flexgrid.
The Binding-method can only reflect, what priorily exists as Field-data in your Rs.
So, if you don't have interest in the "real (Auto)ID-Column" of your Table (because it might contain "gaps"),
but need a simple, increasing "Row-Number" instead, then you have to ensure such an Output in your Rs beforehand -
directly via SQL, e.g. instead of:
"Select * From YourTable Order By SomeField"
You can enhance the Result by a leading Extra-Field, named RowNr like this:
"Select ROW_NUMBER() Over(Order By SomeField) As RowNr, * From YourTable"
Note, how in the above - the Order By definition was moved from the end -
into the Over(...) part of the Row_Number Window-Function.
Olaf
-
May 22nd, 2021, 09:22 AM
#526
Fanatic Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Code:
"Select ROW_NUMBER() Over(Order By SomeField) As RowNr, * From YourTable"
It did the job
Million thanks
-
Jun 27th, 2021, 07:33 PM
#527
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Hello, Krool here is listed some issues, which still need to be corrected, especially the windows issue. Also missing would be the ExtendLastCol, and the FocusRect, if an expert could still implement that part.
It is also necessary to order alphabetically when clicking on the header.
Thank you
-
Jun 28th, 2021, 07:41 AM
#528
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by lizano diaz
Hello, Krool here is listed some issues, which still need to be corrected, especially the windows issue. Also missing would be the ExtendLastCol, and the FocusRect, if an expert could still implement that part.
It is also necessary to order alphabetically when clicking on the header.
Thank you
the zip file is invalid.
-
Jun 28th, 2021, 07:49 AM
#529
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
the zip file is invalid.
Opened OK for me?
-
Jun 28th, 2021, 10:18 AM
#530
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Use please last program WinRAR
-
Jun 28th, 2021, 09:35 PM
#531
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
the zip file is invalid.
Corrected some errors, it is missing to take the theme of the operating system and highlight the colors when hovering the mouse over the header, it would also lack the alphabetical ordering either descending or ascending when clicking on the header, and improve the data loading speed in the grid.
Likewise, it is necessary to implement the focusrect and ExtendLastCol
to open the tablet use the latest version of winrar.
Last edited by lizano diaz; Jun 28th, 2021 at 09:40 PM.
-
Jun 29th, 2021, 09:47 AM
#532
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
@lizano diaz: You can use https://github.com/Kr00l/VBFLXGRD to fork repo and submit PRs so your changes can be conveniently discussed and approved there.
Submitting changes in a zip file to a discussion forum is generraly a PITA and will probably discourage maintainer (@Krool) from chasing diffs or any new implementations you introduced.
IMO now your effort is close to wasted unless maintainer is super motivated to deal with any changes in the form they are submitted now.
cheers,
</wqw>
-
Jul 3rd, 2021, 02:03 PM
#533
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
I have a question..
Currently the BackColorAlt property applies right after the fixed rows.
However, with the introduction of the frozen rows/cols it can cause side-effects when scrolling and having frozen rows.
Left side (1) is the current situation and right side (2) would be a tweak to have the BackColorAlt only applying right after the fixed + frozen rows.
(in the above image, there are 2 frozen rows and the cell between 2 and 4 is scrolled out)
What you think ?
-
Jul 5th, 2021, 10:03 PM
#534
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
I have a question..
Currently the BackColorAlt property applies right after the fixed rows.
However, with the introduction of the frozen rows/cols it can cause side-effects when scrolling and having frozen rows.
Left side (1) is the current situation and right side (2) would be a tweak to have the BackColorAlt only applying right after the fixed + frozen rows.
(in the above image, there are 2 frozen rows and the cell between 2 and 4 is scrolled out)
What you think ?
Hi, it seems correct to me
I was trying to do the ExtendLastCol, but I can't, also I would have wanted to add properties such as percentages in the cells, a drop-down grid similar to the VsFlexgrid winforms ... what do you think my friend Krool
-
Jul 6th, 2021, 12:30 AM
#535
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by lizano diaz
Hi, it seems correct to mel
Which one? 1 or 2?
-
Jul 6th, 2021, 02:56 PM
#536
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
-
Jul 6th, 2021, 02:58 PM
#537
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Friend Krool for when would you be launching another version of the Grid, with various improvements?
-
Jul 7th, 2021, 06:06 PM
#538
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Which one? 1 or 2?
... 1
-
Jul 9th, 2021, 09:04 AM
#539
Addicted Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
As I understand it, the alternate back color in grids/tables is there to make it easier to read row by row, thus it should apply to every odd or even row that is displayed, so neither 1 or 2 is correct/optimal in my view.
M$ vs. VB6 = The biggest betrayal and strategic mistake of the century!?
-
Jul 18th, 2021, 12:49 PM
#540
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Which one? 1 or 2?
Attachment 181867
Hi, colleagues, the header themes have already been fixed, the extendlastcol is missing, and other properties such as chart in cells (percentages), icons, tree, and display grid for details, please colleagues help us with those. Krool colleague would appreciate any comments or additions for the control.
Thank you
-
Jul 18th, 2021, 03:13 PM
#541
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
The source is available.
Why demand all this functionality? Just stay with vsFlexgrid if that control has all needed functionality
-
Aug 1st, 2021, 07:25 PM
#542
Hyperactive Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Im looking for Tree Grid control with unicode support. (Tree Grid = Tree nodes that can be expanded/collapsed in the first column)
Is this possible with the VBFlexGrid Control ?
-
Aug 2nd, 2021, 11:15 AM
#543
Junior Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
I added now for both VBCCR and VBFLXGRD a MIT license.md file in the GitHub repo.
I have the VBFLXGRD working in 64-bit WinForms, but there are still issues so I haven't check the code in to GitHub.
The WinForms version is intended to be compatible with the MSFLXGRD, and to that end implements the IMSFlexGrid and DMSFlexGridEvents interfaces.
-
Aug 7th, 2021, 04:45 PM
#544
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Dear Krool, I wanted to ask you a great favor, the following, it would be possible to implement the ExtendLastCol of the VBFlexgrid, also taking into account if in case the last column is hidden (which would normally be the one with the ExtendLastCol) it will pass the ExtendLastCol to the penultimate column. Example we have 5 Columns if by one case it happens to hide column 5, then the ExtendLastCol would occupy column 4, and if I show column 5, column 5, it would become the one with the ExtendLastCol.
I greatly appreciate the sacrifice of your person for the good of the forum. I say goodbye to you awaiting your prompt response.
-
Aug 16th, 2021, 02:57 PM
#545
New Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Has anyone had success getting this control to work with Access 2007 or higher? If so - how?
I've been able to get it to work in a VB6 app or an Access 2003, but upon trying to use it in Access 2007 by creating a new form and adding the control to the form, it immediately crashes the application.
I've also tried creating the form in Access 2003 and opening in Access 2007 - but it still crashes when I try to open the form.
-
Aug 16th, 2021, 03:18 PM
#546
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by sstairs82
Has anyone had success getting this control to work with Access 2007 or higher? If so - how?
I've been able to get it to work in a VB6 app or an Access 2003, but upon trying to use it in Access 2007 by creating a new form and adding the control to the form, it immediately crashes the application.
I've also tried creating the form in Access 2003 and opening in Access 2007 - but it still crashes when I try to open the form.
Do you have 2003 and 2007 in parallel in 1 system? Maybe some temp files by office are disturbing each other.
-
Aug 17th, 2021, 05:03 AM
#547
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
What Datagrid control supports DAO objects?-VBForums
https://www.vbforums.com/showthread....ts-DAO-objects
VBFlexGrid Control ,dose it support dao 3.6?
-
Aug 17th, 2021, 11:00 AM
#548
New Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Do you have 2003 and 2007 in parallel in 1 system? Maybe some temp files by office are disturbing each other.
I only had VB6 and Access 2007 installed when trying to use the control in Access 2007.
I tried it in Access 2007 first by registering the OCX, then creating a new mdb file and a new form.
As soon as I try to drop the VBFlexGrid control onto the form, Access crashes.
I then created a new VB6 EXE and added the control. It worked.
I thought maybe I could add it in Access 2003 - so I installed Access 2003 alongside of Access 2007.
I created a new mdb and a new form and then added the control. It was successful.
Since this worked - I thought maybe I could open the MDB in Access 2007 - so I tried that - and the file opens, but upon opening the form, it crashes.
Event Viewer has this logged each time it crashes:
Faulting application name: MSACCESS.EXE, version: 12.0.6735.5000, time stamp: 0x561e089f
Faulting module name: ntdll.dll, version: 10.0.19041.1110, time stamp: 0x8a32a22a
Exception code: 0xc0000374
Fault offset: 0x000e6c23
Faulting process id: 0x2974
Faulting application start time: 0x01d792e9d2914d82
Faulting application path: C:\Program Files (x86)\Microsoft Office\Office12\MSACCESS.EXE
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report Id: 7bfb5f4e-a6c5-4c5c-ac72-db2a584a693a
Faulting package full name:
Faulting package-relative application ID:
-
Aug 17th, 2021, 12:35 PM
#549
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
I tested office 2002 (XP), 2010, 2016, 2019 and they worked.
You confirmed it works on 2003. So I have no possibility to test 2007.
Last try is to delete some temp files for VBFLXGRD in
Code:
C:\Users\<username>\AppData\Local\Temp\VBE\
Code:
C:\Users\<username>\Application Data\Microsoft\Forms\
-
Aug 17th, 2021, 12:41 PM
#550
New Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
I tested office 2002 (XP), 2010, 2016, 2019 and they worked.
You confirmed it works on 2003. So I have no possibility to test 2007.
Last try is to delete some temp files for VBFLXGRD in
Code:
C:\Users\<username>\AppData\Local\Temp\VBE\
Code:
C:\Users\<username>\Application Data\Microsoft\Forms\
I will try what you suggest - but if you have gotten it to work on Access 2010 - I will try it on another machine that has 2010 and see if it works for me. I will let you know.
-
Aug 17th, 2021, 01:47 PM
#551
New Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by sstairs82
I will try what you suggest - but if you have gotten it to work on Access 2010 - I will try it on another machine that has 2010 and see if it works for me. I will let you know.
I tried it with 2010 and it still crashes for me (with the same exception). I'm wondering if my environment is not setup correctly...
Is this control designed as 32-bit, or 64-bit?
When you were successful in having it work, were you testing with 32-bit or 64-bit versions of Office?
Were there any specific steps you took when using this control?
I copied the OCX to my Windows\SYSWOW64 folder and registered it using RegSvr32, then tried to add it to a new form as an ActiveX control - Am I missing a step or doing something wrong?
All of my Office installations are 32-bit running on a 64-bit machine, so I'm wondering if I might be missing something or not have something setup correctly?
-
Aug 18th, 2021, 07:01 AM
#552
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Update released.
Bugfix for BottomRow/RightCol property related to FrozenRows/FrozenCols.
Also bugfix in the internal GetHitTestInfo function.
An adjustment was missing between the leftmost/topmost column/row and the non-scrollable columns/rows.
This affecty only for hit tests of divider column left and row top. (divider column right and row bottom not affected)
-
Aug 18th, 2021, 07:09 AM
#553
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by sstairs82
I tried it with 2010 and it still crashes for me (with the same exception). I'm wondering if my environment is not setup correctly...
Is this control designed as 32-bit, or 64-bit?
When you were successful in having it work, were you testing with 32-bit or 64-bit versions of Office?
Were there any specific steps you took when using this control?
I copied the OCX to my Windows\SYSWOW64 folder and registered it using RegSvr32, then tried to add it to a new form as an ActiveX control - Am I missing a step or doing something wrong?
All of my Office installations are 32-bit running on a 64-bit machine, so I'm wondering if I might be missing something or not have something setup correctly?
Yes, only office 32 bit works.
Most office installs are 64-bit, but I found one which is 32-bit Excel 2016.
And it works... (just tested)
I never tried MS Access though. Maybe there is something.. Can you test if on your side Excel is working? To have a common starting point and ensure no other issues.
EDIT: Tested on MS Access 2016 and it crashes. (clicking the "add ActiveX control")
Don't know what's going on..
Last edited by Krool; Aug 18th, 2021 at 07:32 AM.
-
Aug 18th, 2021, 09:05 AM
#554
New Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Yes, only office 32 bit works.
Most office installs are 64-bit, but I found one which is 32-bit Excel 2016.
And it works... (just tested)
I never tried MS Access though. Maybe there is something.. Can you test if on your side Excel is working? To have a common starting point and ensure no other issues.
EDIT: Tested on MS Access 2016 and it crashes. (clicking the "add ActiveX control")
Don't know what's going on..
I appreciate the quick responses! I tested in Excel and it works for me in the later versions as well. However, I'd really like to use the control in Access 2010 or higher (we have a program that was developed for Access 2010 that wouldn't work well with an Excel User Form). Let me know if you find anything out.
-
Aug 19th, 2021, 12:27 AM
#555
Junior Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Yes, only office 32 bit works.
Most office installs are 64-bit, but I found one which is 32-bit Excel 2016.
And it works... (just tested)
I never tried MS Access though. Maybe there is something.. Can you test if on your side Excel is working? To have a common starting point and ensure no other issues.
EDIT: Tested on MS Access 2016 and it crashes. (clicking the "add ActiveX control")
Don't know what's going on..
The VBFlexGrid.NET project was launched with Office 64-bit specifically in mind. We have now migrated a 22-year-old Excel-based application to managed code, and need a replacement for the MSFLXGRD. So far, so good: the VBFlexGrid.NET is working embedded in an ATL dialog in glorious x64.
Currently, only a subset of the VBFLXGRD functionality is fully migrated. When I have all the key functionality working, I'll upload it to the GitHub project.
-
Aug 19th, 2021, 01:21 AM
#556
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by R.J. Dunnill
The VBFlexGrid.NET project was launched with Office 64-bit specifically in mind. We have now migrated a 22-year-old Excel-based application to managed code, and need a replacement for the MSFLXGRD. So far, so good: the VBFlexGrid.NET is working embedded in an ATL dialog in glorious x64.
Currently, only a subset of the VBFLXGRD functionality is fully migrated. When I have all the key functionality working, I'll upload it to the GitHub project.
Yes great. Thanks
You migrate 1.4 OCX version?
Do you include bugfixes? Like yesterday fixes.
When 1.5 OCX version comes out you migrate also?
-
Aug 19th, 2021, 02:50 AM
#557
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Here is an experimental version (VBFlexGrid.ctl only) for the ExtendLastCol property.
I don't have a VSFlexGrid to test out all the details so I made this now according to my gut feeling.
So please everyone interested in the ExtendLastCol. Please make extensive testings and report any misbehavior etc.
Thanks
Edit: Attachment removed to save space.
Last edited by Krool; Aug 22nd, 2021 at 05:15 AM.
-
Aug 19th, 2021, 10:14 AM
#558
Junior Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Yes great. Thanks
You migrate 1.4 OCX version?
Do you include bugfixes? Like yesterday fixes.
When 1.5 OCX version comes out you migrate also?
Edit: I am trying to migrate both versions. I haven't added the bug fixes (but I will). I have a bunch of bugs from the migration I need to deal with, too.
I will migrate to the 1.5 versions when they are available.
And currently, the VBFlexGrid.NET is (almost) drop-in compatible with the MSFLXGRD. It embeds the MSFLXGRD type library and implements the IMSFlexGrid and DMSFlexGridEvents interfaces, although, unless the VBFlexGrid.NET type library is custom-edited and registered, the enumeration values are mis-named. (That's a shortfall of a COM-callable wrapper.)
Last edited by R.J. Dunnill; Aug 19th, 2021 at 02:48 PM.
-
Aug 22nd, 2021, 11:38 AM
#559
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Here is an experimental version (VBFlexGrid.ctl only) for the ExtendLastCol property.
I don't have a VSFlexGrid to test out all the details so I made this now according to my gut feeling.
So please everyone interested in the ExtendLastCol. Please make extensive testings and report any misbehavior etc.
Thanks
Edit: Attachment removed to save space.
Dear Krool, glad to hear from you.
Regarding the tests on the ExtendLastCol, it turns out:
1. At design time I set the ExtendLastcol property to the vbFlexgrid true, I execute it and I maximize it to the form and there is the first "error" as in the picture. A double line of the last visible column is created, and if you resize it, several lines appear.
Taking advantage of the message my friend Krool how can I solve this problem that I have, of the Zip attachment. what I am looking for is to order in ascending and descending order of any column but for a strange reason it does not allow me. Attachment 182139
to which I mean the order of the example is in the form = "UserEditingForm"Attachment 182139
-
Aug 22nd, 2021, 11:43 AM
#560
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by lizano diaz
Dear Krool, glad to hear from you.
Regarding the tests on the ExtendLastCol, it turns out:
1. At design time I set the ExtendLastcol property to the vbFlexgrid true, I execute it and I maximize it to the form and there is the first "error" as in the picture. A double line of the last visible column is created, and if you resize it, several lines appear.
Taking advantage of the message my friend Krool how can I solve this problem that I have, of the Zip attachment. what I am looking for is to order in ascending and descending order of any column but for a strange reason it does not allow me. Attachment 182139
to which I mean the order of the example is in the form = "UserEditingForm" Attachment 182139
Attachment 182142
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|