Skip to content

Replies

0
Gilad
Gilad answered on Feb 6, 2009 11:58 PM

Mike – I FINALLY MADE IT!!!!

I took your advice with the image stuff, since i already had to draw the progress bar for the control i have made – this was an easy task to make an image from it – just a few lines of code.

The limits of the colored segments do change, but my progress bar knows how to handle this and to produce an image on the fly according to the values of the current row. I have set the db field to constantly return 100% in the progress field (since the progress bar should show the entire image), build the image as i want and planted in the background image of infragistics progress bar.

THANX THANX for the help, your advices meant a lot!!!

It works greater than i expected and also looks great!!!

BTW: Styling do overrides image settings, i had to disable the progress bar in the isl file.

-Gili

0
Gilad
Gilad answered on Feb 5, 2009 11:51 PM

Mike,

OK –  i wrote my own progress bar control that can provide the features i want.

Now – I understood that in order to dock into an UltraGrid cell i need to implement IProvideEmbeddedEditor.

What do i need to do in order to implement this interface?

Please provide details even if this is a complicated task, just give me a thread to start with and i'll handle the rest.

Do you guys have a manual for this? I searched the internet with no success.

I MUST provide this – no other choice for me, this is crutial for our application and i'm ready to deal with any level of complexity.

One last thing:  although i have used an image, the isl file override my image settings and i took your advice to disable it – it worked 😉

Thanx again!

-Gili

0
Gilad
Gilad answered on Feb 3, 2009 10:04 PM

 

Mike, i need to make something like this,

Do you see the last progress bars – where more than 2 colors are being used, this is what i need:

 

I’m frustrated, isn’t this possible, i’m spending so much time in finding out a solution for thst.

Another issue:

Assuming ProgressBarEditor works for making a segmented progress bar, how would it apply for a standalone progress bar – not one in a grid.

There seems to lack a connection between a progress bar (UltraProgressBar) and ProgressBarEditor…

Please help 🙁  I’m dependent on your help 😉

Thanx.

0
Gilad
Gilad answered on Feb 3, 2009 5:01 PM

Mike – First -> THANX!! you're a saver, I still couldn't make it work – but at least i can see some progress, this is like a show stoper for me.

I did what you said, add the bellow code to the ultraGrid1_InitializeRow event handler:

ProgressBarEditor progressBarEditor = new ProgressBarEditor();

PercentSetting failedPrecentSettings = new PercentSetting();

failedPrecentSettings.Percent = 50;

failedPrecentSettings.FillAppearance.BackColor = Color.Red;

progressBarEditor.PercentSettings.Add(failedPrecentSettings);

PercentSetting runningPrecentSettings = new PercentSetting();

runningPrecentSettings.Percent = 100;

runningPrecentSettings.FillAppearance.BackColor = Color.Black;

progressBarEditor.PercentSettings.Add(runningPrecentSettings);

e.Row.Cells[

"Progress"].Editor = progressBarEditor;

 Like you said – i wanted for example to make the fist 50% red and the rest black.

But i get the entire progress bar black – thus according to the last precent settings.

I wasn't sure if i should use a new PercentSettings object – i tried to use the same one, still didn't work.

I have tried putting 50 in both – but still – not working.

Another issue is that i use styling and if i keep the styling on it overrides everything and the color changes doesn't apply at all.

How can i disable the styling only for the progress bar?

 

THANX THANX THANX THANX 😉

 

0
Gilad
Gilad answered on Feb 2, 2009 2:41 PM

I guess that this is what i need but:

Can i set a conditional PercentSetting according to a row's value.

I'll explain myself:

Let's say i have a row representing a task, each task is consisted of jobs and the each grid row provides information on how many of these jobs failed and how many completed.

Now i want to set a diffrent PercentSetting for each row according to the completed/failed values in the relevant row.

I would rather do it without having to itterate over the rows since my grid can contain up to 100000 rows.

Is this possible?

Can you lease give me a snap code example on how to work with teh PercentSetting?

 

Thanx thanx thanx!!

0
Gilad
Gilad answered on Jan 26, 2009 2:10 PM

Mike,

Your reply didn't help me, can you be more specific?

How can i define the number of segments, the color of each segment, and how can i set each segment value automatically for all the rows at once.

The idea is that each row in my grid provides details on jobs, some pass and some failed, i need each row to visualize this throgh the progress bar – showing the precentage of passed jobs in green in the failed precentege in red.

I want to avooid the need to itterate over all the rows – and have a global condition definition for the entire grid.

Today i have only one segment, i use this code:

//Set progress barsvar targetInfoProgressBar = new UltraProgressBar();

targetInfoProgressBar.Style = Infragistics.Win.UltraWinProgressBar.

ProgressBarStyle.Continuous;

grid.DisplayLayout.Bands[0].Columns[

"Progress"].EditorControl = targetInfoProgressBar;

 

I want to segment this value according to other values in a relevant row.

Does infragistics support this? Can you give a code snap for this? not full – just the main idea…

 

THANX!!