Sfdatagrid Column button background color
I have a RecordsList as shown below,
Car Colorcode
Toyota button
Nissan button
Mazda button
The car column is a text and the size or count is dynamic. Which means it may vary depending on the entries.
The colorcode column is a button generated for every type of car.
What I am trying to do is that everytime I press the button from the colorcode, a color profiler will allow me to choose any color and this will change the background color of the button.
Which means ifthe type of my car is 3 then I have 3 different colors. When it is 5 then I have 5 colors and so on.
So in my form I have my apply button which will allow me to save all the car type and color in list<string> format.
Example;
Toyota, (255,0,0) : Nissan, (0,0,255) and so on.
Thank you so much for the response.
SIGN IN To post a reply.
3 Replies
MA
Mohanram Anbukkarasu
Syncfusion Team
June 10, 2021 01:05 PM UTC
Hi Mark,
We regret for the inconvenience.
We are unclear about your requirement to have a color code column and its behavior you are expecting for that column. Kindly revert to us with more details about your requirement. If possible please provide an image/video illustration about the requirement to be achieved. It will be more helpful for us to understand the exact requirement and to provide a prompt solution.
Regards,
Mohanram A.
MJ
Mark Jayvee
June 14, 2021 10:34 AM UTC
Hi Mohanram,
Attachment: Colorprofiler_10846bfe.7z
thank you for the response.
please see the attached.
I have change my requirements as shown in the attached picture. I stored the colors inside the cell.
and I want to retrieve the color in text.
List<string> d = new List<string>();
string x = // this is the string where I want to save the color(RGB) in each cell.
foreach (RecordEntry r in sfDataGrid1.View.Records)
{
var i = r.Data as OrderInfoCollection;
d.Add(i.myCategory + ":" + x;
}
string j = string.Join(",", d);
Attachment: Colorprofiler_10846bfe.7z
MA
Mohanram Anbukkarasu
Syncfusion Team
June 15, 2021 01:33 PM UTC
Hi Mark,
We regret for the inconvenience.
We are still unclear with the requirement you have mentioned in your update.
From the provided screenshot, it is clear that you have already set the background colors for the cells. We suspect that you need to get the name of the color when clicking on the corresponding cell. Please revert to us with details if we have misunderstood your requirement.
Regards,
Mohanram A.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
MJ Mark Jayvee
- Jun 9, 2021 01:44 PM UTC
- Jun 15, 2021 01:33 PM UTC