Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
127 views
I have a grid which has RadProgressArea in it.

I am updating the grid based on the the timer set and the grid is inside an UpdatePanel.

All the values in the grid are updated except the ProgressBar. It still shows the old value.


Please see the following code.


 

 

function myOnClientProgressBarUpdating(radProgressArea, args)

 

{

 

//The primary progress bar will be horizontal (default)

 

 

 

 

 

if (args.get_progressBarElementName() == "PrimaryProgressBar")

 

{

radProgressArea.updateHorizontalProgressBar(

args.get_progressBarElement(), args.get_progressValue());

 

//Skip the default progress bar updating

 

 

 

 

args.set_cancel(

true);

 

}

}

 

 

</

 

script>

 

 

 

 

 

<div>

 

 

 

 

 

<asp:Timer ID="Timer1" runat="server" Interval="3000">

 

 

 

 

 

</asp:Timer>

 

 

 

 

 

</div>

 

 

 

 

 

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

 

 

 

 

 

<Triggers>

 

 

 

 

 

<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />

 

 

 

 

 

</Triggers>

 

 

 

 

 

<ContentTemplate>

 

 

 

 

 

<table>

 

 

 

 

 

<tr>

 

 

 

 

 

<td align="center">

 

 

 

 

 

<asp:Label ID="lblProcessDate" runat="server" Text="Select ProcessDate"></asp:Label>

 

 

 

 

 

<telerik:raddatepicker id="rdpProcessDate" runat="server">

 

 

 

 

 

</telerik:raddatepicker>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

<td align="center">

 

 

 

 

 

<asp:Button ID="btnGo" runat="server" OnClick="btnGo_Click" Text="Submit" CssClass="btn" />

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

<td>

 

 

 

 

 

<telerik:radprogressmanager id="Manger1" runat="server">

 

 

 

 

 

</telerik:radprogressmanager>

 

 

 

 

 

<telerik:radgrid id="radgProcessorStatus" runat="server" autogeneratecolumns="False"

 

 

 

 

 

width="100%" gridlines="None" skin="Office2007" allowpaging="True" datasourceid="ProcessorStatusDS"

 

 

 

 

 

ondatabound="radgProcessorStatus_DataBound" onitemdatabound="radgProcessorStatus_ItemDataBound">

 

 

 

 

 

<MasterTableView DataSourceID="ProcessorStatusDS">

 

 

 

 

 

<RowIndicatorColumn>

 

 

 

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

 

 

 

</RowIndicatorColumn>

 

 

 

 

 

<ExpandCollapseColumn>

 

 

 

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

 

 

 

</ExpandCollapseColumn>

 

 

 

 

 

<Columns>

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="ProcessDate" UniqueName="ProcessDate"

 

 

DataField="ProcessDate" SortExpression="ProcessDate">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="Correspondent" UniqueName="CorrespondentName"

 

 

DataField="CorrespondentName" SortExpression="CorrespondentID">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="Total" UniqueName="Total"

 

 

DataField="Total" SortExpression="Total">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="Processed" HeaderText="Current" SortExpression="Processed" UniqueName="Processed">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="Start" HeaderText="Start" UniqueName="Start">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="End" HeaderText="End" UniqueName="End">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridTemplateColumn HeaderText="Percentage" UniqueName="TemplateColumn">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<telerik:RadProgressArea id="Area1" runat="server" Skin="Outlook" InProgress="true" onclientprogressbarupdating="myOnClientProgressBarUpdating" >

 

 

<ProgressTemplate>

 

 

 

 

 

<ul class="ruProgress" style="padding:1px">

 

 

 

 

 

<li class="ruFilePortion" style="margin:0px">

 

 

 

 

Completed

<span id="PrimaryPercent" runat="server" ></span>%

 

(

<span id="PrimaryValue" runat="server" ></span> ) Total

 

 

<span id="PrimaryTotal" runat="server" ></span>

 

 

 

 

 

<div id="PrimaryProgressBarOuterDiv" class="ruBar" runat="server" style="height:10" >

 

 

 

 

 

<div id="PrimaryProgressBarInnerDiv" runat="server" style="width:200"><!-- --></div>

 

 

 

 

 

</div>

 

 

</li>

 

 

 

 

 

</ul>

 

 

 

 

 

</ProgressTemplate>

 

 

 

 

 

</telerik:RadProgressArea>

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

</Columns>

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

<ClientSettings EnableRowHoverStyle="true">

 

 

 

 

 

<Selecting AllowRowSelect="True" />

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

<FilterMenu EnableTheming="True">

 

 

 

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

 

 

 

</FilterMenu>

 

 

 

 

 

</telerik:radgrid>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

</table>

 

 

 

 

 

</ContentTemplate>

 

 

 

 

 

</asp:UpdatePanel>




codebehind


 

 

protected void LooongMethodWhichUpdatesTheProgressContext(RadProgressArea area,string total,string current)

 

{

 

RadProgressContext progress = RadProgressContext.Current;

 

 

progress.PrimaryTotal = total.ToString();

progress.PrimaryPercent = current.ToString();

progress.PrimaryValue = current.ToString();

 

StringWriter writer = new StringWriter();

 

progress.Serialize(writer);

 

//mainScript.Append(String.Format("function displayProgressAreas() {{ {1};$find('{0}').update(rawProgressData);}}", area.ClientID, writer.GetStringBuilder().ToString()));

 

 

 

 

mainScript.Append(

String.Format("{1};$find('{0}').update(rawProgressData);", area.ClientID, writer.GetStringBuilder().ToString()));

 

}

 

 

 

protected

 

void radgProcessorStatus_ItemDataBound(object sender, GridItemEventArgs e)

 

{

 

RadProgressArea area = (RadProgressArea)(e.Item.FindControl("Area1"));

 

 

if (area != null)

 

LooongMethodWhichUpdatesTheProgressContext(area,e.Item.Cells[4].Text,e.Item.Cells[5].Text);

}

 

protected void radgProcessorStatus_DataBound(object sender, EventArgs e)

 

{

 

mainScript.Append(

"}");

 

 

string script = "function displayProgressAreas() {";

 

 

string scriptFinal = string.Concat(script, mainScript);

 

 

string script1 = "Sys.Application.add_load(function(){ displayProgressAreas();});";

 

 

string script2 = string.Empty;

 

 

if (!Page.IsPostBack)

 

script2 =

String.Concat("<script type='text/javascript'> ", scriptFinal, script1, " </script>");

 

 

else

 

 

 

 

 

{

script2 =

String.Concat("<script type='text/javascript'> ", scriptFinal, script1);

 

 

string unloadScript = "Sys.Application.add_unload(function(){ displayProgressAreas();});";

 

script2 =

String.Concat("<script type='text/javascript'> ", script2, unloadScript, " </script>");

 

}

ClientScript.RegisterStartupScript(

this.GetType(), "DisplayProgressAreas", script2, false);

 

 

}

 

 

 

Genady Sergeev
Telerik team
 answered on 18 Mar 2009
3 answers
191 views
I have AllowRowsDragDrop enabled on my grid, but have the need to disable it on a row by row basis. I thought adding an attribute of onmousedown return false would work, but that only worked in Firefox. Anyone do this? If so do you have any code?
Princy
Top achievements
Rank 2
 answered on 18 Mar 2009
3 answers
181 views
Hi Guys,

Does anyone have an example on how I can position the Month/Year popup.
Currently I have a calendar showiing on the far right hand side of a page, if a user then clicks in the Title Navigation zone, the Month/Year popup is partly hidden.
I would like to horizontally center the Month/Year popup within the Calendar instead of the left/top cordinates of where the user clicked.

Any ideas would be appreciated.

Many thanks
Antony
guillaume.lebel
Top achievements
Rank 1
Iron
Iron
 answered on 18 Mar 2009
1 answer
97 views
I am using a Treeview control to display some locations within multiple countries, the setup is that we have multiple countries with sites below them.  So it can be summarized as this:

USA
- Las Vegas
- New York
England
- London
- Bristol

This is working fine except that I seem to have lost the "treeview" style of the control.  They are appearing as bullet points although in design time they appear as they should.  To expand I have to double click on the Country as there is no "+" collapsible box.

Can anyone guide me to an answer as to where I can reset this?

Thanks

Veselin Vasilev
Telerik team
 answered on 18 Mar 2009
1 answer
88 views
Hi I'm using a Combobox populated via webservice inside a grid editform template.
When there is no data (InserMode form) the combobox works great.
When There are data I generally set the properties SelectedValue and Text; when I open the EditForm, the page throw a javascript exception and the EditForm won't appear..

This is the javascript exception:
Errore di run-time di Microsoft JScript: Sys.WebForms.PageRequestManagerServerErrorException: Selection out of range
Parameter name: value
Atanas Korchev
Telerik team
 answered on 18 Mar 2009
2 answers
91 views
Why are there ads displaying when I click links in your forums?  This is not freeware that I purchased right?
Reid
Top achievements
Rank 2
 answered on 18 Mar 2009
1 answer
132 views
Hi,

We are actually customizing the rad skins to suit our needs. I would like to know how to set the Border for the tabStrip control in the CSS file

Thanks and Regards
Bala
Paul
Telerik team
 answered on 18 Mar 2009
1 answer
174 views
I have a tooltip that I would like to trigger from various elements on the page.

Is there a way for me to change the ToolTip's Target using Javascript so that the "element" positioning will cause the tooltip to move as other elements initiate the show?

Thanks,
Kevin
Svetlina Anati
Telerik team
 answered on 18 Mar 2009
1 answer
61 views
Is there a way to provide support for the PageUp, PageDown, Home and End keys when scrolling within a combo box?  I cannot seem to get this to work.

thanks.
Atanas Korchev
Telerik team
 answered on 18 Mar 2009
6 answers
137 views
I have cut and pasted the new slider demo into my website to learn more about how to build a similar example (http://demos.telerik.com/aspnet-ajax/slider/examples/slideshow/defaultvb.aspx

But, I am having a couple of problems.

First, the text for the items is very (too) close to the slider bar. I want to aplly a bit of padding (or margin) but the css doesn't work. In the css style given for the example, there is this: 

 /* Customize slider items look */ 
        
       .RadSlider .rslItemsWrapper .rslItem span 
       { 
           line-height52px !important; 
           color#fff !important; 
           
       } 
       .RadSlider .rslItemsWrapper .rslItemSelected span 
       { 
           color#fff


...but I can't get it to work. If I apply css style "rslItem" to an item, it has no effect.

Second problem, I can't get the navigation to show. I can click the buttons, but they are not showwing if you know what I mean.

Third (not problem, just curious),

How did you get the rounded corners on the Slides and slideshowviewer DIVs? 

Best,

Brent
Brent
Top achievements
Rank 1
 answered on 18 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?