Draw datagrid with no data

  • Thread starter Thread starter dave
  • Start date Start date
D

dave

Hello All -

Ive got a datagrid that displays results of a user search. How can I
show the datagrid even when no results are found? I.e., and empty
datagrid? Right now, it disappears in this case.

Thanks.
Dave
 
Hi,

You can call the Datagrid's databind command to get it to show, since you
already set the Datasource and Datamember for this Datagrid, even when the
Dataset is empty (with no result), you still need to call the command to
get the empty datagrid to show: Datagrid1.Databind()

Hope it helps.

Aiwen
Visual Basic Testing
 
Can you be more specific regarding what you call the "databind
command"? This is not a method of the DataGrid class.
 
Back
Top