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.

Cell Buttons

Thread ID:

Created:

Updated:

Platform:

Replies:

1699 Nov 19,2002 03:56 PM Nov 19,2002 05:05 PM Windows Forms 1
loading
Tags: GridControl
Ivan Pelly
Asked On November 19, 2002 03:56 PM

Hi - I'm attemting to implement cell buttons in the way that the CellButtons sample does, with the exception that my derived cell renderer inherits from GridStaticCellRenderer, not GridTextBoxCellRenderer (I made this choice because I only want a button in the cell, no text, but I'm open to suggestions). It works for the most part, except that I want the area inside the cell but outside the bounds of the button (i.e. the area in your example where the words "Browse me" appear) to be inert - i.e. not give the cell focus when clicked. Currently when I click in this area, the cell becomes current, with the single pixel black focus rectangle. I've added e.Style.ReadOnly = True to the code for Public Overrides Sub OnPrepareViewStyleInfo of my derived GridTextBoxCellRenderer, but to no avail, and I didn't want to set ShowCurrentCellBorderBehavior for the whole grid, just this column of buttons. Any ideas? Thanks

Administrator [Syncfusion]
Replied On November 19, 2002 05:05 PM

You can try handling the DrawCurrentCellBorder event and cancel it if the cell is your button.
private void gridControl1_DrawCurrentCellBorder(object sender, GridDrawCurrentCellBorderEventArgs e)
{
	if(gridControl1[e.RowIndex, e.ColIndex].CellType == "EllipsisText")
		e.Cancel = true;
}

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.

;