[Gambas-user] Gridview Select Multiple rows.

Fabien Bodard gambas.fr at ...626...
Fri Nov 5 14:27:25 CET 2010


Le 5 novembre 2010 13:26, Benoît Minisini
<gambas at ...1...> a écrit :
>> Sorry, this does not work. It only applies to the ListView. I do use a
>> ListView elsewhere and the easiest way is simply to loop through all
>> items with the .movenext function and check for "If lvw.current.selected
>> or lvw.item.selected". Then add the Key to the array of items to process.
>>
>> Unfortunately the GridView has no .item property. It has a .current
>> property but this does not have a .selected property.
>>
>> I think I will add an extra hidden column to my grid to hold a
>> 'Selected' flag. I can use some of your example to track the CONTROL and
>> SHIFT keys to reset these flags as appropriate.
>> Regards
>> Michael
>>
>
> You need something like that:
>
> For iInd = 0 to TheGridView.Rows.Count - 1
>  If TheGridView.Rows[iInd].Selected Then
>    ...
>  Endif
> Next
>
> Regards,
>
> --
> Benoît Minisini


http://gambasdoc.org/help/comp/gb.qt4/.gridviewrows?v3

It is not in the doc, Benoit :), otherwise I would not say all this nonsense

>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
Fabien Bodard




More information about the User mailing list