LOGIN    REGISTER    YOUR CART

homepage
VisualHint's blog
2007
May21

Screencast 1: a full featured DateTimePicker

Just before the beta is released I will publish each day of this week a screencast to showcase the main features of Smart FieldPackEditor.Net. Here is the schedule for this week: Tuesday, overview of the FieldpackEditor. Wednesday, how to handle the null value. Thursday, SFPE, data binding and the DataGridView. Friday, multi packs and other editors. Here is the first screencast of the week. It will show you various general features of the FieldPackEditor derived as a DateTimePicker. Click on [...]
2007
May15

Solving all the issues of the DateTimePicker inside the DataGridView

Some days ago I came across a blog showing the trials and tribulations of a developer trying to display and use the standard DateTimePicker in the DataGridView. This story is really typical of all the considerable efforts one have to make in order to get a semi-viable solution. So far I was not even considering touching the DataGridView. It was an unknown component to me and I was not aware of its extensibility to enable custom editors to be used in a cell. After readind this article I jumped [...]
2007
May10

How to setup a truly dynamic combobox in the PropertyGrid?

SPG offers some great ways to build dynamic properties. But often this is a mix of declarative code and dynamic calls to the SPG API to alter the content or the behavior of the grid. However in some cases a complete dynamic solution is needed. For example, some classes may be generated by external tools and it’s impossible or not desired to decorate their properties with attributes. In other contexts, enumerations are not welcome because their content is too ... hardcoded. This article proposes [...]
2007
May09

How to set a null value to a DateTimePicker without any compromise?

Just to make it clear that this is the first concern about the MS DateTimePicker, here is a list of famous links: Yet another DateTime…Slicker? Yet another nullable DateTimePicker control Extended DateTimePicker Nullable DateTimePicker These articles all try various tricks to create a nullable DateTimePicker. Unfortunately, while the intentions are good, it does always create secondary issues (look into the comments). SFPE will naturally support null values but from a user point of view the [...]
2007
May06

How to format a number with a specific CultureInfo/NumberFormatInfo in the PropertyGrid ?

“How to format a number in the PropertyGrid” is a question that I’m often asked. The following answer is valid for the MS PropertyGrid and for Smart PropertyGrid.Net. Therefore it is not in the SPG documentation. The following explanation will be given for a Double number. You can easily apply it to a Single or a Decimal. If your target instance has a Double property, it uses by default the DoubleConverter TypeConverter. Unfortunately (for the present need) this converter uses the “R” format [...]
2007
May02

The ten deceptions of the DateTimePicker

If you are here reading these lines it’s because you have something against the .Net DateTimePicker. And you’re not alone since, if you do a search in the newsgroups, the same questions keep coming: “how do I set the background color of the DTP?”, or “it does not accept a null value and my DateTime column in my database has some empty cells”. CodeProject and other similar developer communities give you a lot of pseudo solutions to solve one or two issues of the control… when they don’t create [...]
2007
Apr30

The perfect DateTimePicker? Not only!

It is well known that a good product is one that provides a solution to your own problem, and as a result would meet the needs of a wider audience. Some time ago I discovered a problem in SPG.Net. I couldn’t make a true DateTimePicker inplace control achieving the level of quality of the overall product. The win32 control from Microsoft has so many issues and inconsistencies that it was a nightmare trying to work around them. Finally I decided to remove this inplace control from SPG and [...]
2007
Apr29

A new home for VisualHint

VisualHint has reached another milestone. Today, I’m launching my new web site that offers the GUI components that I design. The redesign was not out of boredom, but simply the result of a need to support more than one product. The previous site had been designed around a main product (Smart PropertyGrid) and the accompanying news section and I had no idea how to add another product which would have the same importance. Therefore, it was time for a redesign. I took Xara Xtreme Pro, a very nice [...]
2007
Jan24

Value validation in great form

So far, value validation in SPG was simple and clean: no annoying popup but also the obligation to see the previous value automatically restored. For the next release, value validation is being reworked. It will still offer the existing behavior but also a mode called KeepFocus. Under this new mode, the focus stays on the faulty value until the user types a valid value (this is what happens in the Microsoft PropertyGrid but unfortunately spoiled with the modal popup). Inside a new validation [...]
2007
Jan02

PropertyValueChanged for collections bug fix

I was not aware of this bug in the Microsoft PropertyGrid until a customer told me it was doing the same thing in Smart PropertyGrid. This is interesting enough to add a post here about it. The issue is that PropertyValueChanged is not fired for certain collections. It works with an array but doesn’t for a List<> for instance. The reason is that the UITypeEditor.EditValue(...) method returns the reference on the original collection even if its content has been modified. I looked in Reflector [...]