Hi,
Gridview Delete button shown without any record
I am getting a problem in editable gridview
when click on button which is in my form
gridview delete button also shown without any record .
how to resolved it?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Rajeesh MenothRank #118 · 18.4K reputationPosted Jun 30, 2015, 1:56 AM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Jun 30, 2015, 3:07 AM EDT
// Check whether gridview is empty or not from the dataset // here ds is a dataset which holds values from database tables. if (ds.Tables[0].Rows.Count == 0) { // Gridview is empty now. // Add ur logic like below. // The column no 6 (start from 0) is 'lnkadd'. ((TemplateField)grdBuglist.Columns[6]).Visible = true; } else { // Gridview is having data. // The column no 7 is 'lnkedit' and 8 is 'lnkdelete'. ((TemplateField)grdBuglist.Columns[7]).Visible = true; ((TemplateField)grdBuglist.Columns[8]).Visible = true; } grdBuglist.DataBind();Sujeet SumanRank #790 · 2.9K reputationPosted Jun 30, 2015, 5:07 AM EDT