It seems I cannot get away without having button specs on the new columns. So I’ve added a ButtonSpecs collection to the column class of each of the following types…
- DateTimePicker
- MaskedTextBox
- NumericUpDown
- DomainUpDown
- ComboBox
Here you can see a couple of example images…


To make life a little easier for the developer I have added a ButtonSpecClick event onto the columns that is fired whenever any button spec is clicked for any cell in that column. This event has parameters that made it easy to get hold of the column, cell and button spec instances involved in that click. Stops you needing to walk around the data structures finding your way from the button spec to the cell and then the column, which although not hard is certainly a pain to work out each time you need to do it.
Note that there are no button specs on the already defined Krypton columns TextBox/CheckBox/Button/Link. This is because they work in a different way that makes it impractical to add them. All the new columns have an instance of an actual control that is used when editing the cell. So when you click on a numeric column it uses a KryptonNumericUpDown instance perform the drawing and editing. As the KryptonNumericUpDown already has support for button specs this makes it possible to add that capability by moving the button specs from the column collection into the control for the duration of editing. But the TextBox/CheckBox/Button/Link columns all perform drawing by using direct calls to the renderer and adding extra code to simulate the presence of buttons is not a pleasant thought.
January 11th, 2010 at 7:24 pm
This is really great! I’m really looking forward to this update.
January 11th, 2010 at 8:08 pm
That is looking like one sweek DataGrid. Of the older columns, I don’t think you’d wand to use a button spec with a CheckBox/Button/Link, only the textbox.
January 11th, 2010 at 9:30 pm
Very good news : there are now ButtonsSpecs on useful controls.
Bad new : the TextBox is not inside these controls.
I think that one day, due on demand, you need to add it. I hope this day will not be too far.
For CheckBox/Button/Link columns, it is not useful.
Many Thanks
January 11th, 2010 at 9:55 pm
Maybe you can use a new control with buttonspecs instead of the Textbox-Column – what about the MaskedTextBox without a mask?
January 11th, 2010 at 11:24 pm
@ Waescher,
I didn’t think about a MaskedTextBox without a mask. I think it is the solution.
Thanks.
January 11th, 2010 at 11:55 pm
You’re welcome ;)
January 12th, 2010 at 7:34 am
I have just updated the text box column to use the KryptonTextBox instead of just drawing the text using the rendered. So now it has button specs as well!
January 12th, 2010 at 9:19 am
So this approach is now obsolete ;)
January 12th, 2010 at 5:55 pm
No, no, it is not obsolete .. it is fine ;))
Sooner or later, it is necessary and it is better sooner than later.
Thanks Phil
January 12th, 2010 at 8:07 pm
No, the “MaskedTextBox without mask”-approach is obsolete …