TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bineesh Viswanath
NA
1k
780.1k
GridView in ASP.NET
Sep 19 2013 1:32 AM
Sir, I am working with asp.net Grid.
My issue is that Grid is not displaying on page load in case of no data in sql Table.
But Grid is showing on page load when i inserted data into table.
can display Grid without data in it?, if can, please send me the code.
Here the code I do:-
public void GridFill()
{
DA = new SqlDataAdapter("select * from tbl_Employee", sqlCon);
dtbl = new DataTable();
DA.Fill(dtbl);
cmdbuilder = new SqlCommandBuilder(DA);
gvEmployee.DataSource = dtbl;
gvEmployee.DataBind();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GridFill();
}
}
Please help me in this topic.
Reply
Answers (
6
)
DataList to json Conversion.
Linq to Join DB and display in chart