Discussion:
Selection from GridView
(too old to reply)
Aleksandrs Livshics
2009-09-09 18:31:19 UTC
Permalink
Hi Gambas users.
I cannot fond how to select several rows from a GridView.
The difficulty happens only if the rows to select are not
consequent. If there is a simple interval of rows, then
selection works well, but if I want to select, say, row1
and row5 ?
Also how can a row selection be canceled without
selecting of another row? Just mouse click on the
selected row does not cancel the selection...
My version is 2.7.
Aleks
Ricardo Díaz Martín
2009-09-10 06:55:12 UTC
Permalink
To do the first write (select first, third and sixth rows - gvYourGridView
is the name of the gridview in your form)

gvYourGridView.Rows.[0].Selected = True
gvYourGridView.Rows.[2].Selected = True
gvYourGridView.Rows.[5].Selected = True

To do the second only write

gvYourGridView.Rows.Unselect


Regards,
Ricardo Díaz
Post by Aleksandrs Livshics
Hi Gambas users.
I cannot fond how to select several rows from a GridView.
The difficulty happens only if the rows to select are not
consequent. If there is a simple interval of rows, then
selection works well, but if I want to select, say, row1
and row5 ?
Also how can a row selection be canceled without
selecting of another row? Just mouse click on the
selected row does not cancel the selection...
My version is 2.7.
Aleks
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Aleksandrs Livshics
2009-09-10 09:17:14 UTC
Permalink
Thank you. I was not clear enough, sorry. The problem is not
with programming, but with the selection by mouse and keyboard.
The Ctrl and Shift do not work the way they do with the ListBox for
example. The only way to select more then one row is to drag
the mouse cursor keeping the left button pressed. But then
only the consequent rows can be chosen.
Also I cannot cancel the selection. Only if I select another row..
If I click on a selected row or double click on it nothing happens.
It is NOT the same as in the case of ListBox.
I must also mention that I have set the mode of the GridView to multiple.
I hope now my question is clear.
Post by Ricardo Díaz Martín
To do the first write (select first, third and sixth rows - gvYourGridView
is the name of the gridview in your form)
gvYourGridView.Rows.[0].Selected = True
gvYourGridView.Rows.[2].Selected = True
gvYourGridView.Rows.[5].Selected = True
To do the second only write
gvYourGridView.Rows.Unselect
Regards,
Ricardo Díaz
Post by Aleksandrs Livshics
Hi Gambas users.
I cannot fond how to select several rows from a GridView.
The difficulty happens only if the rows to select are not
consequent. If there is a simple interval of rows, then
selection works well, but if I want to select, say, row1
and row5 ?
Also how can a row selection be canceled without
selecting of another row? Just mouse click on the
selected row does not cancel the selection...
My version is 2.7.
Aleks
-------------------------------------------------------------------------
----- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day trial. Simplify your report design, integration and deployment -
and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
---------------------------------------------------------------------------
--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day trial. Simplify your report design, integration and deployment - and
focus on what you do best, core application coding. Discover what's new
with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Ricardo Díaz Martín
2009-09-11 07:10:35 UTC
Permalink
I think you have a bug in your gambas2 version.

What distro are you using? (I always run gambas in ubuntu because I've got
problems with fedora and opensuse and the instalation in ubuntu form sources
are easy and clear - you can see step by step in gambasdoc.org) Are you
using your distro repositories to install gambas2? gnome or KDE?

I confirm to you I can't cancel the selection by click at the same row. This
is only possible by theGridView.Rows.Unselect (I think this is one of the
differences whith listbox control, but I allways use gridviews and no
ListBoxes because I'm a databases programmer and allways hide first or more
columns to get from this the id of the rows after)

Multiple is the correct value for do that you want.

I recomended to you you try to compile gambas2 from souces in souceforge
using Ubuntu (Ubuntu is not the best distro but I use this because gambas
run fine and it's easy and fast to deploy my apps using freenx)

Regards,
Post by Aleksandrs Livshics
Thank you. I was not clear enough, sorry. The problem is not
with programming, but with the selection by mouse and keyboard.
The Ctrl and Shift do not work the way they do with the ListBox for
example. The only way to select more then one row is to drag
the mouse cursor keeping the left button pressed. But then
only the consequent rows can be chosen.
Also I cannot cancel the selection. Only if I select another row..
If I click on a selected row or double click on it nothing happens.
It is NOT the same as in the case of ListBox.
I must also mention that I have set the mode of the GridView to multiple.
I hope now my question is clear.
Post by Ricardo Díaz Martín
To do the first write (select first, third and sixth rows -
gvYourGridView
Post by Ricardo Díaz Martín
is the name of the gridview in your form)
gvYourGridView.Rows.[0].Selected = True
gvYourGridView.Rows.[2].Selected = True
gvYourGridView.Rows.[5].Selected = True
To do the second only write
gvYourGridView.Rows.Unselect
Regards,
Ricardo Díaz
Post by Aleksandrs Livshics
Hi Gambas users.
I cannot fond how to select several rows from a GridView.
The difficulty happens only if the rows to select are not
consequent. If there is a simple interval of rows, then
selection works well, but if I want to select, say, row1
and row5 ?
Also how can a row selection be canceled without
selecting of another row? Just mouse click on the
selected row does not cancel the selection...
My version is 2.7.
Aleks
-------------------------------------------------------------------------
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
----- Let Crystal Reports handle the reporting - Free Crystal Reports
2008
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
30-Day trial. Simplify your report design, integration and deployment -
and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
---------------------------------------------------------------------------
Post by Ricardo Díaz Martín
--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day trial. Simplify your report design, integration and deployment -
and
Post by Ricardo Díaz Martín
focus on what you do best, core application coding. Discover what's new
with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Aleksandrs Livshics
2009-09-11 11:23:00 UTC
Permalink
I used 2.7 on eeepc version of Ubuntu 8.1 (called EasyPeasy 1.1),
but now I have compiled 2.16 on the same system. No difference.
I can select one row only or a group of rows, but not 2 rows in different
places of the GridView.
But I cannot imagine how this netbook may be different from a usual
PC in this case. Should be only small and slow and without a CD/DVD inside...
And I have never noticed any differences using other software.
Post by Ricardo Díaz Martín
I think you have a bug in your gambas2 version.
What distro are you using? (I always run gambas in ubuntu because I've got
problems with fedora and opensuse and the instalation in ubuntu form
sources are easy and clear - you can see step by step in gambasdoc.org) Are
you using your distro repositories to install gambas2? gnome or KDE?
I confirm to you I can't cancel the selection by click at the same row.
This is only possible by theGridView.Rows.Unselect (I think this is one of
the differences whith listbox control, but I allways use gridviews and no
ListBoxes because I'm a databases programmer and allways hide first or more
columns to get from this the id of the rows after)
Multiple is the correct value for do that you want.
I recomended to you you try to compile gambas2 from souces in souceforge
using Ubuntu (Ubuntu is not the best distro but I use this because gambas
run fine and it's easy and fast to deploy my apps using freenx)
Regards,
Post by Aleksandrs Livshics
Thank you. I was not clear enough, sorry. The problem is not
with programming, but with the selection by mouse and keyboard.
The Ctrl and Shift do not work the way they do with the ListBox for
example. The only way to select more then one row is to drag
the mouse cursor keeping the left button pressed. But then
only the consequent rows can be chosen.
Also I cannot cancel the selection. Only if I select another row..
If I click on a selected row or double click on it nothing happens.
It is NOT the same as in the case of ListBox.
I must also mention that I have set the mode of the GridView to multiple.
I hope now my question is clear.
Post by Ricardo Díaz Martín
To do the first write (select first, third and sixth rows -
gvYourGridView
Post by Ricardo Díaz Martín
is the name of the gridview in your form)
gvYourGridView.Rows.[0].Selected = True
gvYourGridView.Rows.[2].Selected = True
gvYourGridView.Rows.[5].Selected = True
To do the second only write
gvYourGridView.Rows.Unselect
Regards,
Ricardo Díaz
Post by Aleksandrs Livshics
Hi Gambas users.
I cannot fond how to select several rows from a GridView.
The difficulty happens only if the rows to select are not
consequent. If there is a simple interval of rows, then
selection works well, but if I want to select, say, row1
and row5 ?
Also how can a row selection be canceled without
selecting of another row? Just mouse click on the
selected row does not cancel the selection...
My version is 2.7.
Aleks
-------------------------------------------------------------------------
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
----- Let Crystal Reports handle the reporting - Free Crystal Reports
2008
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
30-Day trial. Simplify your report design, integration and deployment
- and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
-------------------------------------------------------------------------
--
Post by Ricardo Díaz Martín
--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day trial. Simplify your report design, integration and deployment -
and
Post by Ricardo Díaz Martín
focus on what you do best, core application coding. Discover what's new
with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
-------------------------------------------------------------------------
----- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day trial. Simplify your report design, integration and deployment -
and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
---------------------------------------------------------------------------
--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day trial. Simplify your report design, integration and deployment - and
focus on what you do best, core application coding. Discover what's new
with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Ricardo Díaz Martín
2009-09-15 07:01:31 UTC
Permalink
I recommend to you you download last version of gambas2 frrom souceforge and
compile this. The gambas pakage in ubuntu 8.1 is too old (I don't know why
ubuntu pakages version is 2.7 - it's gambas version doesn't exist!)
Post by Aleksandrs Livshics
I used 2.7 on eeepc version of Ubuntu 8.1 (called EasyPeasy 1.1),
but now I have compiled 2.16 on the same system. No difference.
I can select one row only or a group of rows, but not 2 rows in different
places of the GridView.
But I cannot imagine how this netbook may be different from a usual
PC in this case. Should be only small and slow and without a CD/DVD inside...
And I have never noticed any differences using other software.
Post by Ricardo Díaz Martín
I think you have a bug in your gambas2 version.
What distro are you using? (I always run gambas in ubuntu because I've
got
Post by Ricardo Díaz Martín
problems with fedora and opensuse and the instalation in ubuntu form
sources are easy and clear - you can see step by step in gambasdoc.org)
Are
Post by Ricardo Díaz Martín
you using your distro repositories to install gambas2? gnome or KDE?
I confirm to you I can't cancel the selection by click at the same row.
This is only possible by theGridView.Rows.Unselect (I think this is one
of
Post by Ricardo Díaz Martín
the differences whith listbox control, but I allways use gridviews and no
ListBoxes because I'm a databases programmer and allways hide first or
more
Post by Ricardo Díaz Martín
columns to get from this the id of the rows after)
Multiple is the correct value for do that you want.
I recomended to you you try to compile gambas2 from souces in souceforge
using Ubuntu (Ubuntu is not the best distro but I use this because gambas
run fine and it's easy and fast to deploy my apps using freenx)
Regards,
Post by Aleksandrs Livshics
Thank you. I was not clear enough, sorry. The problem is not
with programming, but with the selection by mouse and keyboard.
The Ctrl and Shift do not work the way they do with the ListBox for
example. The only way to select more then one row is to drag
the mouse cursor keeping the left button pressed. But then
only the consequent rows can be chosen.
Also I cannot cancel the selection. Only if I select another row..
If I click on a selected row or double click on it nothing happens.
It is NOT the same as in the case of ListBox.
I must also mention that I have set the mode of the GridView to
multiple.
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
I hope now my question is clear.
Post by Ricardo Díaz Martín
To do the first write (select first, third and sixth rows -
gvYourGridView
Post by Ricardo Díaz Martín
is the name of the gridview in your form)
gvYourGridView.Rows.[0].Selected = True
gvYourGridView.Rows.[2].Selected = True
gvYourGridView.Rows.[5].Selected = True
To do the second only write
gvYourGridView.Rows.Unselect
Regards,
Ricardo Díaz
Post by Aleksandrs Livshics
Hi Gambas users.
I cannot fond how to select several rows from a GridView.
The difficulty happens only if the rows to select are not
consequent. If there is a simple interval of rows, then
selection works well, but if I want to select, say, row1
and row5 ?
Also how can a row selection be canceled without
selecting of another row? Just mouse click on the
selected row does not cancel the selection...
My version is 2.7.
Aleks
-------------------------------------------------------------------------
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
----- Let Crystal Reports handle the reporting - Free Crystal
Reports
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
2008
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
30-Day trial. Simplify your report design, integration and
deployment
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
- and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
-------------------------------------------------------------------------
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
--
Post by Ricardo Díaz Martín
--- Let Crystal Reports handle the reporting - Free Crystal Reports
2008
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
Post by Ricardo Díaz Martín
30-Day trial. Simplify your report design, integration and deployment
-
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
and
Post by Ricardo Díaz Martín
focus on what you do best, core application coding. Discover what's
new
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
Post by Ricardo Díaz Martín
with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
-------------------------------------------------------------------------
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
----- Let Crystal Reports handle the reporting - Free Crystal Reports
2008
Post by Ricardo Díaz Martín
Post by Aleksandrs Livshics
30-Day trial. Simplify your report design, integration and deployment -
and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
---------------------------------------------------------------------------
Post by Ricardo Díaz Martín
--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day trial. Simplify your report design, integration and deployment -
and
Post by Ricardo Díaz Martín
focus on what you do best, core application coding. Discover what's new
with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Continue reading on narkive:
Loading...