Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all!!!!

I have a gridview in my Master page.I have taken an item template inside it. I have given some text to the controls initially.
In the design view of the content page gridview is visible but while running the page it's not showing gridview.
when i deleted gridview and put some simple text in place of it ,it's working .

i tried setting z- index and some peculiar things but nothing seems to work.Please help me out
Posted
Comments
Anuja Pawar Indore 24-Nov-11 4:30am    
It's better you place your code. Very difficult to identify what you are missing. Are you binding your grid or not?
ujjwal uniyal 24-Nov-11 5:50am    
I have not Binded it to any datasource yet. But i gave some text to the labels that are inside the table which is in the template field of the gridview.
Karthik Harve 24-Nov-11 5:31am    
what about the datasource of the gridview...? Have you specified any Datasource to the gridview..?? bind the grid with some data and check..
ujjwal uniyal 24-Nov-11 5:50am    
I have not Binded it to any datasource yet. But i gave some text to the labels that are inside the table which is in the template field of the gridview.
dinidusoft123 24-Nov-11 6:11am    
it happen because of post back. each time any other page load that inherit from master page, master page will load. Please bind the data source and then try what happen.. let post your code and then we can find solution easily.

It's better you place your code, by the time have a look at this link, might help you
http://stackoverflow.com/questions/5433794/programaticly-textbox-to-gridview-without-datasource[^]
Show GridView even if datasource is empty[^]
You need to bind your gridview.
 
Share this answer
 
v3
bind your gridview first
like this one:
C#
page_load()
{

gridview.Datasource = source();
gridview.Databind();

}


hope it helps!
 
Share this answer
 
v2
Comments
Anuja Pawar Indore 25-Nov-11 3:14am    
Added <pre> tag
Sometime it happens when u call any value in grid and the value called in grid is not connecting to ur backend then it happens so check the value is coming in ur values called in grid.

make a function of fillgrid();

public void fillgrid()
{
DataTable dt=new DataTable();
dt=yourclass.yourmethod
Gridview1.DataSource=dt;
Gridview1.DataBind();
}
now call this function in pageload as well as in ur save button link
 
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