Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
201 views
Group,
Not sure there is an easy way to explain this, but basically I have an HTML table containing 4 columns with a bunch of RadTextBox controls.  What I am trying to do is iterate through each row of the HTML table and grab the the value of the RadTextBox based off of the cell index.

Below is a snippet of the code which appears to work for a regular asp textbox but not a radtextbox.  I get the error:
Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'Telerik.Web.UI.RadTextBox'.

foreach (HtmlTableRow row in uc.RecommendationTable.Rows)
{
 var rec1 = (RadTextBox)row.Cells[1].Controls[0];
}

 

i basically want to avoid having to use any find controls or anything because there are like 20 rows of 4 columns.  I want to iterate through each row and give me the value of the control located in each column of the HTML table.

Jon
Top achievements
Rank 1
 answered on 01 Aug 2011
1 answer
52 views
we update the data on the client and then process all changes on the server with a Grid /Client  Edit with single batch update .   
we are using this link  http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx
we have one problem,how to persist focus on grid pager when we update record on  one page ie pager index 1 and move to second page ie pager index  2,when we again go back to previous record ie on page 1 in grid it will go to page 1 but pager index is not updated it still focus on pager index 2. How to persist focus to pager index to previous page .



Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Aug 2011
3 answers
184 views

In the following extracted code, column 'Id' is not visible at all times.  Column 'AE' should be invisible, too.  However, column 'AE' appears in the EditForm despite event ItemDataBound event which sets both columns Visible = False.

How can I hide column AE?


<
telerik:RadGrid ID="rgHeader" runat="server" CellSpacing="0" DataSourceID="sdsHeader">

<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" DataSourceID="sdsHeader">

<CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordImageUrl="Images/new.png" AddNewRecordText="Add Header"></CommandItemSettings>

<Columns>

<telerik:GridButtonColumn Text="Select" CommandName="Select" UniqueName="Select" ItemStyle-Width="30px"></telerik:GridButtonColumn>

<telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>

<telerik:GridBoundColumn DataField="AE" HeaderText="AE" SortExpression="AE" UniqueName="AE"></telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Total" DataType="System.Int32" HeaderText="Total"

SortExpression="Total" UniqueName="Total">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Id" DataType="System.Int32" HeaderText="Id" ReadOnly="True"

SortExpression="Id" UniqueName="Id">

</telerik:GridBoundColumn>

</Columns>

<EditFormSettings>

<EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>

</EditFormSettings>

</MasterTableView>

<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>

</telerik:RadGrid>


Protected Sub rgHeader_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles rgHeader.ItemDataBound

  rgHeader.MasterTableView.GetColumn(

"Id").Visible = False

  rgHeader.MasterTableView.GetColumn(

"AE").Visible = False

 

End Sub

 

Rick
Top achievements
Rank 1
 answered on 01 Aug 2011
2 answers
75 views
Hi,

We have a standalone Image manager and we are using RadDialogOpener to handle this. After uploading a image if we go to image property the CSS Class dropdown has the styles listed from custom styles. But these styles are displayed as a  regular text instead of applying the styles to have a preview of it in the dropdown. This works fine in image manager inside Editor, only the stand alone image manager styles have issue.  I have populated the style based on this thread
http://www.telerik.com/community/forums/aspnet/editor/raddialogopener-and-stand-alone-image-manager-property-custom-style-and-color-issue.aspx

can some one help to fix this?

Thanks,
Akila.
Akila Kumarasamy
Top achievements
Rank 1
 answered on 01 Aug 2011
5 answers
1.1K+ views
Hi,
i have aone terelik grid having Gridtable view and i want to fetch the value of Grid bound column and on basic of that want to set the navigate URL of Gridhyperlinkcolumn.

please help.

below is the code of grid..how to get the value of column and set navigate url in code behind .
please help.

<

 

telerik:RadGrid runat="server"

 

 

ID="grdActions"

 

 

AllowPaging="false"

 

 

Width="750px"

 

 

AutoGenerateColumns="false"

 

 

Skin="Office2007"

 

 

DataSourceID="TaskActionsDataSource"

 

 

OnPreRender="grdActions_PreRender"

 

 

OnItemCommand="grdActions_ItemCommand"

 

 

OnRowDrop="grdActions_RowDrop"

 

 

OnItemDataBound="grdActions_ItemDataBound"

 

 

 

 

>

 

 

 

<ClientSettings EnableAlternatingItems="true"

 

 

EnableRowHoverStyle="true"

 

 

AllowExpandCollapse="false"

 

 

AllowRowsDragDrop="true"

 

 

>

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 

 

 

<MasterTableView DataKeyNames="Id" TableLayout="Fixed"

 

 

AllowMultiColumnSorting="false"

 

 

AllowFilteringByColumn="false"

 

 

AlternatingItemStyle-BackColor="#F2F3F5"

 

 

>

 

 

 

<DetailTables>

 

 

 

<telerik:GridTableView HeaderStyle-BackColor="Beige" CommandItemStyle-BackColor="Beige"

 

 

Name="DetailsTable"

 

 

DataSourceID="ActionModuleCollectionDataSource"

 

 

DataKeyNames="Id"

 

 

AutoGenerateColumns="false"

 

 

CommandItemDisplay="Top"

 

 

TableLayout="Fixed"

 

 

HeaderStyle-CssClass="hideGridHeader"

 

 

NoDetailRecordsText="There is no training, meeting or procurement attached to the action above"

 

 

CssClass="detailGridMargin"

 

 

 

>

 

 

<CommandItemTemplate>

 

 

<div style="padding: 5px 5px;">

 

 

<asp:LinkButton ID="btnAddTraining" runat="server" CommandName="AddTraining" Font-Names="Tahoma" Font-Size="11px"><img style="border:0px; width: 25px; height: 17px; vertical-align:middle;" alt="" src="../Images/add_training.png" />Add Training</asp:LinkButton>&nbsp;&nbsp;

 

 

<asp:LinkButton ID="btnAddMeeting" runat="server" CommandName="AddMeeting" Font-Names="Tahoma" Font-Size="11px"><img style="border:0px; width: 25px; height: 17px; vertical-align:middle;" alt="" src="../Images/add_meeting.png" />Add Meeting</asp:LinkButton>&nbsp;&nbsp;

 

 

<asp:LinkButton ID="btnAddProcurement" runat="server" CommandName="AddProcurement" Font-Names="Tahoma" Font-Size="11px"><img style="border:0px; width: 25px; height: 17px; vertical-align:middle;" alt="" src="../Images/add_procurement.png" />Add Procurement</asp:LinkButton>&nbsp;&nbsp;

 

 

</div>

 

 

</CommandItemTemplate>

 

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields DetailKeyField="Id" MasterKeyField="Id" />

 

 

</ParentTableRelation>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn UniqueName="ModuleType" DataField="ModuleType" HeaderStyle-Width="100px"></telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridHyperLinkColumn UniqueName="meetingurl"

 

 

DataTextField="Title" DataNavigateUrlFields="Id" DataNavigateUrlFormatString="../Meeting/Meeting.aspx?actionId={0}&ViewMode=ReadOnly"

 

 

>

 

 

</telerik:GridHyperLinkColumn>

 

 

</Columns>

 

 

 

</telerik:GridTableView>

 

 

 

</DetailTables>

 

 

 

<Columns>

 

 

<telerik:GridBoundColumn

 

 

DataField="SortCode"

 

 

Visible="true"

 

 

HeaderText="#"

 

 

HeaderStyle-Width = "30"

 

 

ItemStyle-Font-Bold="true"

 

 

ItemStyle-Font-Names="Tahoma"

 

 

>

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridTemplateColumn UniqueName="TemplateColumn" InitializeTemplatesFirst="false">

 

 

<HeaderTemplate>

 

 

<table id="Table1" cellspacing="0" cellpadding="0" border="0">

 

 

<tr>

 

 

<td colspan="0">

 

 

<b>Action Details</b>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</HeaderTemplate>

 

 

<ItemTemplate>

 

 

 

<table cellpadding="0" cellspacing="0" width="100%">

 

 

 

<tr>

 

 

<td style="border-width: 0px;"><input type="hidden" id="hiddenActionId" value="<%# Eval("Id") %>" /></td>

 

 

</tr>

 

 

 

<tr>

 

 

<td colspan="6" style="width: 200px; font-size: 12px; font-family: Tahoma;">

 

 

<b>Name:&nbsp;</b><%# Eval("Description") %> (<%# Eval("TypeName") %>) <%# Convert.ToBoolean(Eval("Location").Equals("")) ? "" : ":: " + Eval("Location")%>

 

 

</td>

 

 

<td align="right">

 

 

<img src="../images/status_<%# Eval("StatusName")%>.png" alt="<%# Eval("StatusName")%>" />

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td colspan="4" style="width: 250px; font-size: 12px; font-family: Tahoma;">

 

 

<b>Output:&nbsp;</b> <%# Eval("Output") %>

 

 

</td>

 

 

<td rowspan="3" style="width: 50px; font-size: 12px; font-family: Tahoma;" align="center">

 

 

<img src="../images/status_<%# Convert.ToBoolean(Eval("NoBudgetFlag")) ? "nobudget" : "budget" %>.png"

 

 

alt='<%# Convert.ToBoolean(Eval("NoBudgetFlag")) ? "No budget required for this action" : "Budget estimation required for this action" %>' />

 

 

</td>

 

 

 

<td colspan="2" rowspan="3" style="width: auto; font-size: 12px; font-family: Tahoma;" align="center">

 

$ <%

# Eval("TotalEstimationInDollar") %> &nbsp;&nbsp;&nbsp;&nbsp; <%# Eval("TotalEstimationInEuro") %>

 

 

 

<br />

 

<%

if (iViewBudget == 0)

 

{ %>

 

<a href="#" onclick="openRadWindowEstimation('<%# DataBinder.Eval(Container.DataItem, "Id") %>'); return false;" id="linkEstimation" class="smallFont" style="font-size: 9px; font-weight:bold; font-family: Tahoma; color: #0099FF;">[VIEW/MODIFY BUDGET]</a><% } %>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td colspan="4" style="font-size: 12px; font-family: Tahoma;">

 

 

<b>Date:&nbsp;</b> <%# Eval("StartDate") %> <%# Convert.ToBoolean(Eval("CompletionDate").Equals("")) ? "" : " to " + Eval("CompletionDate") %>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td colspan="4" style="font-size: 12px; font-family: Tahoma;">

 

 

<b>Comment:&nbsp;</b> <%# Eval("Comment") %>

 

 

</td>

 

 

</tr>

 

 

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

<script language="javascript" type="text/javascript">

 

 

function RefreshFinancialRelatedGrids(RadWindow) {

 

$find(

'<%=this.RadAjaxManager1.ClientID%>').ajaxRequest("Rebind");

 

}

 

function openRadWindowEstimation(actionId) {

 

 

 

// var lnkProbisWindow = document.getElementById("ctl00_messagePanelsContent_contentPlaceHolder_fvTaskDetail_linkEstimation");

 

 

// var hdnViewmodifyBudget = document.getElementById("ctl00_messagePanelsContent_contentPlaceHolder_fvTaskDetail_hdnViewmodifyBudget");

 

 

//

 

 

// if (hdnViewmodifyBudget.value == "1")

 

 

// lnkProbisWindow.enabled = false;

 

 

// else {

 

 

var oWnd = radopen("Task_Estimation.aspx?actionid=" + actionId + "&disableMaster=1", "RadWindowTaskEstimation");

 

oWnd.Center();

 

//}

 

}

 

 

</script>

 

 

</telerik:RadCodeBlock>

 

 

<telerik:RadWindowManager ID="RadWindowManagerTaskEstimation" runat="server" Modal="true">

 

 

<Windows>

 

 

<telerik:RadWindow ID="RadWindowTaskEstimation" runat="server"

 

 

DestroyOnClose="true" Modal="true"

 

 

Skin="Vista" Animation="None" ShowContentDuringLoad="false" VisibleStatusbar="false"

 

 

KeepInScreenBounds="true" Width="1000px" Height="750px" Behavior="Close" />

 

 

</Windows>

 

 

</telerik:RadWindowManager>

 

 

</table>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Aug 2011
8 answers
204 views
Hello,
I have a captcha control on a form with the refresh image link enabled. If the page name is not in the url the refresh image throws an error (listed below) but if the page name is in the url it works fine.
So
http://www.nirvanawebworks.com/company/contact/ throws an error
and
http://www.nirvanawebworks.com/company/contact/default.aspx does not.

Is there a way to make it work without the page name?

Thanks,
Brian

Webpage error details
 
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6.6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Timestamp: Wed, 13 Jul 2011 16:42:09 UTC
 
 
Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 405
Line: 6
Char: 84093
Code: 0
URI: http://www.nirvanawebworks.com/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1f68db6e-ab92-4c56-8744-13e09bf43565%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2011.1.519.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a911e11b9-43a3-4153-a0e1-a8dd325e7573%3a16e4e7cd%3af7645509%3a24ee1bba%3af46195d3%3a1e771326%3aaa288e2d%3ab7778d6c%3a11e117d7%3a7165f74
Brian Goldman
Top achievements
Rank 2
 answered on 01 Aug 2011
1 answer
82 views
Hello,

I am new to Telerik RadGrid.How can I show or hide filtering item based on some conditions?Can you provid any working sample?
Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Aug 2011
16 answers
242 views
Hi,

I'm having an issue with IE9, when I select item it does postback, site changes state accordingly, but cursor keeps blinking in the end in the selected item, if I try to click any postback controls of the page - nothing happens, I click somewhere nearby combobox (not all places help) and it loses focus, then I can click everything as normal, I've attached screenshot

Thx!

<telerik:RadComboBox ID="ddlOwnProjects" runat="server" DataTextField="Name" MarkFirstMatch="true"
                AutoPostBack="true" Width="180px" EnableEmbeddedSkins="false" Skin="DefaultGBT"
                DataValueField="Id" LoadingMessage="<%$ Resources:PGC, General_LoadingText %>"
                EmptyMessage="<%$ Resources:PGC, General_DdlPleaseSelectTitle %>" OnSelectedIndexChanged="ddlOwnProjects_SelectedIndexChanged"
                AppendDataBoundItems="true" Visible="true">
                <Items>
                    <telerik:RadComboBoxItem Text="<%$ Resources:PGC, General_DdlPleaseSelectTitle %>" Value="None" Selected="true" Enabled="false" />
                </Items>
            </telerik:RadComboBox>
Dimitar Terziev
Telerik team
 answered on 01 Aug 2011
4 answers
99 views

I have an ASP.NET web page with two postback events and the second one is aborting the first. The second one then doesn't render as expected once it completes.

In Detail

I have an ASP.NET web page that effectively contains two link buttons. It uses the Telerik ASP.NET AJAX controls, but I'm not sure if the behaviour is specfic to these controls:

The Page - an extremely cut-down version is as follows:

<telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" 
 
Position="BottomLeft" RelativeTo="Element" ShowEvent="OnClick"  
 
HideEvent="ManualClose" Animation="Fade" OnAjaxUpdate="OnShowItems" >   
     
<TargetControls> 
         
<telerik:ToolTipTargetControl TargetControlID="btnShowItems" /> 
     
</TargetControls> 
</telerik:RadToolTipManager> 
... 
... 
<asp:LinkButton ID="btnShowItems" runat="server" Visible="false"> 
     
<span><%= ItemsPrompt %></span> 
</asp:LinkButton> 
... 
... 
<uc1:X ID="XControl" runat="server"/>


The UserControl "X" - an extremely cut-down version is as follows:

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" 
 
LoadingPanelID="LoadingPanel1" RenderMode="Block"> 
   
<asp:LinkButton runat="server" ID="CausePostbackButton"  
     
Style="display: none" /> 
</telerik:RadAjaxPanel> 


Use Case #1 - successful

  1. The page loads and a JavaScript timer within Control "X" activates a postback on the LinkButton "CausePostbackButton" [eval(__doPostBack(postbackButtonClientID,''));]. (So, this mimics a user clicking the button).
  2. The AJAX call goes to the Server and n seconds later it returns and results in the page updating in a particular way.
  3. The user then clicks the LinkButton "btnShowItems" which causes a post-back to the Server and n' seconds later it returns and results in the page updating in a particular way.

Use Case #2 - failure

  1. The page loads and a JavaScript timer within Control "X" activates a postback on the LinkButton "CausePostbackButton". (So, this mimics a user clicking the button).

  2. Before the server has time to respond, the User clicks on the LinkButton "btnShowItems".

  3. In FireFox/Firebug, you can see that the first post-back event is "Aborted". The second post-back event completes (you can see the time taken reported) but the page is not visually updated.

  4. If the "manual" button is then clicked again, then that works as expected.

My thoughts

  • I know that JavaScript is single threaded, so if events can't be run immediately then they are queued.

  • I know that if a timer fires an event that is queued and then fires the same event whilst the first event is still queued, then one of these events (the second?) will be dropped.

  • This is acting as if the first event is being trashed, but then the second event can no longer find its "channel" to write to.

However, if I change the "manual" Link Button to an Image Button then the behaviour does not change.

Any ideas what the problem is (and ideally a solution)?

Many thanks in advance

Griff

submitted by bmcmillen
Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Aug 2011
1 answer
150 views
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="System.Data" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
<title>How to Change the TotalRowCount ...</title>
</head>
<body>
<form id="form1" runat="server">
<script runat="server" language="c#">
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        this.RadGrid1.DataSource = DataPage(0);
        this.RadGrid1.DataBind();
    }
}
public DataRow[] DataPage(int PageIndex)
{
    string sql = string.Empty;
    switch (this.RadComboBox1.SelectedValue)
    {
        case "2":
            sql = "pkID >= " + (PageIndex * 5 + 1) + " AND pkID <= " + (PageIndex * 5 + 5) + "";
            return dt2().Select(sql);
        default:
            sql = "pkID >= " + (PageIndex * 5 + 1) + " AND pkID <= " + (PageIndex * 5 + 5) + "";
            return dt1().Select(sql);
    }
}
protected void RadComboBox1_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
{
    this.RadGrid1.DataSource = DataPage(this.RadDataPager1.CurrentPageIndex);
    this.RadGrid1.DataBind();
}
protected void RadDataPager1_PageIndexChanged(object sender, RadDataPagerPageIndexChangeEventArgs e)
{
    this.RadGrid1.DataSource = DataPage(e.NewPageIndex);
    this.RadGrid1.DataBind();
}
protected void RadDataPager1_TotalRowCountRequest(object sender, RadDataPagerTotalRowCountRequestEventArgs e)
{
    this.RadDataPager1.TabIndex = 1;
    switch (this.RadComboBox1.SelectedValue)
    {
        case "1":
            e.TotalRowCount = dt1().Rows.Count;
            break;
        case "2":
            e.TotalRowCount = dt2().Rows.Count;
            break;
    }
}
public static DataTable dt1()
{
    DataTable table = new DataTable();
    table.Columns.Add("pkID", typeof(Int32));
    table.Columns.Add("ParentID", typeof(Int32));
    table.Columns.Add("Name", typeof(String));
    table.Columns.Add("Text", typeof(String));
    table.Rows.Add(new object[] { 1, 1, "testName1", "testText1" });
    table.Rows.Add(new object[] { 2, 1, "testName2", "testText2" });
    table.Rows.Add(new object[] { 3, 1, "testName3", "testText3" });
    table.Rows.Add(new object[] { 4, 1, "testName4", "testText4" });
    table.Rows.Add(new object[] { 5, 1, "testName5", "testText5" });
    table.Rows.Add(new object[] { 6, 1, "testName6", "testText6" });
    table.Rows.Add(new object[] { 7, 1, "testName7", "testText7" });
    table.Rows.Add(new object[] { 8, 1, "testName8", "testText8" });
    table.Rows.Add(new object[] { 9, 1, "testName9", "testText9" });
    table.Rows.Add(new object[] { 10, 1, "testName10", "testText10" });
    table.Rows.Add(new object[] { 11, 1, "testName11", "testText11" });
    table.Rows.Add(new object[] { 12, 1, "testName12", "testText12" });
    return table;
}
public static DataTable dt2()
{
    DataTable table = new DataTable();
    table.Columns.Add("pkID", typeof(Int32));
    table.Columns.Add("Name", typeof(String));
    table.Rows.Add(new object[] { 1, "C" });
    table.Rows.Add(new object[] { 2, "C++" });
    table.Rows.Add(new object[] { 3, "C#" });
    table.Rows.Add(new object[] { 4, "Java" });
    table.Rows.Add(new object[] { 5, "F++" });
    table.Rows.Add(new object[] { 6, "Z++" });
    return table;
}
</script>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadComboBox1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadComboBox1" />
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                <telerik:AjaxUpdatedControl ControlID="RadDataPager1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadDataPager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadDataPager1" />
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadComboBox ID="RadComboBox1" Runat="server" AutoPostBack="true" onselectedindexchanged="RadComboBox1_SelectedIndexChanged">
    <Items>
        <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="1" Selected="true" />
        <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="2" />
    </Items>
</telerik:RadComboBox>
<telerik:RadGrid ID="RadGrid1" runat="server" PageSize="5">
</telerik:RadGrid>
<telerik:RadDataPager ID="RadDataPager1" runat="server" PageSize="5" 
    ontotalrowcountrequest="RadDataPager1_TotalRowCountRequest" 
    onpageindexchanged="RadDataPager1_PageIndexChanged">
    <Fields>
        <telerik:RadDataPagerButtonField FieldType="NextLast" HorizontalPosition="RightFloat" />
        <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="10" HorizontalPosition="RightFloat" />
        <telerik:RadDataPagerButtonField FieldType="FirstPrev" HorizontalPosition="RightFloat" />
        <telerik:RadDataPagerGoToPageField CurrentPageText="" TotalPageText="/" TextBoxWidth="38" SubmitButtonText="Go" HorizontalPosition="RightFloat" />
    </Fields>
</telerik:RadDataPager>
</form>
</body>
</html>

this web application is correctly. just when i change RadComboBox Controls Item,
the TotalRowCount cannot be changed. how can i do ?
e.g.:
when the page load, default RadComboBox Item's Value is 1. then the current DataTable is dt1, the table's rows number is 12.
when i change RadComboBox to item 2. it's Value is 2,  the current DataTable is dt2. the table's rows number is 6.
but the RadDataPager's TotalRowCount still keep old value: 12 rows.

thanks.
Andrey
Telerik team
 answered on 01 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?