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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid (DataSource?) Losing State

Thread ID:





6143 Aug 1,2003 05:24 PM UTC Aug 1,2003 10:14 PM UTC WinForms 1
Tags: GridControl
scot adams
Asked On August 1, 2003 05:24 PM UTC

I have an Invoice grid, and an Invoice Line grid that are linked with a parent/child relationship. The datatables that fill the grids, both have a bool column, so each grid has a checkbox in the first row. On the mouse up event, I fire the method below. This method checks the status of the checkbox in the Invoice (parent) table, and sets the checkboxes in the Line (child) grid to the same value. All the values check as expected, but when I click on a differnt row in the Invoice (parent) grid, and then back to one of the rows that I clicked the checkbox, the correspoding Lines will have a checkbox that is no longer checked (and vice versa with when unchecking). It usually occurs with the last checkbox in the child grid, and is inconsistant. private void gridInvoices_MouseUp(object sender, MouseEventArgs e) { GridCurrentCell cc = gridInvoices.CurrentCell; int row = cc.RowIndex; int col = cc.ColIndex; if(col == 1) { for(int i = 0; i < gridLines.Model.RowCount;i++) { gridLines[i+1,1].Text = gridInvoice[row,col].Text; } } }

Administrator [Syncfusion]
Replied On August 1, 2003 10:14 PM UTC

Try calling Binder.BeginEdit and Binder.EndEdit to see if this takes care of the problem. gridLines.Binder.BeginEdit(); gridLines[i+1,1].Text = gridInvoice[row,col].Text; gridLines.Binder.EndEdit();


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon