Last post Jan 14, 2011 09:54 PM by decker dong - msft
Jan 12, 2011 11:39 AM|blackbird11i|LINK
I created a very simple real-time Chat/Comment box. where i used AJAX Timer for refreshing the window. I used ASP.NET(C#) & XML for store the data. well my question is i used GRIDVIEW to showing the message. i want whenever the Webpage load the GRIDVIEW
alway be empty whatever it is data in the XML or not (start from new message on load)... is there any command to show empty on the PAGE LOAD?? i dont want to disable or Invisible the gridview.
XML .Net C# Gridview ASP.NET
Jan 12, 2011 04:32 PM|Blast2hell|LINK
Not to steer you to far off your course, but a chat is more of a single column thing generally, so a ListView control may meet your needs better. And you can just use the emptydatatemplate of the listview to solve your problem.
Jan 14, 2011 09:54 PM|Decker Dong - MSFT|LINK
Once you set the GridView's DataSource and in fact there are quite a lot of data a GridView cannot be empty!
My solution is that you should put a button (something like a linkbutton or something as a trigger control). in the click event
to dynamically start the timer. and in the timer_tick event bind the GridView again and again.