Home > Software engineering >  The gridview problem
The gridview problem

Time:09-22


ObjDS is a DataSet control vaSprList is a gridview control
VaSprList. The DataSource=objDS. Tables (" tbl02 ") after the execution of this method vaSprList column count is zero, still objDS. The Tables in the column of the count is not 0

Under the condition of data is empty, this method cannot bind the DataSource column

CodePudding user response:

Be DataGridView
 Dim bSource As New holding () 
BSource. The DataSource=objDS. Tables (" tbl02 ")

VaSprList. AutoGenerateColumns=True '& lt; - key '
VaSprList. The DataSource=bSource

  • Related