[Gambas-user] Need help on dataview
Gianluigi
bagonergi at gmail.com
Fri Mar 11 11:02:56 CET 2022
Il giorno ven 11 mar 2022 alle ore 10:54 Gianluigi <bagonergi at gmail.com> ha
scritto:
>
>
> Il giorno ven 11 mar 2022 alle ore 10:24 Fabien Bodard <
> gambas.fr at gmail.com> ha scritto:
>
>> Hi,
>>
>>
>> I want to maintain the position of the selected line after an update
>> of the datasource ... How can I do that ?
>>
>> I take any good idea :-)
>>
>> There is no data count change just dataline info change ... but when I
>> call datasource.update , the dataview loose the position ... and the
>> index ...
>>
>> --
>> Fabien Bodard
>>
>
> Hi Fabien,
>
> I don't know if this is correct or it's just stupid, maybe you could take
> note of the current key before the changes and afterwards reposition the
> focus there (DataBrowser1.View.Rows[xxx].Selected = True):
> In Public Sub DataBrowser1_MouseDown()
> Try iCurrentKey = CInt(DataSource1.Current[0])
> If Error Then
> iCurrentKey = $iCurrentKey
> Endif
> ...
>
> Regards
> Gianluigi
>
Sorry DataView and not DataBrowser, but it's the same right? :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220311/a8db067f/attachment.htm>
More information about the User
mailing list