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

Static Progress

8 Answers 136 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Philip Senechal
Top achievements
Rank 1
Philip Senechal asked on 21 Apr 2008, 04:48 PM
Is there an example anywhere of how to use the progress meter to display for a static measure. For example...on the Telerik Client.net account page, there is a meter that shows how much of your 1 year maintenance is remaining. I need to do something similar to this by providing the progress meter with a total number of achievements and how many have been completed so far and have that graphed in the same style of meter.

I played around with the control by myself but couldn't seem to get close. If there is a code example somewhere or tutorial or documentation specific to this type of scenario it would greatly help. Thanks.

8 Answers, 1 is accepted

Sort by
0
Sophy
Telerik team
answered on 22 Apr 2008, 09:07 AM
Hello Philip,

Thank you for contacting us.

I suggest you refer to the Monitoring Custom Progress online example which demonstrates how to use RadProgressArea for monitoring a custom progress. You can also take a look at the corresponding help article for reference.

In case you need further assistance or have other questions do not hesitate to contact us again. We will be glad to help you.


Best regards,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Philip Senechal
Top achievements
Rank 1
answered on 25 Apr 2008, 11:57 PM
How would I assign values to the progress meter when it is in a grid column? I tried using the RadProgressContext in my ItemCreated sub, but that didn't seem to work.

I have the progress manager and the progress area in my grid column, I just need to find a way to pass a value to it when each record is created in the grid.

Is there a way to bind the values to a database value?

Thanks.
0
Sophy
Telerik team
answered on 29 Apr 2008, 12:00 PM
Hi Philip,

Please, find attached a sample page which demonstrates how you can set a static value to a RadProgressArea in an item template in a RadGrid. The attached page gives a general idea how to achieve such a scenario using the RadProgressArea, however, you will need to modify it so that it answers the requirements of your scenario.
I suggest you get the needed value at item databound event and pass it to the RadProgressContext.

If you need further assistance, do contact us again.

Greetings,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Philip Senechal
Top achievements
Rank 1
answered on 29 Apr 2008, 05:23 PM
Thank you very much for that...after looking it over I'm pretty sure I wouldn't have been able to figure that out on my own :) I have it working perfectly now, but I have another question regarding Progress Templates

Is there a guide somewhere for modifying the progress template? I looked at the documentation: http://www.telerik.com/help/radcontrols/aspnet%2Dajax/upload_ProgressTemplate.html

and it gave a nice example, but not really how everything is laid out with divs. All I really want to do is put the % total in the center of the bar (on top of the image) and get rid of the background/border for the bar image. I'm assuming I can do the latter with a change to the css (although creating a custom skin caused a javascript error), but how do I move the % total and change the text on it so that it doesn't say "Uploaded". I just want the percent without a title by it.

Thanks again for all your help...couldn't do it without you.
0
Philip Senechal
Top achievements
Rank 1
answered on 29 Apr 2008, 11:51 PM
I figured out the css issue, but I'd still like to move the  TotalProgressPercent on top of the bar if I can, and change the text from 'Uploaded' to something else.

Another question...the progress meter is only showing up for the first item in my grid. I'm not sure if this is because we're using RadProgressContext.Current? Does this need to be something different so that each progress area is updated?

Also, how would I refresh the progress areas if a change is made in the grid? Is there a way to rebind or refresh the values when the grid does a postback?

Thanks again!
0
Sophy
Telerik team
answered on 07 May 2008, 11:18 AM
Hi Philip,

Please, accept our apologies for the delayed response.

Below you can find my suggestions to your questions:
  1. To move the TotalProgressPercent on top of the bar and to change the 'Uploaded' text to your own text I suggest you use the progress template which the RadProgressArea provides. You can take a look at the Progress Template online example and at the Creating a Progress Template help article for reference. For your convenience I have also attached a sample page which demonstrates a similar to yours scenario.
  2. The problem you experience is most probably due to adding more than one event handler at the client load event. Please, review the attached page which shows how to solve this problem.
  3. When a change in the grid occurs you can call the LooongMethodWhichUpdatesTheProgressContext to update the values of the progress area to the new ones. You should modify  the sample page so that it answers the requirements of your scenario.

If you have other questions, do contact us again.

Best regards,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Philip
Top achievements
Rank 1
answered on 07 May 2008, 09:29 PM
Thank you immensly for your help. Using your suggestions, I was able to get the progress meter to look exactly the way I want and I now have a progress meter on each row of the grid.

I am still having a little trouble on the 3rd question...getting the progress meters to update when the grid data is changed. I added the code to fire off the updateProgressMeters routine in the RadGrid1_UpdateCommand method. The trouble I'm having is accessing the actual progress meter. The progress meter is in the MasterTable, but the values being updated that need to cause the progress meter to update are in a 2nd or 3rd level hierarchy of the grid.

I tried using
Dim progressArea As RadProgressArea = TryCast(e.Item.OwnerTableView.ParentItem.FindControl("PorgressArea1"), RadProgressArea) 

but this doesn't seem to be right. I think by doing this, my parent item ends up being a data cell, not the MasterTable. I'm thinking I might have to use NestedTableView, but this has always confused me as to how to do it.

Do you think you could show me how to access a progress meter in a mastertable view from the detail tables of a hierarchy?

I appreciate the assistance more than you know.
0
Sophy
Telerik team
answered on 10 May 2008, 04:39 PM
Hello Philip,

Could you please describe in more details your scenario? Which values do you use for updating the progress areas and how you find them? Where each of the controls is located in the grid's hierarchy? It would be best if you could provide a code snippet or a sample page which demonstrates your scenario so that I could get a better of what you want to achieve and what is the problem you experience.

Kind regards,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Upload (Obsolete)
Asked by
Philip Senechal
Top achievements
Rank 1
Answers by
Sophy
Telerik team
Philip Senechal
Top achievements
Rank 1
Philip
Top achievements
Rank 1
Share this question
or