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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridControl, MonthCalendar, BindingContext

Thread ID:





5050 Jun 16,2003 10:44 PM UTC Jun 17,2003 07:50 AM UTC WinForms 1
Tags: GridControl
Jorge Codina
Asked On June 16, 2003 10:44 PM UTC

I have multiple cells in a GridControl that are of type MonthCalendar. Certain of these are assigned the same DateTime object in the CellValue, and if one is changed, the others with the same value should also change. (But ideally these latter would not fire a SaveCellInfo event.) I have made one attempt to make this happen by creating a new BindingContext(), then assigning it to the CellModel.BindingContext for all related cells. However, this had no effect. Any suggestions?

Administrator [Syncfusion]
Replied On June 17, 2003 07:50 AM UTC

Because of the Control sharing architecture used by the grid cells (ie, there is 1 MonthCalendar control shared among all cells of MonthCalendar type), I don't think 'Control.BindingContext functionality' will work here. Instead, I would try to use the grid's QueryCellInfo and SaveCellInfo events to bind all the cells to the common value. Here is how you might go about. Choose one of the cells to be the master cell (the one that will actually hold the value) and think of the other cells as being slave cells. In QueryCellInfo, if e.RowIndex and e.ColIndex point to one of your slave cells, set e.Style.CellValue = grid[masterRow, masterCol].CellValue. In SaveCellInfo, if e.RowIndex and e.ColIndex point to one of your slave cells, set grid[masterRow, masterCol].Cellvalue = e.Style.CellValue. I think this should do it though I did not actually try it to see if I missed anything.


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