Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
14607 | Jun 1,2004 06:26 AM UTC | Jun 2,2004 12:32 PM UTC | WinForms | 7 |
![]() |
Tags: GridControl |
this.gridControl1[2,2].CellType = "Control";
this.gridControl1[2,2].Control = this.monthCalendarAdv1;
But if you want to use more than 1 or 2 of these, you should derive your own cell control. Take a look at this sample, 2.0.5.1\Grid\Samples\CellTypes\CalendarCells. It uses a MonthCalendar, but I think you should be able to do something similar with a derived class.
public class MyMonthCalendarAdv : MonthCalendarAdv { protected override void InitializeGrid(ref Syncfusion.Windows.Forms.Grid.GridControlBase grid) { base.InitializeGrid(ref grid); grid.Model.QueryCellInfo += new GridQueryCellInfoEventHandler(grid_QueryCellInfo); } Button b = new Button(); private void grid_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e) { if(e.ColIndex == 3 && e.RowIndex == 2) { e.Style.CellType = "Control"; e.Style.Control = b; } } }
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.
This page will automatically be redirected to the sign-in page in 10 seconds.