hello every one;
i have one problem. the problem is my gridview is not displaying in the webform. i am using asp.net for front end and csharp for programming. this is my code . there are no exception and no error in my code. but gridview is not display.
regards
sumaira
Loading

Satyapriya NayakPosted Sep 6, 2011, 4:45 AM
There might be space in the BoundField DataField i saw check it
Thanks
If this post helps you mark it as answer
Prabhu RajaPosted Sep 6, 2011, 4:10 AM
The Problem is with Select Query.
In your markup language, you Set GridView DataField to Various names, So use your Select query to alias in name with datafield. Like this
Select doctoorid as doctor id , userid as user id, name as name, days as days, timing as timing from table.
the Alias names in query should match your Datafield in gridview.
I attached my Source Code Here. Its Working. See it.
NarayanPosted Sep 6, 2011, 4:08 AM
{
SqlCommand cmd = new SqlCommand("select doctorid,userid,name,days,timing from [doctor]");//,connection.get());
cmd.Connection = connection.get();
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.SelectCommand = cmd;
da.Fill(ds);
GridView_doctor.DataSource = ds.Tables[0];
GridView_doctor.DataBind();
}
In ASPX File change