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.
Unfortunately, activation email could not send to your email. Please try again.

UserControl in GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

24020 Jan 26,2005 09:12 PM Jan 27,2005 12:51 AM Windows Forms 2
loading
Tags: GridControl
Adit
Asked On January 26, 2005 09:12 PM

Hi there, I wonder if its possible to put a usercontrol into a griddataboundgrid ?, seems like ppl use gridControl. I have tried to set the celltype to "Control", and set the usercontrol into the control property but it doesnt work. Do i have to do something like in the ''RepeaterUesrControlSample'' example ? Thank you,

Adit
Replied On January 26, 2005 10:42 PM

Hi, I just want to add 1 more question. How to change the border colour of the cell in the griddataboundgrid when it''s selected ? Thanks,

Administrator [Syncfusion]
Replied On January 27, 2005 12:51 AM

You cannot change cell style properties (other than CellValue/Text) in a GridDataBoundGrid using an indexer. Instead, you have to use an event, either grid.PrepareviewStyleInfo or grid.Model.QueryCellInfo. See these KB''s. http://64.78.18.34/Support/article.aspx?id=560 http://64.78.18.34/Support/article.aspx?id=10351 If you want to draw the currentcell border, you can handle the DrawCurrentCellBorder event. Here is a handler that will draw it red. private void gridDataBoundGrid1_DrawCurrentCellBorder(object sender, GridDrawCurrentCellBorderEventArgs e) { Rectangle r = e.Bounds; r.Width = r.Width - 1; r.Height = r.Height - 1; e.Graphics.DrawRectangle(Pens.Red, r); e.Cancel = true; //so grid does not overdraw }

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.

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.

;