473,811 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid EndCurrentEdit problem...

Hi
I have a parent detail relationship between two tables.
The detail records are shown in a datagrid (GridRemarks)
It is databound like this

GridRemarks.Dat asource = mainDatasource ' a shortcut to
myDataSet.tblPe rsons.DefaultVi ew
GridRemarks.Dat aMember ="tblPersons_tb lRemarks" ' The name of the parent
detail relation

And it works fine
But before I save I would like to end the current edits.
So I tried like this

Dim bmRemarks As BindingManagerB ase = BindingContext( mainDataSource,
"tblPersons_tbl Remarks")
bmRemarks.EndCu rrentEdit()

And like this
Me.BindingConte xt(GridRemarks. DataSource,
GridRemarks.Dat aMember).EndCur rentEdit()

But to no avail.
I do not get any errors. It just does not end the current edit.

Any suggestions?

TIA

Jan
Nov 21 '05 #1
2 1847
Jan,

Have you tried this?

Dim gridCurrencyMan ager As CurrencyManager = _
CType(Me.Bindin gContext(GridRe marks.DataSourc e, _
GridRemarksData Member), CurrencyManager )
gridCurrencyMan ager.EndCurrent Edit()

--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
"Jan Nielsen" <Re************ **@tiscali.dk> wrote in message
news:eY******** ******@tk2msftn gp13.phx.gbl...
Hi
I have a parent detail relationship between two tables.
The detail records are shown in a datagrid (GridRemarks)
It is databound like this

GridRemarks.Dat asource = mainDatasource ' a shortcut to
myDataSet.tblPe rsons.DefaultVi ew
GridRemarks.Dat aMember ="tblPersons_tb lRemarks" ' The name of the parent
detail relation

And it works fine
But before I save I would like to end the current edits.
So I tried like this

Dim bmRemarks As BindingManagerB ase = BindingContext( mainDataSource,
"tblPersons_tbl Remarks")
bmRemarks.EndCu rrentEdit()

And like this
Me.BindingConte xt(GridRemarks. DataSource,
GridRemarks.Dat aMember).EndCur rentEdit()

But to no avail.
I do not get any errors. It just does not end the current edit.

Any suggestions?

TIA

Jan

Nov 21 '05 #2
Hi Mike
Thanks for answering.
I have now, and it did not make any difference.

Best regards

Jan

"Mike McIntyre" <mi****@dotnets howandtell.com> skrev i en meddelelse
news:ui******** *****@TK2MSFTNG P12.phx.gbl...
Jan,

Have you tried this?

Dim gridCurrencyMan ager As CurrencyManager = _
CType(Me.Bindin gContext(GridRe marks.DataSourc e, _
GridRemarksData Member), CurrencyManager )
gridCurrencyMan ager.EndCurrent Edit()

--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
"Jan Nielsen" <Re************ **@tiscali.dk> wrote in message
news:eY******** ******@tk2msftn gp13.phx.gbl...
Hi
I have a parent detail relationship between two tables.
The detail records are shown in a datagrid (GridRemarks)
It is databound like this

GridRemarks.Dat asource = mainDatasource ' a shortcut to
myDataSet.tblPe rsons.DefaultVi ew
GridRemarks.Dat aMember ="tblPersons_tb lRemarks" ' The name of the parent
detail relation

And it works fine
But before I save I would like to end the current edits.
So I tried like this

Dim bmRemarks As BindingManagerB ase = BindingContext( mainDataSource,
"tblPersons_tbl Remarks")
bmRemarks.EndCu rrentEdit()

And like this
Me.BindingConte xt(GridRemarks. DataSource,
GridRemarks.Dat aMember).EndCur rentEdit()

But to no avail.
I do not get any errors. It just does not end the current edit.

Any suggestions?

TIA

Jan


Nov 21 '05 #3

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

Similar topics

3
1982
by: Dav | last post by:
I have a Winform with a derived datagrid and a button that adds a row to the datagrid in its Click event. The button has a shortcut text "&New Row". When I enter a value in a datagrid cell and then mouse click the button without tabbing out of the edited cell, everything is fine. If I hit Alt+N instead after editing the cell, the cell values are reset to the previous value of the cell before the button_click code is executed. I have...
6
1641
by: BFX | last post by:
Hi All, I have datagrid with binding on dataset this.grdMachineType.DataMember = "MachineTypes"; this.grdMachineType.DataSource = this.dsMachineTypes; After append new row in datagrid i call this
0
1276
by: Junkguy | last post by:
I need to be able to tell if the blank row of a DataGrid has been edited or not. In a DataGrid, you may notice that if you click on the asterisk row, the asterisk will change to a triangle, but no "new" blank asterisked row will be added to the bottom *until* you type some data. How can I tell if you have begun to type data into this row or not? Here is the reason I need this. I need to call CurrencyManager.EndCurrentEdit() on a row...
2
368
by: ChrisM | last post by:
Can anyone please tell me what I'm doing wrong here. I have a Windows Form with a DataGrid on it, and I'm having real problems with the Sorting. It is easy to reproduce the problem I have. If you create a new Windows Application Put a DataGrid control on it. Put the following in the onload event of the form:
20
2038
by: MadCrazyNewbie | last post by:
Hey group, I keep getting the following error: "An unhandled exception of type 'System.IndexOutOfRangeException' occurred in system.data.dll Additional information: There is no row at position 1." on the following line of code:
3
3374
by: elziko | last post by:
I have a DataTable bound to a DataGrid. When a user clicks on a row on the DataGrid I use: MyDataTable.Rows(MyDatagrid.CurrentRowIndex).Item(0) to do some work with the value in the first cell for the currently selected row. However, when I delete a row (using the delete key oin the grid) and try and do the above on the row that has now taken the deleed roe's position in the grid I get the following exception:
0
367
by: Jan Nielsen | last post by:
Hi I have a parent detail relationship between two tables. The detail records are shown in a datagrid (GridRemarks) It is databound like this GridRemarks.Datasource = mainDatasource ' a shortcut to myDataSet.tblPersons.DefaultView GridRemarks.DataMember ="tblPersons_tblRemarks" ' The name of the parent detail relation
6
2052
by: Jan Nielsen | last post by:
Hi I asked this question some weeks ago, but have found no soluion yet, so I try again I have a parent detail relationship between two tables. The detail records are shown in a datagrid (GridRemarks) It is databound like this GridRemarks.Datasource = mainDatasource ' a shortcut to myDataSet.tblPersons.DefaultView
1
1601
by: Agnes | last post by:
my datagrid is bind to the table, I need to check clear when the user didn't input the figure. my code list as follow. when the datagrid got less then 100 tables, the code works, However, when it over 100 rows. it can't work. Does anything wrong with my code ? Please help P.S - I can't use delete since the user remove the unused record before save. Dim cm As CurrencyManager = Me.BindingContext(dsRvPvHeader,
0
9727
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
9605
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
10386
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10398
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,...
0
6889
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
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3017
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.