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
close icon

Navigation and disabled cells

I am having a problem with certain controls in the grid as they related to navigating the grid. I have RichText columns in my grid that I set the Celltype and disable the column using the following code.

GridBoundColumnsCollection gbcc = this.qDataBoundGrid1.Binder.InternalColumns;

gbcc[7].StyleInfo.CellType = "RichText";
gbcc[7].StyleInfo.Enabled = false;

My problem is that this breaks my navigation.
The Moving the current cell to the RichText cell fails! I want to make the control uneditable not change the navigation is there some way to make the control uneditable and leave navigation unaffected? I do not have this problem using the same technique with the checkbox cells.

I am thinking there may be something that I can do directly to the RichText renderer but none of the setting I have tried make the control disabled while leaving the cell navigation unaltered.

Please address this specific issue in your reply if possible. I have looked at the sample apps and this issue is NOT addressed there.

Thanks,
Burke

3 Replies

HA haneefm Syncfusion Team August 7, 2007 10:45 PM UTC

Hi Burke,

Instead of setting the Enabled property , try setting the Clickable property to false in a RichText cell. Below is a code snippet

GridBoundColumnsCollection gbcc = this.qDataBoundGrid1.Binder.InternalColumns;

gbcc[7].StyleInfo.CellType = "RichText";
gbcc[7].StyleInfo.Clickable = false;

Best regards,
Haneef


BH Burke Harris August 7, 2007 11:46 PM UTC

No setting the style to clickable false does not work for what I want to do. Setting the rich text column to clickable = false works the same as leaving the cell enabled (since I am already hiding the buttons). The navigating is ok but the cell still activates the richtextbox still tries to display the alphablendcolor. Setting a Combobox to clickable = false does nothing from what I can tell.

I need to have the richtext control not activate or draw or whatever without the cell move failing. Can that be done?

Thanks,
Burke


GR Golda Rebecal Syncfusion Team August 13, 2007 02:04 PM UTC

Hi Burke,

Sorry for the delay in responding.

To make the RichText cell to have the appearance as disabled but allows navigation, we have to set the Enabled property of the GridStyleInfo to false in the DrawCell event.

//To disable the cell and to allow navigation
void gridDataBoundGrid1_DrawCell(object sender, GridDrawCellEventArgs e)
{
if (e.Style.CellType == "RichText")
e.Style.Enabled = false;
}

Please refer to the attached sample that illustrates the same.
http://websamples.syncfusion.com/samples/Grid.Windows/I36454_1/main.htm

Kindly let me know if this helps you.

Best regards,
Golda

Loader.
Live Chat Icon For mobile
Up arrow icon