Gridview empty
-
How to set Gridview.Datasource = empty? How to show a message inside the gridview like "No records" in C#? Gridview.Emptydatatemplate = "No records" does not work.
------------------------------------------------------------ "The only true wisdom is in knowing you know nothing." --Socrates
-
How to set Gridview.Datasource = empty? How to show a message inside the gridview like "No records" in C#? Gridview.Emptydatatemplate = "No records" does not work.
------------------------------------------------------------ "The only true wisdom is in knowing you know nothing." --Socrates
DotNetXenon wrote:
How to set Gridview.Datasource = empty?
Don´t set. Just call Gridview.DataBind(); and your GridView will be empty.
DotNetXenon wrote:
How to show a message inside the gridview like "No records" in C#?
Before calling Gridview.DataBind();, set Gridview.EmptyDataText = "No records";