samedi 18 avril 2015

vb.net - Datagridview2 on tabpage2 does not clearselect, while Datagridview1 on tabpage1 does

I have a tabcontrol and there is 2 tabpage on it.


Tab page1 contains datagridview1, and;


Tab page2 contains datagridview2.


In form_load I have datagridview1.ClearSelection() and datagridview2.ClearSelection(), but the clear is only functioning in datagridview1 which is in Tab page1. Any idea how can I clear both datagridview during formload?


I have tried putting it in tabcontrol2_enter and datagridview2.CurrentCell=nothing but it doesn't work.


Aucun commentaire:

Enregistrer un commentaire