About grid view empty rows in the binded table

Posted by Yuvaopens under ASP.NET on 4/5/2012 | Points: 10 | Views : 2662 | Status : [Member] | Replies : 7
Hi Friends,

I had a grid view in my form. When there is no Records in it, it might have to display the Column names of that binded table............

Yuvaraj.S


Responses

Posted by: Self-Innovator on: 4/5/2012 [Member] Bronze | Points: 25

Up
0
Down
As per my knowledge...
GridView will get binded only if Dataset has the Values...If Dataset returns empty it wont bind

Join Hands Change lives
Thanks & Regards
Straight Edge Society

Yuvaopens, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Yuvaopens on: 4/5/2012 [Member] Starter | Points: 25

Up
0
Down
Ya but it having a method as empty data template in the design source we can make use of it. But it's not a standard format that's what I'm searching for the new way.

Yuvaraj.S

Yuvaopens, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 4/5/2012 [Member] Silver | Points: 25

Up
0
Down
In the empty data template you can have an image or static message.
If you want only column name then while take a snapshot of gridview remove the data part and make an image , then put it in empty data template ,
So , when you dont have data , this image will be displayed.

Mark it answer , if it solves your problem

Thanks,
Sanjay

Yuvaopens, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 4/5/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

You can use Gridview's Empty DataTemplate and write yous message what ever you want


R D Patel

Yuvaopens, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Yuvaopens on: 4/5/2012 [Member] Starter | Points: 25

Up
0
Down
Ya i know this method ji(See my above reply to Self- Innovator) .... I need an another method becoz it's not a standard one...........

Yuvaraj.S

Yuvaopens, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Yuvaopens on: 4/5/2012 [Member] Starter | Points: 25

Up
0
Down
Ya i know this method ji(See my above reply to Self- Innovator) .... I need an another method becoz it's not a standard one...........

Yuvaraj.S

Yuvaopens, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Aarlene on: 4/7/2012 [Member] Starter | Points: 25

Up
0
Down
Informative! thanks!

Yuvaopens, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response