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

Starting on Blank Row in DataGrid

P: n/a

Does anyone know the best way to put the cursor in the "blank" row of an
editable datagrid when it is initially displalyed?

I need to present the user with a list of rows from a dataset, but I want to
put the cursor in the first cell of the blank row so they can begin adding
data immediately instead of scrolling to the bottom.

Thanks in advance.

--
Junkguy
Nov 15 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,
Just create a DataSet with one empty DataRow and bind to
the datagrid.

Regards,
Amal
-----Original Message-----

Does anyone know the best way to put the cursor in the "blank" row of aneditable datagrid when it is initially displalyed?

I need to present the user with a list of rows from a dataset, but I want toput the cursor in the first cell of the blank row so they can begin addingdata immediately instead of scrolling to the bottom.

Thanks in advance.

--
Junkguy
.

Nov 15 '05 #2

P: n/a
In article <0d****************************@phx.gbl>,
"Amalorpavanathan Y \(Amal\)" <am*********@lycos.com> wrote:
Hi,
Just create a DataSet with one empty DataRow and bind to
the datagrid.

Regards,
Amal
Thanks,

My issue is that I have a DataSet with existing rows in it already. The
DataSet is bound to the DataGrid and I call someDataAdapter.Fill(theDataSet)
which fills the DataSet and presents it in the DataGrid. I want to place the
cursor for the user at the very bottom of this list in the "blank" row so the
user can start typing in new data without scrolling to the bottom. I need to
know the correct (read non-hack) way to do this.
-----Original Message-----

Does anyone know the best way to put the cursor in

the "blank" row of an
editable datagrid when it is initially displalyed?

I need to present the user with a list of rows from a

dataset, but I want to
put the cursor in the first cell of the blank row so they

can begin adding
data immediately instead of scrolling to the bottom.

Thanks in advance.

--
Junkguy
.


--
Junkguy
Nov 15 '05 #3

P: n/a
I think that;

datagrid.currentRowindex = dataset.tables[strTableName].Rows.count;

should work. If you're using a dataview, access the dataviews' rows.count
property

HTH,

Marco
"Junkguy" <ju*****@columbus.rr.com> wrote in message
news:ju***************************@news-server-fe-02.columbus.rr.com...

Does anyone know the best way to put the cursor in the "blank" row of an
editable datagrid when it is initially displalyed?

I need to present the user with a list of rows from a dataset, but I want to put the cursor in the first cell of the blank row so they can begin adding
data immediately instead of scrolling to the bottom.

Thanks in advance.

--
Junkguy

Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.