By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,900 Members | 1,453 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,900 IT Pros & Developers. It's quick & easy.

Blank DataGrid

P: n/a
Is it possible to start with a blank datagrid and enter the information like an excel spread sheet? This doesn't seem to be the case. If it doesn't work that way, is there another control I can use other than inserting a spread sheet?
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You could create a DataTable with however many columns you wanted to show
and bind the grid to it. Just declare a DataGrid, then Add three or four
(or whatever) DataColumns to it. If you want x amount of rows by default,
then just iterate through a counter and add a New DataRow each time.

HTH,

Bill
"Eric" <an*******@discussions.microsoft.com> wrote in message
news:D0**********************************@microsof t.com...
Is it possible to start with a blank datagrid and enter the information

like an excel spread sheet? This doesn't seem to be the case. If it
doesn't work that way, is there another control I can use other than
inserting a spread sheet?
Nov 15 '05 #2

P: n/a
Well,

The DataTable is a good idea but for performance simply create a DataTable
with 1 row and A through X columns (when X is reached have an event create
AA - AX... and so on) then on a DataGrid you will have an * which will allow
you to add to the DataGrid... when the user is done he can then press "Save"
and then you save the DataTable to a CSV or to a DB, or whatever datastorage
you want o use (XML is also an option)

Mitch

"William Ryan" <do********@comcast.nospam.net> wrote in message
news:uY**************@tk2msftngp13.phx.gbl...
You could create a DataTable with however many columns you wanted to show
and bind the grid to it. Just declare a DataGrid, then Add three or four
(or whatever) DataColumns to it. If you want x amount of rows by default,
then just iterate through a counter and add a New DataRow each time.

HTH,

Bill
"Eric" <an*******@discussions.microsoft.com> wrote in message
news:D0**********************************@microsof t.com...
Is it possible to start with a blank datagrid and enter the information

like an excel spread sheet? This doesn't seem to be the case. If it
doesn't work that way, is there another control I can use other than
inserting a spread sheet?

Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.