Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
127 views
I have a button in an updatepanel, with a RadProgressManager/Area thing going on. The Area is set with RegisterForSubmit="false" and the button has an onclientclicked="showProg", which is a function which calls getRadProgressManager().startProgressPolling();

First click shows the progress bar, but when it's finished the progress bar disappears and then reappears very quickly (it should stay gone).

Second click shows the completed progress bar from before, for the correct duration, then hides it (and it doesn't reappear). (it should show the correct progress sequence).

Subsequent clicks behave as the second.

Display.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <asp:UpdatePanel runat="server">
    <ContentTemplate>
        <telerik:RadButton ID="btn1" runat="server" Text="Go!" OnClick="btn" OnClientClicked="showProg">
    </telerik:RadButton>
    <telerik:RadProgressManager ID="RadProgressManager1" Runat="server" RegisterForSubmit="false" />
    <telerik:RadProgressArea ID="RadProgressArea1" Runat="server">
    </telerik:RadProgressArea>
</ContentTemplate>
    </asp:UpdatePanel>
    </form>
    <script type="text/javascript">
        function showProg() {
            getRadProgressManager().startProgressPolling();
        }
    </script>
</body>
</html>

Display.aspx.cs:
using System;
using System.Threading;
using Telerik.Web.UI;
 
public partial class Default : System.Web.UI.Page
{
    protected void btn(object sender, EventArgs e)
    {
        var prog = RadProgressContext.Current;
        for (int i = 0; i < 10; i++)
        {
            prog.PrimaryPercent = (i+1) * 10;
            prog.CurrentOperationText = String.Format("Doing step {0} of 10", i + 1);
            Thread.Sleep(TimeSpan.FromSeconds(0.5));
        }
        prog.OperationComplete = true;
    }
}


(I would attach the zipped solution, but the attach file dialog only permits images)
Peter Filipov
Telerik team
 answered on 24 May 2011
4 answers
320 views
Hello Telerik Team,

I want to achieve a scenario wherein I want the header checkbox to be uncheck whenever I click an item from the Grid.

Any help would be appreciated.

Regards,

Anthony
Anthony
Top achievements
Rank 2
 answered on 24 May 2011
5 answers
294 views
How on earth do I find the DataKey when I'm doing an update?  I've tried everything...


Private Sub rtlAccounts_UpdateCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.TreeListCommandEventArgs) Handles rtlAccounts.UpdateCommand
    Dim txtAccountDescription As RadTextBox = TryCast(e.Item.FindControl("txtAccountDescription"), RadTextBox)
    Dim txtAdminName As RadTextBox = TryCast(e.Item.FindControl("txtAdminName"), RadTextBox)
    Dim txtAdminEmail As RadTextBox = TryCast(e.Item.FindControl("txtAdminEmail"), RadTextBox)
    Dim rcbStatus As RadComboBox = TryCast(e.Item.FindControl("rcbStatus"), RadComboBox)
    Dim rntDocRetention As RadNumericTextBox = TryCast(e.Item.FindControl("rntDocRetention"), RadNumericTextBox)

    Dim item As TreeListEditableItem = TryCast(e.Item, TreeListEditableItem)
    Dim MyDataKeyID As String =  'Now what???
End Sub

Also would like to know how to find the ParentDataKey from an InsertCommand and the UpdateCommand as well.
Tsvetina
Telerik team
 answered on 24 May 2011
2 answers
149 views
Hello!

I'm working on a Dock project pretty much based on the My Portal demo. I'm creating different docks containing different UserControls (for example textboxes, radiobuttonlists). The same type of usercontrol docks can be created multiple times, but my problem has to do with accessing the usercontrol docks on a button event in code behind.

Example of how I want it to work
- I create 3 docks all based on a usercontrol containing a simple textbox,
- Put text in the three textboxes (all in different docks)
- Click Save Button
- Get access to the different textboxes in my codebehind file.

The problem right now is that I can't get hold of the values in the dynamically created docks.

Thanks / Fredrik
Fredrik
Top achievements
Rank 1
 answered on 24 May 2011
2 answers
281 views
Hi,

i'm trying to modify the confirmtext value of a gridbuttoncolum. i'm making the change during the first firing of itemcreated event on the page.

on the oninsertcommand, onupdatecommand, etc of the radgrid i've used
string strChannelId = RadGrid1.MasterTableView.DataKeyValues[e.Item.ItemIndex]["ChannelId"].ToString();

to retrieve the datakey value.

i'm not having much luck using it in this event to get the value as datakeyvalues appears to be unavailable. how can i get this value from the itemcreated command?

here's my code in more detail.
protected void RadGrid1_ItemCreated(object source, GridItemEventArgs e)
{
    if (e.Item is GridEditFormInsertItem && e.Item.IsInEditMode)
    {
        this.RadGrid1_ItemCreatedInsert(source, e);
    }
    else if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
    {
        this.RadGrid1_ItemCreatedUpdate(source, e);
    }
    else
    {
        foreach (GridColumn gridColumn in RadGrid1.MasterTableView.Columns)
        {
            if (gridColumn.UniqueName == "columnRelease")
            {
                // retrieve the original values from the database
                DataSet dsOriginal = new DataSet();
                string strErrorText = string.Empty;
                string strChannelId = RadGrid1.MasterTableView.DataKeyValues[e.Item.ItemIndex]["ChannelId"].ToString();
 
                this.GetChannelDetail(out dsOriginal, out strErrorText, strChannelId);
                DataTable dtOriginal = dsOriginal.Tables["Channel"];
                DataRow drOriginal = dtOriginal.Rows[0];
 
                (gridColumn as GridButtonColumn).ConfirmText = string.Format("Are you sure you want to release channel {0} on FMIS Server {1}?", Convert.ToString(drOriginal.ItemArray[2]), Convert.ToString(drOriginal.ItemArray[1]));
            }
        }
    }
}

areen
Top achievements
Rank 1
 answered on 24 May 2011
9 answers
177 views
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
<ajaxsettings>
<telerik:AjaxSetting AjaxControlID="grdInProcess">              
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="grdInProcess" LoadingPanelID="RadAjaxLoadingPanel1"/>
    </UpdatedControls>
</telerik:AjaxSetting>
</ajaxsettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"/>
.................
<cc1:SJRadGrid ID="grdInProcess" runat="server" gridwidth="100%" Height="100%" OnNeedDataSource="GetPersonnelBudget"
AutoGenerateColumns="false" AllowSorting="true" Skin="Grants" EnableEmbeddedSkins="false" PageSize="10"  Width="100%">
<MasterTableView AllowSorting="true" AllowMultiColumnSorting="false" DataKeyNames="EmployeeId"   
AllowPaging="true" PageSize="10" Width="100%" BorderWidth="1" >
<Columns>
<cc1:CustomFilteringTemplateColumn HeaderText="Funding Source" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Wrap="false"
HeaderStyle-Width="30%"  AllowFiltering="false" UniqueName="FundingSource">
<ItemTemplate>
<asp:LinkButton ID="lblFundingSource" runat="server" Width="100"  Text='<%# DataBinder.Eval(Container.DataItem,"FundingSource")%>' Onclick="show()"></asp:Label>
</ItemTemplate>
</cc1:CustomFilteringTemplateColumn>   
</Columns>
</MasterTableView>
</cc1:SJRadGrid>
..........
show() :
In show method i am invoking a modal popup to display.
As this grid kept in RadAjaxManager, modal pop up is not displaying. Please help me out to get display of showing the Modal pop up even when kept in RadAjaxManager.
MadhuSudhan
Top achievements
Rank 1
 answered on 24 May 2011
1 answer
91 views
hi people!

i would like to set XLabel in radchart to invisible and opposite and change type of chart series, draw chart to 3D, i can handle this issues in the code behind but i wanna make it on client via javascript so that my radchart runs faster, anyone can handle this please help me.

kind regards.
Shinu
Top achievements
Rank 2
 answered on 24 May 2011
1 answer
101 views
function rbReturnToData_Confim(arg) {
    var button = document.getElementById("<%= RadBtn1.ClientID %>");
    if (arg) {
        button.set_commandName('Apply')
        button.set_autoPostBack(true);
   
}
    else {
        button.set_commandName('Cancel')
        button.set_autoPostBack(true);
    }
}
 
//This method is fired on the ClientClicked event of the Rad Button object. after that server side code is fired
function rbReturnToData_Clicked(button, args) {
    debugger;
    var pending = document.getElementById("<%= lblChangesPending.ClientID %>");
    var lblTitleFilter = document.getElementById("<%= lblTitleFilter.ClientID %>");
    var rfGridFilter = document.getElementById("<%= rfGridFilter.ClientID %>");
 
    if (pending != null && pending.innerHTML != "") {
 
        radconfirm("You have pending filter changes.  Apply them?", rbReturnToData_Confim);
    }
 
    else {
        CollapseToolsPane();
    }
}

Protected void Click(Object Sender,EventArgs e)
{
//Server side code is fired successfully
}
Problem is that code is fired successfully when OK and cancel button is clicked
on the rad confirm window.
Note-  My page is ajexified , full post back is not done because radajaxmanager, radloadingpanel are on the page.
problem is that after serverside code radconfirm box is not closed.
Shinu
Top achievements
Rank 2
 answered on 24 May 2011
2 answers
78 views
HI,

I am currently evaluating the Telerik ASP.NET AJAX suite. I am currently trying to test the grid while javascript is disabled, as per the company's accessibility policy. It seems that sorting is not working while javascript is disabled even when I follow this post
http://www.telerik.com/help/aspnet-ajax/grid-accessibility-compliance.html

I still get the hyperlink column headers with the javascript:_doPostback href

Here is what I am doing different from the link above.
The grid is part of ascx user control
The columns are not auto generated
some columns are sortable
We are binding the grid in the code behind using collections

Your help is appreciated.

Private Sub RadGrid1_ColumnCreated(sender As Object, e As GridColumnCreatedEventArgs)
Handles
RadGrid1.ColumnCreated
 
    e.Column.HeaderButtonType = GridHeaderButtonType.PushButton
End Sub

<cc2:AccessibleRadGrid ID="RadGrid1" runat="server" AllowPaging="True" AlternatingItemStyle-CssClass="alt"
       CssClass="grid1" AutoGenerateColumns="False"
       AllowSorting="True" CellSpacing="0"
       GridLines="None" ShowGroupPanel="True" IsJavascriptEnabled="False"
       AllowFilteringByColumn="True" Skin="Outlook">
       <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True">
           <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="100px" />
           <Scrolling AllowScroll="True" ScrollHeight="100px" UseStaticHeaders="True"></Scrolling>
       </ClientSettings>
       <AlternatingItemStyle CssClass="alt" />
       <MasterTableView DataKeyNames="ID,RDIMSRefNbr">
           <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
           <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
               <HeaderStyle Width="20px"></HeaderStyle>
           </RowIndicatorColumn>
           <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
               <HeaderStyle Width="20px"></HeaderStyle>
           </ExpandCollapseColumn>
           <Columns>
               <telerik:GridBoundColumn FilterControlAltText="Type Column" HeaderText="Type" UniqueName="TypeColumn"
                   DataField="CommType" HeaderStyle-CssClass="alignCenter">
               </telerik:GridBoundColumn>
               <telerik:GridBoundColumn FilterControlAltText="RDIMS Column" HeaderText="RDIMS" UniqueName="RDIMSColumn"
                   DataField="RDIMSRefNbr" HeaderStyle-CssClass="alignCenter" ItemStyle-CssClass="alignCenter">
               </telerik:GridBoundColumn>
               <telerik:GridBoundColumn FilterControlAltText="Title Column" HeaderText="Title" UniqueName="TitleColumn"
                   DataField="RDIMSTitle" HeaderStyle-CssClass="alignCenter" ItemStyle-CssClass="alignCenter">
               </telerik:GridBoundColumn>
               <telerik:GridTemplateColumn FilterControlAltText="Details Column" HeaderText="Details"
                   UniqueName="DetailsColumn" AllowFiltering="False">
                   <ItemStyle CssClass="alignCenter"></ItemStyle>
                   <HeaderStyle Width="12%" CssClass="alignCenter"></HeaderStyle>
                   <ItemTemplate>
                       <asp:Button ID="btnDisplay" runat="server" CommandName="Display" CausesValidation="false">
                       </asp:Button>
                   </ItemTemplate>
               </telerik:GridTemplateColumn>
               <telerik:GridTemplateColumn FilterControlAltText="Document Column" HeaderText="Document"
                   UniqueName="DocumentColumn" AllowFiltering="False">
                   <ItemStyle CssClass="alignCenter"></ItemStyle>
                   <HeaderStyle Width="15%" CssClass="alignCenter"></HeaderStyle>
                   <ItemTemplate>
                       <asp:Button CssClass="FakeLinkButton" ID="btnView" runat="server" CommandName="View">
                       </asp:Button>
                   </ItemTemplate>
               </telerik:GridTemplateColumn>
               <telerik:GridTemplateColumn FilterControlAltText="Action Column" HeaderText="Action"
                   UniqueName="ActionColumn" AllowFiltering="False">
                   <ItemStyle CssClass="alignCenter"></ItemStyle>
                   <HeaderStyle Width="12%" CssClass="alignCenter"></HeaderStyle>
                   <ItemTemplate>
                       <asp:Button ID="btnDelete" runat="server" CommandName="Delete1" CausesValidation="false">
                       </asp:Button>
                   </ItemTemplate>
               </telerik:GridTemplateColumn>
           </Columns>
           <EditFormSettings>
               <EditColumn FilterControlAltText="Filter EditCommandColumn column">
               </EditColumn>
           </EditFormSettings>
       </MasterTableView>
       <PagerStyle Mode="NextPrev" />
       <FilterMenu EnableImageSprites="False">
       </FilterMenu>
       <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
       </HeaderContextMenu>
   </cc2:AccessibleRadGrid>

Ahmed Al-Asaad
Top achievements
Rank 1
 answered on 24 May 2011
2 answers
83 views
Hi,

I have a rad gird which is populated using a data set which inturn reads from an XML file. The grid needs to have 'AutoGenerateColumns' as 'true' since the no: of columns cannot be predicted.

One of the columns is 'TIMESTAMP' which contains the date. How do I make the grid understand that the value in the 'TIMESTAMP' is a datetime and not a string?

Currently, the grid understands the 'TIMESTAMP' as a string and hence the sorting/filtering is in-correct. If its a 'datetime' type then I believe, the sorting will appear correctly.

Thanks,
Saravanan 
saravanan k
Top achievements
Rank 1
 answered on 24 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?