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

CellType feature request

Thread ID:





7169 Sep 15,2003 11:49 AM UTC Sep 16,2003 02:09 PM UTC WinForms 4
Tags: GridControl
Paul Laudeman
Asked On September 15, 2003 11:49 AM UTC

Hello, As far as I can tell, the "PercentTextBox" doesn't appear to be a supported celltype. In a future release, could you add support for this? Also, in a future release, would it be possible to use an enumeration for the supported cell types to avoid typos and to get intellisense support for the availabe types we can specify? Thanks, -Paul

Administrator [Syncfusion]
Replied On September 15, 2003 03:47 PM UTC

I will add your percent cell type to our request list. Making the celltype an enum will make it more difficult to add your own custom cell types. Right now, all you have to do is to use a new string to add a custom celltype. You can get the % to show in a cell by just setting the GridStyleInfo.CellValueType to, say, double, and setting the GridStyleInfo.Format to "P". This would let you type 1 and see 100 %, or type .01 and see 1 %. If you want to get the editing to recognized the entry of a % sign, then you can do this at the grid level by handling the SaveCellInfo event and the CurrentCellValidating event. Attached is a sample that does this. You do not have to set any formats in the style with this approach.

Paul Laudeman
Replied On September 16, 2003 11:27 AM UTC

Hi Clay, Thanks for the comment about the enumeration being limitng - I didn't consider that because I haven't started creating my ownn custom cell types. If that's the case, and there isn't a better workaround, then it might be better to leave it alone. I managed to figure out the event handlers for the cells on my own, but thanks anyway for the code sample. Part of the problem was our users expect that when they say, enter 22, the grid would take that to mean 22% instead of 2200%. I just worked around that by dividing the value entered by 100 (in case anyone else wants to know). In general, do you have a reference you could point me to that lists what the order of events are for a cell (from beginning to end). I couldn't seem to locate this information in the documentation, and it might be helpful to know for the future. Thanks!

Administrator [Syncfusion]
Replied On September 16, 2003 12:30 PM UTC

Take a look at the samples in the Syncfusion\Essential Suite\Grid\Samples\CellTypes folder. All of them allow you to display the evenst as tehy happen when you do things like type into a cell, and meove to another one. For more general events, if you have the source code for the Essential Grid, you can use the Assembly Manager to build a debug version of the library. With debug builds, you can include a exe.config file with the correct switches in your EXE folder to have the grid generate debug output showing things like events being hit. Here is a sample. Now in the GridPad sample config file, a lot of the switches have an 's' or 'x' in front of them. This effectively turns off that particular tracing. Remove these extra characters if you want to their output in the trace. To see all the possible switches, look in the switches.cs file found in the grid's src folder.

Paul Laudeman
Replied On September 16, 2003 02:09 PM UTC

Thanks for the pointer on the switches!


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon