views:

1044

answers:

1

So what does this exactly means?

Some advised that to circumvent around this error, only bind a gridview to a dataset when the rows count of the datatable is greater than zero.

but how about if for example your search yielded no record returned, so your datatable would have no rows, but still, you can still bind to the dataset?

Aside from checking if rows are in the dataset (or datatable), how would I ensure that the ilist contains valid datasource?

what's the best method for this?

A: 

make sure you use this if (!this.IsPostBack) { }

also You can check the dataSet.Tables.Cout > 0 Then return dataSet else return null;

I thinks the DataSet return have Count = 0