We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Refresh after CancelCurrentEdit

Thread ID:

Created:

Updated:

Platform:

Replies:

11253 Feb 29,2004 11:33 PM UTC Mar 1,2004 01:24 AM UTC WinForms 3
loading
Tags: GridControl
Paul Dorrell
Asked On February 29, 2004 11:33 PM UTC

How do you refresh the contents of a data bound grid afer cancelling the current edit on the underlying datasource Amd hints gratefully welcomed...

Administrator [Syncfusion]
Replied On February 29, 2004 11:36 PM UTC

You can call grid.Refresh() or grid.RefreshRange(...) to force the grid to redraw itself with new data from the DataSOurce.

Paul Dorrell
Replied On February 29, 2004 11:41 PM UTC

I''ve tried that, but it doesnt seem to work Heres my code... perhaps you can see something wrong ''Set up the grid with... Me.grdAsset.DataSource = Me.dsCustomer Me.grdAsset.DataMember = "select_customer.customer_asset" Dim assCol1 As New GridBoundColumn assCol1.MappingName = "cust_id" assCol1.HeaderText = "Cust" Dim assCol2 As New GridBoundColumn assCol2.MappingName = "country_group_id" assCol2.HeaderText = "Ctry" Dim dvAsset = New DataView(dsCustomer.Tables("select_country_group_list")) assCol2.StyleInfo.CellType = "ComboBox" assCol2.StyleInfo.DropDownStyle = GridDropDownStyle.Editable assCol2.StyleInfo.DataSource = dvAsset assCol2.StyleInfo.DisplayMember = "country_group_name" assCol2.StyleInfo.ValueMember = "country_group_id" assCol2.StyleInfo.ShowButtons = GridShowButtons.ShowCurrentCell Dim assCol3 As New GridBoundColumn assCol3.MappingName = "percentage" assCol3.HeaderText = "Pct" ''Me.grdAsset.GridBoundColumns.Add(assCol1) Me.grdAsset.GridBoundColumns.Add(assCol2) Me.grdAsset.GridBoundColumns.Add(assCol3) Me.grdAsset.Binder.InitializeColumns() ''Undo my changes with ..... Private Sub mnuDetailUndo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuDetailUndo.Click Me.BindingContext(dsCustomer, "select_customer").CancelCurrentEdit() Me.BindingContext(dsCustomer, "select_customer.customer_asset").CancelCurrentEdit() Me.grdAsset.Refresh() End Sub

Paul Dorrell
Replied On March 1, 2004 01:24 AM UTC

No need... I''ve fixed it. Forgotten to reject the Changes Many thanks for the help

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;