473,385 Members | 1,615 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.

How to prevent moving to any row of the datagrid if there is error while editing.

Hi,

Friends, I have been developing datagrid program in .Net 1.1 and having VB.Net as a programming language.

I have created a datagrid which is bound to a datatable as its datasource. It also shows two columns and both are having comboboxes as its selection control. Data grid is editable and it allows Add, Delete, Modify functionalities.

I have also created event handler to trap any rowchanges (RowChanged event) in the grid. Here I check if there is any manipulation happend, it validates the changes and setting up error message.

Till now it works fine as expected. It shows me a red error icon with tooltip at the rowheader if there is any error editing datagrid values.

My problem is that even if it shows me errors, it allows user to move to any other row of the datagrid which I dont want. If there is error in one row of the datagrid, it should not allow user to jump to any other row.

Can anyone please help me to come out of this problem?

Thanks a lot,
Prerak
Oct 4 '07 #1
0 1057

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called...
2
by: Raj | last post by:
Hi, When we are sorting the DataGrid Boolean column the grid is becoming redcross. I have my own PPMIPDataGridBoolColumn class inherited from System.Windows.Forms.DataGridBoolColumn. In this...
4
by: Dave | last post by:
Hello All, I am having a nightmare trying to add a new row to my Datagrid. When I use the code below I get the error: 'Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount. Can...
7
by: Joe | last post by:
Hi, I’m new to asp.net. I want to create an asp.net page that allows user to edit the data. I have pasted my code below. I am able to display the data in a datagrid. At the bottom of the page...
3
by: Schultz | last post by:
is there an easy to follow, source code in one document, article that explains how to create an edit all DataGrid control? and, I have a DataGrid setup where the client enters information for...
2
by: Tor Inge Rislaa | last post by:
Prevent Adding new records in DataGrid Hi I have a DataGrid that I want to open for editing but the user should not be able to add new records. When I set the ReadOnly = False it is possible...
5
by: Sharon | last post by:
I have a DataGrid on my Form, and I wish to disable any cell editing. For example; when the user clicks on a cell, the cell become editable by changing its color to gray and context menu is shown...
3
by: jay.meerdink | last post by:
Greetings! I have a simple Windows form for editing. Search results are bound to a bindingsource and shown in a datagrid paired with a datanavigator. The current row's data is displayed in text...
8
by: =?Utf-8?B?bWlrZWc=?= | last post by:
Hi, I am building a small Help Desk application for my company and need to be able to edit "open" help desk issues. I use a simple datagrid to display each issue (6 per page) , with an Edit...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...

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.