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

Forcing a datagrid row to commit

How do I force the Commit event to fire on a datagrid?
--
Pat
Nov 21 '05 #1
7 3165
Sorry, I suppose it is not the ColumnStyle.Commit event that I need.
Basically, I think I need to do a BindingManagerBase.EndCurrentEdit on the
current row in the datagrid. How do I do it?

Thanks,
--
Pat
"pmcguire" wrote:
How do I force the Commit event to fire on a datagrid?
--
Pat

Nov 21 '05 #2
Pat,

Seriously, what is the reason that you ask it. The moment that you do an
update is mostly soon enough.

Cor
Nov 21 '05 #3
Yes, you would think so wouldn't you?
I have a UserControl with a datagrid on it. It displays child records for
the UserControl's BindingContext. When there are no child records and the
user creates one by editing the New Record row in the datagrid, and then
navigates away from the parent record, the new child record does not get
retained. This problem does not happen if a child record already exists, or
if the user first navigates away from the new child record within the
datagrid (by moving to the next row), and THEN navigates to a different
parent record.

What is going on?

Thanks,

--
Pat
"Cor Ligthert" wrote:
Pat,

Seriously, what is the reason that you ask it. The moment that you do an
update is mostly soon enough.

Cor

Nov 21 '05 #4
Pat,

Do you real think that you can get this kind of help from a newsgroup.
Involved are:
a usercontrol
a resource
databinding
datarelations
more tables
a special way of handling by you.

Sorry I don't think at least that this in the way you give the problem to us
it is for me to complex to give a serious answer.

Cor
Nov 21 '05 #5
Sure Cor, I could give MUCH more detail. How likely would that have been to
elicit any response whatever?

I will post as much of the code for the UserControl as you think necessary
or are interested in seeing.

Clearly you understand the complexity of the situation; I thought my
question might jog the memory of someone who had experienced similar problems
and that might lead ME to a solution. To me, a newsgroup seems a very good
place to start.

--
Pat
"Cor Ligthert" wrote:
Pat,

Do you real think that you can get this kind of help from a newsgroup.
Involved are:
a usercontrol
a resource
databinding
datarelations
more tables
a special way of handling by you.

Sorry I don't think at least that this in the way you give the problem to us
it is for me to complex to give a serious answer.

Cor

Nov 21 '05 #6
Pat,

This kind of situations did me decide that when I use a datagrid not to use
the standard addrow. However to create buttons for this kind of things, what
can I say more?

Cor
Nov 21 '05 #7
Yes, I think I've decided the same thing.

Thanks,

--
Pat
"Cor Ligthert" wrote:
Pat,

This kind of situations did me decide that when I use a datagrid not to use
the standard addrow. However to create buttons for this kind of things, what
can I say more?

Cor

Nov 21 '05 #8

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

Similar topics

0
by: Faith | last post by:
I found code on www.codeproject.com. Here is a sample it is called DataGridColumnDropDown. I modified it to use the text box when I wanted it to depended on a certain search criteria. Public...
1
by: Marcel Czerny | last post by:
Hi, I've got some troubles with exporting data base entries from an "Access"-table (ver. 10) into an "Oracle"-table (ver. 9.2) using the "Oracle-ODBC-driver". At first I linked the...
3
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can...
2
by: pei_world | last post by:
I want to implement a key hit with enter to dropdown a combobox that is in the datagrid. in this case I need to override its original behaviours. I found some codes from the web. Does anyone know...
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...
5
by: jaYPee | last post by:
i have successfully added a combobox to my datagrid by setting their datasource from one of my table. here's my code... Dim grdColStyle6 As New DataGridComboBoxColumn() With grdColStyle6...
1
by: jimb | last post by:
I can get the dropdownlist into the datagrid, and I can populate it, but I can't read it. Anybody have a working example of a dropdownlist in an editable grid? Thanks. -- .....
6
by: Ron L | last post by:
I have a dataset whose source is a SQL 2k stored procedure that I am trying to display in a datagrid. This datasource has 4 columns that I am interested in here, a text column and 3 value columns...
0
by: Familjen Karlsson | last post by:
Hi I have downloaded some code and tried it and nothing happens with the datagrid. Explain what is wrong and what I have to do please. I have tried to Import the namespace Hamster and it didn't...
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...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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...

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.