datagridview数据在tabcontrol select上刷新 [英] datagridview data refreshes on tabcontrol select
问题描述
我有一个带有2列DataGriView和3 Tabpage TabControl的Form,
DataGriView的数据源是Query的结果.
默认情况下,DataGriView中的第一条记录及其相应的信息是tabpages(TabControl)内的文本框中的值,并且当我从DataGriView中选择一条记录时会更改...但是每次我单击其他Tabpages时,都会记录在DataGriView实例上,如果我单击选项卡页6次,则DataGriView上的记录计数将增加6倍.
我不知道该怎么办??? :(
Hi,
I have a Form with a 2 columns DataGriView, and a 3 Tabpage TabControl,
Datasource of the DataGriView, is a result of Query.
By default, the first record in the DataGriView, with its corresponding informations is the values in the textboxes inside the tabpages(TabControl), and changes when I select a record from my DataGriView... But everytime i click on the other tabpages, record on the DataGriView incements, that if i click the tab pages 6 times, the record count on the DataGriView increments by 6 times.
i dont know what to do??? :(
推荐答案
我不确定为什么有这么多人发布来告诉我们他们的代码有什么问题,但是不发布任何代码所以我们可以'根本帮不上忙.
I am not sure why so many people post to tell us what is wrong with their code, but don''t post any code so we can''t help at all.
这篇关于datagridview数据在tabcontrol select上刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!