Click here to Skip to main content
15,906,625 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have not found any data in gridview in asp.net.and gridview is also invisiable on runtime.
Posted
Updated 3-Nov-11 1:39am
v2
Comments
Priyavadhanam 26-Jan-12 12:53pm    
Hi,
I encounter the similar problem,To explain in detail, I have placed a grid view in the aspx page with 3 bound columns and the datasource for the gridview is the result set of a stored procedure.

Below is the sample code,

Dim cmd As New OracleCommand()
Dim DA As New OracleDataAdapter(cmd)
Dim DS As New DataTable
Details_grd = New GridView
con.Open()
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "SP_Name"
cmd.Parameters.Add(New OracleParameter("Services", OracleType.VarChar)).Value = RadioButtonList1.SelectedItem.Value
cmd.Parameters.Add(New OracleParameter("result", OracleType.Cursor)).Direction = ParameterDirection.Output
DA.Fill(DS)
Details_grd.DataSource = DS
Details_grd.DataBind()
con.Close()

the stored proc returns the dataset which i verified while debugging.

guess, somewhere i missed up something. may be overlooking for something very basic, will appreciate ur help.

Thanks..

Be more clear to get appropriate solution.

If the datasource binded to grid does not contain records then grid will not be visible at runtime.
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900