Link to home
Start Free TrialLog in
Avatar of running32
running32

asked on

Datagrid problem

I am running the procedure below on my vb.net page when ever the datagrid is clicked.  it is picking up the correct screenid number but when the page is viewed if the dataset has no records in it the datagrid remains keeps the same records.  Can someone tell me how to get it to switch to no records if none are returned.

Thanks

   SqlDataAdapter6.SelectCommand.Parameters("@paramid").Value = screenid
     SqlDataAdapter6.Fill(DsPAScreen61, "tblPAPhoneVoucher")
        DataGrid1.DataSource = (DsPAScreen61)
        DataGrid1.DataMember = "tblPAPhoneVoucher"
Avatar of Xeavn
Xeavn

Try using

DataGrid1.DataBind()

after setting the DataSource.
Avatar of running32

ASKER

It tells me datagrid is not a member of form.datagrid
ASKER CERTIFIED SOLUTION
Avatar of newyuppie
newyuppie
Flag of Ecuador image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That's it thanks
your welcome.
thanks for the grade
NY