This is a migrated thread and some comments may be shown as answers.

Freely change cell backcolor

5 Answers 10 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gianfranco
Top achievements
Rank 1
Gianfranco asked on 28 Sep 2018, 11:25 AM

Good morning
I have a problem that I can not solve despite having read many threads about this topic.
I have a RadGridView with binding to table where are listed a series of processing steps coming from an external microprocessor.
the running process is always on the first line.

Faced with a change in the status of some microprocessor values, which occur with a few milliseconds, refresh the values of the only cells that interest me with these instructions (for reasons of display speed):

   ((WorkPhaseInProgress) RadGridViewWorkPhaseInProgressOnDashBoard.Items [0]). QtaDone = qtaDone;
   ((WorkPhaseInProgress) RadGridViewWorkPhaseInProgressOnDashBoard.Items [0]). QtaPartialDone = qtaPartialDone;
   ((WorkPhaseInProgress) RadGridViewWorkPhaseInProgressOnDashBoard.Items [0]). QtaDoneForHour = qtaForHourNow;
   RadGridViewWorkPhaseInProgressOnDashBoard.Items.Refresh ();

where

RadGridViewWorkPhaseInProgressOnDashBoard is the name of the RadGridView

WorkPhaseInProgress class of single item

and everything works perfectly.

my question is:
how can I change the backgroud color for a few seconds to the only cells that interest me?

I can run everything in a separate thread, but my problem is how to change freely (according to my logic related to the microprocessor) the change of back color.
I hope I explained myself
thank you in advance

5 Answers, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 02 Oct 2018, 04:36 PM
Hello Gianfranco,

Thank you for the provided code snippet.

Did you manage to check out the following blog post: Displaying live streaming data.. along with the provided project? The project is for Silverlight, however the same approach could be used for WPF as well. 

If the suggested approach in the referenced blog post is not suitable for your scenario, may I ask you to elaborate on why this is the case so that I may better assist you?

I am looking forward to your reply.

Regards,
Vladimir Stoyanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Gianfranco
Top achievements
Rank 1
answered on 04 Oct 2018, 09:54 AM

Hi Vladimir

Thank you for your reply
Unfortunately, I can not fulfill my request.
As I said in my previous post, I need to write in some cells of my RadGridView with a frequency of a few milliseconds.
I solved with the following instructions:

((WorkPhaseInProgress)RadGridViewWorkPhaseInProgressOnDashBoard.Items[0]).QtaDone = qtaDone;
((WorkPhaseInProgress)RadGridViewWorkPhaseInProgressOnDashBoard.Items[0]).QtaPartialDone = qtaPartialDone;
((WorkPhaseInProgress)RadGridViewWorkPhaseInProgressOnDashBoard.Items[0]).QtaDoneForHour = qtaForHourNow;
RadGridViewWorkPhaseInProgressOnDashBoard.Items.Refresh();

 

My desire is to highlight this my writing by changing the backcolor.
In the example you proposed to me, I understood that, in the face of an event, I get an animation.
But with my instructions I do not understand how to trigger the event of changing the value of the cell or cells.
There is a solution?

I hope I explained myself.
Thanks again

 

 

 

 

 

 

 

0
Vladimir Stoyanov
Telerik team
answered on 09 Oct 2018, 08:45 AM
Hello Gianfranco,

Please, allow me to elaborate a bit on what is happening in the example demonstrated in the blog post. The triggering of the animation is happening when the dependency property of the user control - "StockPrice" is changed. On the other hand, this property is bound to the StockPrice property of the business object (CompanyInfo in the case of the example). After that, when the StockPrice of a CompanyInfo object is changed, the property changed handler in the user control is called, which in turn animates the cell.

Keeping this in mind, you should be able to use a similar approach for animating the cells when you are in control of updating the values. I am attaching a sample project demonstrating such an approach for your reference. Please, check it out and let me know, if the approach is suitable for your scenario. 

If such an approach is not suitable for you, please modify the attached project in order to represent your scenario and send it back in a new support ticket. This way I will be able to better understand the desired requirements.

I am looking forward to your reply.

Regards,
Vladimir Stoyanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Gianfranco
Top achievements
Rank 1
answered on 09 Nov 2018, 05:56 PM

Hi Vladimir
just today I had time to elaborate on your suggestions.
unfortunately there are concepts that I can not understand; so, with so much effort, I tried to bring your example back into my project with the result that it does not even start generating error at run time.
I'm so sorry.

My difficulty, besides not knowing some technical concepts, is that I do not have a working example to make concrete comparisons.
In fact, your suggested project does not load it correctly.

I have the feeling of temporarily abandoning the problem to be able to deliver the project to the customer even without this functionality.

thanks anyway.

 

Gianfranco

0
Vladimir Stoyanov
Telerik team
answered on 14 Nov 2018, 12:48 PM
Hello Gianfranco,

I am sorry to hear that you were unable to integrate the demonstrated approach into your solution.

My understanding is that you were not able to load the attached to my previous reply project. My guess is that this could be due the referenced dlls. This is why I am attaching the sample project again with all of the necessary dlls added in a folder inside the solution. You should be able to run it without any modifications.

If you are still having troubles implementing the demonstrated approach into your solution, may I ask you to prepare a sample project demonstrating your setup and send it over in a new support ticket. This way I will be able to better understand the exact scenario.

Regards,
Vladimir Stoyanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Gianfranco
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Gianfranco
Top achievements
Rank 1
Share this question
or