473,394 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Starting on Blank Row in DataGrid


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
3 1769
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eric | last post by:
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...
0
by: Junkguy | last post by:
I need to be able to tell if the blank row of a DataGrid has been edited or not. In a DataGrid, you may notice that if you click on the asterisk row, the asterisk will change to a triangle, but...
1
by: student | last post by:
Hello all, could someone explain why I'm getting a blank web page when I run start my code in a web browser? Here is the code: Imports System.Data.SqlClient Imports System.Data Public Class...
3
by: Big Dave | last post by:
I know it's been asked a million times before, but I still can't seem to find an answer that works. I've got a dropdown list in the footer template of a datagrid. The dropdown list databinds,...
2
by: drdave | last post by:
All is working well for my dropdown/datagrid except I cannot figure out how to set my ddl selected index when the value is blank/null. ie before edit mode the lblVariation text value is blank.....
3
by: tshad | last post by:
How do I get blank cells to show in my dataGrid? I am databinding to my datagrid, but any cells that are blank, don't show. Normally, you would put an &nbsp in the cell to make IE display the...
1
by: jason | last post by:
I've seen a few posts on this issue, but no clear solutions. I have a mulitiline textbox inside a datagrid. I use TemplateColumn to define as multiline with 3 rows. I have other field types...
2
by: Amir | last post by:
I really hope someone can explain this behavior. I have spend quite a bit of time and tried a bunch of things, so far nothing has worked. I have a page on which I have a datagrid with template...
6
by: SatishPasala | last post by:
Hi I tried all the things I know am out of ideas now. Can you guys help me out with this? I have 4 grids on a page with I load on the Page_Load event. One of the grids has paging. When I move...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.