Hi Amit,
In the version you are using, the easiest thing to do would be to use a ValueList and attach it to the column. You could populate the list with items such that the DataValue of each item is a color and text of the item is whatever you want, like the color name. Here's some more info on how to do this:
HOWTO:What is the best way to place a DropDown list in a grid cell?
Amit Ranjan said:1. If i use Style - Color of the column then , what will be the common method to apply color from both text. As i am storing the selected color to db and on grid initialize layout event i am applying color to a particular cells forecolor.
I'm not sure I understand your question. What's the DataType of this column?
Amit Ranjan said:2. If i use custom control, how to i use it as a template column , as we use in ASP.Net...
The version of the grid you are using doesn't have any support for embedding your own custom controls. It only supports embeddable editors, like UltraTextEditor, UltraComboEditor, UltraColorPicker, etc. You could derive from one of these controls or editors, but I think the ValueList approach would be a lot easier.
In the latest version of the grid, we added a new editor which allows you to easily embed your own controls in the grid, so you might want to consider upgrading if that's what you need.
Amit Ranjan said:3. Or if i use Style-color, then how do i save the name of the color as string. On grid load it display Color[Magenta] and Color[A=255,R=162,G=118,B=109]
Doesn't really make much sense to save a color to a database as a string, you'd be better off using a numeric value. The ColorTranslator class in DotNet gives you a bunch of different ways to translate colors into values. To deal with this kind of thing in the grid, you would have to translate the value from the database into a Color object in the grid. There are a couple of ways to handle this. You could hide the actual bound column and use an unbound column to display to the users and then use grid events to copy and translate the values from one to the other. Or another option is to use a DataFilter on the column to do the translation for you.