473,856 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

windowsform datagrid modigy data in cell problem

Hi.

I am using a windowsform datagrid to modify a table. The DataSet seems to be
filled fined. The DataTable seems to be ok. I am not using 'read only'
anywhere.
The DataSource seems to be well asigned. The DataMenber assigned to the
table.

One column of the DataSet is decimal type.

For some rare reason I am unable to modify the data on this 'amount' column.

When editing, i am able to input data into the column, but as soon as I
press tab to
go to next column, the original data shows again in the cell i was trying to
modify.

Two questions.
a.) Any hint on how can I get the input data work properly?,
b.) is there some sort of "textchange d" event (from text box control)
where i can 'catch' the text being input in the cell, to assign it directly
to the data row? or something?
Thanks,
Raul
Nov 17 '05 #1
1 1606


Upssssss.....
Checking and re-checking i found that the DataColumns in the DataSet
was 'readonly' (it was originated in a calculated field on the database,
so the drag & drop function created the DataTable with the column read
only).

Also found that even I can not determine whether the cell in the datagrid
is being changed, i found the "ColumnChanging " event in the DataTable
wich did let me check up the proposed value before is is assigned ...
Thanks for reading. :)

Raul


"Raul Cortes" <no****@nowhere .com> wrote in message
news:Or******** ******@tk2msftn gp13.phx.gbl...
Hi.

I am using a windowsform datagrid to modify a table. The DataSet seems to
be
filled fined. The DataTable seems to be ok. I am not using 'read only'
anywhere.
The DataSource seems to be well asigned. The DataMenber assigned to the
table.

One column of the DataSet is decimal type.

For some rare reason I am unable to modify the data on this 'amount'
column.

When editing, i am able to input data into the column, but as soon as I
press tab to
go to next column, the original data shows again in the cell i was trying
to modify.

Two questions.
a.) Any hint on how can I get the input data work properly?,
b.) is there some sort of "textchange d" event (from text box control)
where i can 'catch' the text being input in the cell, to assign it
directly to the data row? or something?
Thanks,
Raul

Nov 17 '05 #2

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

Similar topics

14
2115
by: Jack Kaufmann | last post by:
I am trying to verify a datagrid in which there must be an entry in both columns of any new row, and those values must be greater than the corresponding values in the previous row. It is pretty simple to verify the cell the user starts in by invoking a verifying event for the underlying textbox in that cell, but what I would like to do is to change the focus to the other column in the new row if it has not been filled in. If in handling...
2
1269
by: Wayne Gibson | last post by:
Hi all, Was wondering if somebody could help me or at least point me in the right direction... I have a System.Windows.Forms.DataGrid, which is bound to a dataset. I would like to hide certain columns, so that the user can't see them.. Also was wondering if it was possible if when a cell was selected the whole row is selected..
11
5960
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 a database from a menu command while the user is editing a DataGrid. This is unusual in regard to examples and normal practice in that the cell of the DataGrid still has the focus. In all examples I can find, the user normally presses a button on...
2
9935
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell (multi-select without modifier keys). I got that working fine, but I also wanted to keep rows selected after a sort, which I do by storing the row's id in an arraylist. The idea was to do the sort and then go back and re-select the rows with that...
0
3199
by: Emerson | last post by:
The following assumes a System.Windows.Forms.DataGrid with a System.Data.DataTable set as the DataSource. I'm programming in C# Here's my scenario I click in a cell on a DataGrid. I enter some text. Before changing to another cell in the DataGrid, I move my mouse pointer off the DataGrid and change the selected item in a ListBox or TreeView. Here's my question Which should fire first, the DataTable's RowChanged/CellChanged event or...
1
4502
by: PawelR | last post by:
Hello group, In my application, I have form with DataGrid. Rows in dataGrid are from table. myDG.DataSource = myTable; In Table I have collumn boolean type. On Click (Mouse_up event) on the dataGrid I change value in this column
4
6139
by: tg | last post by:
Visual Studio 2003 My problem is that I am dynamically creating a datagrid on pageload. The datagrid is completely dynamic as it is based on the number of columns returned from a recordset. The number of columns could change very often. Within this datagrid that is created, each cell needs to be colored different colors based on a the value within the cell. For example, if the number is less than 90, color the cell red, if it is...
9
2734
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the code: <script runat="server"> Dim sqlConn As New SqlConnection(".....") Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) If Not (Page.IsPostBack) Then FillDataGrid()
2
6600
by: =?Utf-8?B?Y3JlYXZlczA2MjI=?= | last post by:
I have a nested datagrid in a xaml file, the parent datagrid loads the vendor information and the details loads the documents for that vendor in a datagrid. Everything is working fine until I click in the child datagrid and then go to the combobox and choose another vendor. When the new vendor is loaded nothing shows in the datagrid but the itemsource shows the info is there. Know if I click on the child cell and then click back on the...
0
9919
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9763
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11061
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10787
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7932
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7098
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5960
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4176
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.