Hi Everyone,
I've been working on this error all day! I have a dataview created from a sqldatasource control and I'm trying to assign it to a gridview but I get Object reference not set to an instance of an object.
Code:
Can't I assign a dataview as a datasource? Or not?Code:Try Session("dsCustomer") = "Y" dsCustomer.SelectParameters("SEARCH1").DefaultValue = Trim(txtAccountNo.Text) Dim dv As DataView = DirectCast(dsCustomer.[Select](DataSourceSelectArguments.Empty), DataView) If dv.Count > 0 Then C1GridView4.DataSource = dv C1GridView4.DataBind() C1GridView4.Visible = True
Thanks!




Reply With Quote