473,513 Members | 11,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid Editing question

I am using a datagrid structure that allows users to enter new rows or edit
existing ones. However, some columns are read only and their values depend
on the user input in the other columns. I set the value of the read-only
columns as soon as a cell is edited by using the currentcellchanged event.

This works well only if after editing the contents of the cells I stay
within the same row. If I change the contents of the cell then click into
another row the value that I just changed does not get updated until next
time I click on that row.

Any idea on how to get the value updated even if I leave the row?

Thanks
Nov 21 '05 #1
5 973
Miri,

When I understand you well, is for that the datatable datacolumn expression
much easier to use.

http://msdn.microsoft.com/library/de...ssiontopic.asp

I hope this helps?

Cor
Nov 21 '05 #2
Hi

I am currently loading a dataset from a database to the datagrid. How do I
go about adding a datacolumn to the grid?

Thanks for any help,

Miri

"Cor Ligthert" <no************@planet.nl> wrote in message
news:eV**************@TK2MSFTNGP12.phx.gbl...
Miri,

When I understand you well, is for that the datatable datacolumn expression much easier to use.

http://msdn.microsoft.com/library/de...ssiontopic.asp
I hope this helps?

Cor

Nov 21 '05 #3
Miri,

Use datagridtablestyles and everything what is behind that

http://msdn.microsoft.com/library/de...tylestopic.asp

Cor
Nov 21 '05 #4
Thank you, that really helped!

I am still having one problem, I'm not sure how to update the datacolumn's
expression when a new row is added by the user. Any ideas?

Thanks,

Miri
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Miri,

Use datagridtablestyles and everything what is behind that

http://msdn.microsoft.com/library/de...tylestopic.asp
Cor

Nov 21 '05 #5
Miri,
I am still having one problem, I'm not sure how to update the datacolumn's
expression when a new row is added by the user. Any ideas?


Yes that is done automaticly, there is nothing to update, you have said that
that column exist in the table and that an expression should be used for
that.

:-)

I hope this helps?

Cor
Nov 21 '05 #6

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

Similar topics

11
5902
by: Junkguy | last post by:
I need some help programmatically causing a row in a DataGrid to "flush" its contents to its bound data (in Visual Studio 6 using Windows Forms with C#). My issue is I want to send an update to...
3
4236
by: Bill C. | last post by:
Hello, I know this has been discussed a lot already because I've been searching around for information the last few weeks. I'm trying to implement a DataGridComboBoxColumn class. I've found...
3
6063
by: Zürcher See | last post by:
Someone has implemented a Datagrid Button for the Windows.Form?
3
2530
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
16975
by: Dominic | last post by:
Hi guys, I'm not sure if this question belongs to FAQ, but I couldn't find a concrete answer. I created a Datagrid control using ItemTemplate, but it's NOT a in-place editing datagrid. One of...
7
3523
by: uiranejeb | last post by:
Hi everybody, I am an asp.net datagrid that have all the rows editable. An user can update any column from datagrid. I'm trying to find a way to update only the rows that were updated. How can...
8
2395
by: pmud | last post by:
Hi, I have 2 questions: 1. I have an editable data grid with 21 columns. I need to edit only 2 cloumns in this data grid. But when the grid is displayed in Edit mode, all the columns show long...
1
1220
by: MrMike | last post by:
I have a sub named Bind("") which binds my a datagrid on my webform. In order to enter edit mode and edit records on this datagrid, I must make a call to Bind("") either before or after I place...
2
7415
by: Sharon | last post by:
I want put into my DataGrid different control types in the same column. For example: Column 1, row 0 ==> TextBox Column 1, row 2 ==> CheckBox Column 1, row 2 ==> ComboBox etc... As I see, I...
8
1972
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
7254
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
7373
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
7432
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...
1
7094
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...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.