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.
Syncfusion Feedback

How to make my GridGroupingControl read only

Thread ID:

Created:

Updated:

Platform:

Replies:

31456 Jul 7,2005 11:27 AM Jul 18,2005 05:10 PM Windows Forms 4
loading
Tags: GridControl
Brian Wright
Asked On July 7, 2005 11:27 AM

I know this sounds easy but my code does not seem to be working. Attached you will find the InitializeComponent() code that the designer generated for my GridGroupingControl. This code correctly DOES NOT allow me to type alphanumerics in the cell.. but it DOES allow me to backspace and delete the contents. What obvious property am I missing.

Administrator [Syncfusion]
Replied On July 7, 2005 12:41 PM

Your code did not make it. Try setting these properties to see if this makes thing work as you need. this.gridGroupingControl1.TableDescriptor.AllowNew = false; this.gridGroupingControl1.TableDescriptor.AllowRemove = false; this.gridGroupingControl1.TableDescriptor.AllowEdit = false;

Brian Wright
Replied On July 12, 2005 12:42 PM

Sorry about forgetting the code.. and I have been on vacation so now I am ready to tackle this again. I already had the code you mentioned in my code. Perhaps I am setting something else that is overriding it? To clarify, the behavior I get is that I cannot type letters and such.. but I can set the focus to the cell and begin deleting letters using backspace, etc.. I would like for the user to not even be able to set the focus to the cell.. and certainly not to be able to delete text. I have now attached the code and it seems pretty vanilla to me. Any suggestions? support_556.zip

Brian Wright
Replied On July 18, 2005 04:01 PM

Any ideas about this?

Administrator [Syncfusion]
Replied On July 18, 2005 05:10 PM

This sounds like a defect in the version you are using. I checked it with our upcoming 3.3 build and just settingthose 3 properties makes it so the backsoace and delete key do nothing. In teh version you are using, try handling the TableControlCurrentCellStartEditing event and cancel it. This should avoid even the cursor appearing in the cell. private void gridGroupingControl1_TableControlCurrentCellStartEditing(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCancelEventArgs e) { e.Inner.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.

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

;