473,385 Members | 1,769 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,385 software developers and data experts.

Datagrid - preventing the user from adding rows

Hi,

I've an app which has a datagrid embedded, but whenever the user navigates
to the last row & presses the down arrow (or clicks with the mouse just below
the last row), I see an additional row added, full of nulls. Is there an easy
way to prevent this extra row?

Cheers
--
Neil Arnold
Haven Systems Ltd
www.haven-systems.co.uk
Nov 17 '05 #1
4 1763
Neil Arnold wrote:
Hi,

I've an app which has a datagrid embedded, but whenever the user navigates
to the last row & presses the down arrow (or clicks with the mouse just below
the last row), I see an additional row added, full of nulls. Is there an easy
way to prevent this extra row?

Cheers

You need to add your datatable to a dataview object. Then set the
DataView.AllowNew = False. Then bind the dataview to your datagrid.

Hope this helps.
Chris
Nov 17 '05 #2
Neil Arnold wrote:
Hi,

I've an app which has a datagrid embedded, but whenever the user navigates
to the last row & presses the down arrow (or clicks with the mouse just below
the last row), I see an additional row added, full of nulls. Is there an easy
way to prevent this extra row?

Cheers

You need to add your datatable to a dataview object. Then set the
DataView.AllowNew = False. Then bind the dataview to your datagrid.

Hope this helps.
Chris
Nov 17 '05 #3
See the FAQ entry linked below...
http://www.syncfusion.com/faq/window...earch/653.aspx

--
Tim Wilson
..Net Compact Framework MVP

"Neil Arnold" <Ne********@discussions.microsoft.com> wrote in message
news:85**********************************@microsof t.com...
Hi,

I've an app which has a datagrid embedded, but whenever the user navigates
to the last row & presses the down arrow (or clicks with the mouse just below the last row), I see an additional row added, full of nulls. Is there an easy way to prevent this extra row?

Cheers
--
Neil Arnold
Haven Systems Ltd
www.haven-systems.co.uk

Nov 17 '05 #4
See the FAQ entry linked below...
http://www.syncfusion.com/faq/window...earch/653.aspx

--
Tim Wilson
..Net Compact Framework MVP

"Neil Arnold" <Ne********@discussions.microsoft.com> wrote in message
news:85**********************************@microsof t.com...
Hi,

I've an app which has a datagrid embedded, but whenever the user navigates
to the last row & presses the down arrow (or clicks with the mouse just below the last row), I see an additional row added, full of nulls. Is there an easy way to prevent this extra row?

Cheers
--
Neil Arnold
Haven Systems Ltd
www.haven-systems.co.uk

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Soul | last post by:
*** I am not sure this question belong to *.languages.csharp or *.framework.windowsdorms.databinding, so I post to both *** Hi, Currently I have a DataGrid which bind to a DataSet. One of...
2
by: Clayton Hamilton | last post by:
I have a DataGrid on a webform bound to a Datasource and can successfully use <ItemTemplate> to create edit/update/cancel functionality for user maintenance of data. I use separate logic to delete...
0
by: sameer mowade via .NET 247 | last post by:
Hello All, I have problem while dynamically removing row from the Datagrid which i have added dynamically as shown in the following code snippet. The problem is that while removing dynamically...
0
by: Neil Arnold | last post by:
Hi, I've an app which has a datagrid embedded, but whenever the user navigates to the last row & presses the down arrow (or clicks with the mouse just below the last row), I see an additional...
5
by: John Richardson | last post by:
I've been bothered for some time about my DataGrid not populating my rows very quickly. I have about 10K rows loading into the grid. I create a datatable dt with 2 columns, an ID and a display. ...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
1
by: Andrew | last post by:
Hey all, I am very new to ASP.Net (and .Net in general), but that isn't stopping the boss from wanting to begin new projects in it. This latest project has me kinda stumped and after a couple...
10
by: Aaron Smith | last post by:
If I have a datagrid and the bound data file only have 4 rows in it, the grid will show the 4 rows. However, there is blank space below that until it reaches the bottom of the grid. Is there a way...
13
by: shookim | last post by:
I don't care how one suggests I do it, but I've been searching for days on how to implement this concept. I'm trying to use some kind of grid control (doesn't have to be a grid control, whatever...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.