Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to display empty table to datagrid

Answer Posted / radhat

This works, but it only provides one empty row.
It doesn't give you 100 empty rows as your code suggests.
To fix this I added:

dr = tbl.Rows.Add();

right underneath the .NewRow(); line

Hope this helps anyone looking for an empty table.

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you update a dataset in ado.net?

1004


What is sqldatareader in ado.net?

902


What are the differences between OLEDB and SQLClient Providers?

1134


What is csdl entity framework?

1002


oledbdataadpter with ms access in c#.net giving exception System.Data.OleDb.OleDbException while writing adapter.update(dataset,"tabname"); how to update the database from dataset?

2363


What are the parameters that control most of connection pooling behaviors?

993


What are the connected and disconnected modes in ado.net?

897


What do you mean by ‘batch updates’?

1030


What is a data control clerk?

1026


how you will deal result set? How do you sort a dataset?If a dataset contains 100 rows, how to fetch rows between 5 and 15 only?

994


What is the default timeout specified for "sqlcommand.commandtimeout" property?

1024


What are the uses of Stored Procedure?

1053


What is data adapter in ado.net with example?

1007


What are the important features of ado.net 2.0?

1060


How to load multiple tables into a dataset?

1034