Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
135 views
hello,

I have been trying to include the telerik jquery libraries.
I realize by running on sharepoint I have to turn Assembly
references into the full assembly name with version info and
key number. so as a result I have changed my script references as in the code block below.
Keep in mind that this code runs in a master page, and that the page works when
I comment out the the script references. Otherwise I get the error which I posted below this
code block. Perhaps I am writing the reference incorrectly? Thanks for any help
<asp:ScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true"
        >
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI, version=2010.1.309.35, Culture=Neutral, PublicTokenKey=121fae78165ba3d4" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI, version=2010.1.309.35, Culture=Neutral, PublicTokenKey=121fae78165ba3d4" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI, version=2010.1.309.35, Culture=Neutral, PublicTokenKey=121fae78165ba3d4" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
             
        </Scripts>
    </asp:ScriptManager>
    

error
File Not Found.   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at System.Web.UI.AssemblyCache.Load(String assemblyName)
   at System.Web.UI.ScriptManager.RemoveDuplicates(List`1 scripts)
   at System.Web.UI.ScriptManager.RegisterScripts()
   at System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
umar okeeffe
Top achievements
Rank 1
 answered on 17 Dec 2010
1 answer
72 views
I have a screen that allows the exporting of grid. When the page first loads, I do not bind the grid to save loading time (there is a bunch of search criteria at the top). Now, I have an export and search button the user can click, but if they click export before the data is bound, I get an error stating the datssource needs to be set first.

What am I missing here?
mpaul
Top achievements
Rank 1
 answered on 17 Dec 2010
2 answers
503 views
Hi.
I got this error when i tried to edit the row in a hierarchical grid. I have one nested grid where i changed the UnitPrice value in ItemDataBound event. I need do divide the value to get the right currency. (If i do not, than i can do edit action in the nested grid without getting the error.) I have found in the forum other thread with the same error but it does not solve my case. The code i use is:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
       {
           if (e.Item is GridDataItem)
           {
               LoadTransAndDetailValues(e);
           }           
       }
 
private void LoadTransAndDetailValues(GridItemEventArgs e)
       {
           var item = e.Item as GridDataItem;
           if (e.Item.DataItem is Detail)
           {               
               var detail = e.Item.DataItem as Detail;                           
               double? unitPrice = detail.UnitPrice;
               item["UnitPrice"].Text = (unitPrice.HasValue && unitPrice.Value != 0) ?    (unitPrice.Value / 100.00).ToString() : "";
           }          
       }
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" GridLines="None" ShowGroupPanel="True" ShowStatusBar="True"
        Culture="Norwegian, BokmÃ¥l (Norway)" AutoGenerateColumns="False" Width="620px" onitemcommand="RadGrid1_ItemCommand" onitemdatabound="RadGrid1_ItemDataBound" AllowAutomaticUpdates="True"
        onneeddatasource="RadGrid1_NeedDataSource" onupdatecommand="RadGrid1_UpdateCommand">
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="TransId" EditMode="InPlace">
    <RowIndicatorColumn><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn>
        <DetailTables>
            <telerik:GridTableView runat="server" AllowPaging="False" DataKeyNames="DetailId" AllowFilteringByColumn="false" EditMode="InPlace" DataSourceID="DetailDataSource">
            <ParentTableRelation><telerik:GridRelationFields DetailKeyField="TransId" MasterKeyField="TransId"/></ParentTableRelation>
            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <Columns>                   
                <telerik:GridBoundColumn  UniqueName="JourneyTime" HeaderText="Tur" DataField="JourneyTime" ReadOnly="true" SortExpression="JourneyTime" AllowFiltering="true" ShowFilterIcon="false" AutoPostBackOnFilter="true" >
                <HeaderStyle Width="30px"></HeaderStyle><ItemStyle HorizontalAlign="Right" /></telerik:GridBoundColumn>            
                <telerik:GridBoundColumn  UniqueName="RouteName" HeaderText="Rute" DataField="RouteName" ReadOnly="true" SortExpression="RouteName" AllowFiltering="true" ShowFilterIcon="false" AutoPostBackOnFilter="true" >
                <HeaderStyle Width="50px"></HeaderStyle></telerik:GridBoundColumn>            
                <telerik:GridNumericColumn  UniqueName="TariffNr" DataType="System.Int32" HeaderText="Billettkode" DataField="TariffNr" SortExpression="TariffNr">
                <HeaderStyle Width="30px"></HeaderStyle><ItemStyle HorizontalAlign="Right"/></telerik:GridNumericColumn>                            
                <telerik:GridNumericColumn  UniqueName="DetailCount" DataType="System.Int32" HeaderText="Antall" DataField="DetailCount" SortExpression="DetailCount">
                <HeaderStyle Width="30px"></HeaderStyle><ItemStyle HorizontalAlign="Right"/></telerik:GridNumericColumn>                                            
                <telerik:GridNumericColumn  UniqueName="UnitPrice" HeaderText="Pris"  DataField="UnitPrice" DataType="System.Double" SortExpression="UnitPrice">
                <HeaderStyle Width="40px"></HeaderStyle><ItemStyle HorizontalAlign="Right"/></telerik:GridNumericColumn>                             
                <telerik:GridEditCommandColumn CancelText="Avbryt" EditText="Endre" InsertText="Sett inn" UpdateText="Oppdater" UniqueName="EditColumn"><HeaderStyle Width="105px"></HeaderStyle><ItemStyle HorizontalAlign="Right" /></telerik:GridEditCommandColumn>          
            </Columns>
            <EditFormSettings>
                <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
            </EditFormSettings>
            </telerik:GridTableView>
        </DetailTables>
    <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
    <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
    <Columns>
            <telerik:GridBoundColumn FilterControlWidth="95%" DataField="TransDate" DataType="System.DateTime" HeaderText="Dato" ReadOnly="True" SortExpression="TransDate" UniqueName="TransDate" ShowFilterIcon="false" AutoPostBackOnFilter="true">
        <HeaderStyle Width="140px"></HeaderStyle></telerik:GridBoundColumn
        <telerik:GridBoundColumn FilterControlWidth="95%" DataField="UserNr" DataType="System.Int32" HeaderText="Brukernr." ReadOnly="True" SortExpression="UserNr" UniqueName="UserNr" ShowFilterIcon="false" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith">
        <HeaderStyle Width="100px"></HeaderStyle><ItemStyle HorizontalAlign="Right"/></telerik:GridBoundColumn>       
        <telerik:GridBoundColumn FilterControlWidth="95%" DataField="TicketNr" DataType="System.Int32" HeaderText="Billettnr." ReadOnly="True" SortExpression="TicketNr" UniqueName="TicketNr" ShowFilterIcon="false" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith">
        <HeaderStyle Width="100px"></HeaderStyle><ItemStyle HorizontalAlign="Right"/></telerik:GridBoundColumn>                                  
        <telerik:GridBoundColumn FilterControlWidth="95%" DataField="AnnulComment" HeaderText="Annullerings kommentar" SortExpression="AnnulComment" UniqueName="AnnulComment" ShowFilterIcon="false" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith">
        <HeaderStyle Width="200px"></HeaderStyle></telerik:GridBoundColumn>                 
        <telerik:GridEditCommandColumn CancelText="Avbryt" EditText="Endre" InsertText="Sett inn" UpdateText="Oppdater" UniqueName="EditColumn">
        <HeaderStyle Width="105px"></HeaderStyle><ItemStyle HorizontalAlign="Right" /></telerik:GridEditCommandColumn>     
        <telerik:GridButtonColumn CommandName="Annul" Text="Annuller" UniqueName="AnnulColumn"><HeaderStyle Width="50px"></HeaderStyle></telerik:GridButtonColumn>            
    </Columns>
    <NoRecordsTemplate><div>Det er ingen elementer Ã¥ vise</div></NoRecordsTemplate>       
    </MasterTableView>
    <ClientSettings EnableRowHoverStyle="true">                       
        <Resizing AllowColumnResize="true"/>
        <ClientEvents OnRowDblClick="RowDblClick" />
        <Selecting AllowRowSelect="true"/>
    </ClientSettings>
    <SortingSettings EnableSkinSortStyles="False" SortedAscToolTip="Sortert stigende" SortedDescToolTip="Sortet synkende" SortToolTip="Klikk her for Ã¥ sortere" />           
    </telerik:RadGrid>
    
   <asp:LinqDataSource ID="DetailDataSource" runat="server" ContextTypeName="MtbsLinq.MtbsDataContext"
        TableName="Details" Where="TransId == @TransId" EnableUpdate="True">
        <WhereParameters>
            <asp:ControlParameter ControlID="RadGrid1" Name="TransId" PropertyName="SelectedValue" Type="Int32" DefaultValue="0"/>
        </WhereParameters>
    </asp:LinqDataSource>       
</asp:Content>
Martin
Telerik team
 answered on 17 Dec 2010
1 answer
142 views
I have a contact form that has three RadComboBox's on it that are not showing correctly. I have tried with several different skins and have the same problem. I think this is most likely a style-sheet issue but have been unable to find anything that would cause this. I have attached screenshots of what the page looks like and the code for the form is below. 

<table cellpadding="5" cellspacing="5" style="width: 400px; border-right: 1px solid #B0B0B0; border-left: 1px solid #B0B0B0">
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">Vipre Antivirus Product *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadComboBox ID="RadComboBoxVipreSuite" Skin="Simple" runat="server">
            <Items>
                <telerik:RadComboBoxItem Text="Vipre Business Premium" />
                <telerik:RadComboBoxItem Text="Vipre Business" />
            </Items>
        </telerik:RadComboBox>
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">First Name *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadTextBox ID="RadTextBoxFirstName" Skin="Simple" Width="200px" runat="server" />
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">Last Name *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadTextBox ID="RadTextBoxLastName" Skin="Simple" Width="200px" runat="server" />
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">Company Name *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadTextBox ID="RadTextBoxCompanyName" Skin="Simple" Width="200px" runat="server" />
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <span style="text-align: right">Phone Number</span>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadTextBox ID="RadTextBoxPhoneNumber" Skin="Simple" Width="200px" runat="server" />
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">Email Address *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadTextBox ID="RadTextBoxEmailAddress" Skin="Simple" Width="200px" runat="server" />
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <span style="text-align: right">City</span>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadTextBox ID="RadTextBoxCity" Skin="Simple" Width="200px" runat="server" />
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">Country *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadComboBox ID="RadComboBoxCountry" Skin="Simple" Width="200px" runat="server">
            <Items>
                <telerik:RadComboBoxItem Text="" />
                <telerik:RadComboBoxItem Value="us" Text="United States" />
                <telerik:RadComboBoxItem Value="ca" Text="Canada" />
                <telerik:RadComboBoxItem Value="al" Text="Albania" />
                <telerik:RadComboBoxItem Value="ai" Text="Anguilla" />
                <telerik:RadComboBoxItem Value="ag" Text="Antigua and Barbuda" />
                <telerik:RadComboBoxItem Value="ar" Text="Argentina" />
            </Items>
        </telerik:RadComboBox>
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">Num of Users *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadComboBox ID="RadComboBoxNumOfUsers" Skin="Simple" Width="200px" runat="server">
            <Items>
                <telerik:RadComboBoxItem Text="" />
                <telerik:RadComboBoxItem Text="1-24" />
                <telerik:RadComboBoxItem Text="25-49" />
                <telerik:RadComboBoxItem Text="50-99" />
                <telerik:RadComboBoxItem Text="100-249" />
                <telerik:RadComboBoxItem Text="250-499" />
                <telerik:RadComboBoxItem Text="500-999" />
                <telerik:RadComboBoxItem Text="1000-2499" />
                <telerik:RadComboBoxItem Text="2500-4999" />
                <telerik:RadComboBoxItem Text="5000+" />
            </Items>
        </telerik:RadComboBox>
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <span style="text-align: right">Do you resell computer software?</span>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <asp:RadioButtonList ID="RadioButtonListResell" Width="200px" runat="server">
            <asp:ListItem Selected="True">No</asp:ListItem>
            <asp:ListItem>Yes</asp:ListItem>
        </asp:RadioButtonList>
    </td>
</tr>
<tr>
    <td colspan="2" style="text-align: right; width: 320px">
        <asp:Button ID="ButtonRequestQuote" runat="server" Text="Request Your Quote" />
    </td>
</tr>
</table>
Kalina
Telerik team
 answered on 17 Dec 2010
4 answers
716 views
Hi All,

This seems to be a simple question. I need to autoselect the first row in the data grid after the rebind() function. Here is the section of the RadGrid

<

 

 

ClientSettings>

 

 

 

<ClientEvents OnRowDblClick="DataGridRowDblClicked" />

 

 

 

<Scrolling AllowScroll="true" ScrollHeight="235px" />

 

 

 

<Selecting AllowRowSelect="true" />

 

 

 

</ClientSettings>
Thanks,
E.

 

Marin
Telerik team
 answered on 17 Dec 2010
1 answer
168 views
Hi,

I use RadMaskedTextBox and was working fine when I needed to change the settings of the system encoding to UTF-8 to ISO-8859-1.

If you use UTF-8 encoding does not present the problem or
If you remove all RadMaskedTextBox not have the problem.


The problem happens in Internet Explorer 8 and Mozilla Firefox, Google Chrome already in the system works perfectly.


Log Error Internet Explorer 8:


Details of the errors of the Web page

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2;. NET CLR 2.0.50727;. NET CLR 3.5.30729;. NET CLR 3.0.30729; Media Center PC 6.0;. NET4.0C;. NET4.0; InfoPath.3)
Stamp Date / Time: Mon, 13 Dec 2010 19:01:40 UTC


Message: Invalid range in character set
Line: 26
Character: 76
Code: 0
URI: http://endereço.com.br/ScriptResource.axd?d=vu_KwIqaAfV9OW64BCKs1CQ1eAMk3v8Y9lx5gmdjsW_2Y1X7LOcJwe7pxr2ek9aXkQFGXlNyc1bir62R7N4gGRzjs-EiQBolW7eFkaBepkE1&t=56e9f4e3


Message: Object expected
Line: 167
Char: 5
Code: 0
URI: http://endereço.com.br/


line 26

function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }

line 167

Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadMaskedTextBox, {"_enableOldBoxModel":false,"_focused":false,"_initialMasks":[new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadLiteralMaskPart('.'),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadLiteralMaskPart('.'),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadLiteralMaskPart('-'),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart()],"_originalValue":"___.___.___-__","_shouldResetWidthInPixels":true,"clientStateFieldID":"login_ClientState","enabled":true,"styles":{HoveredStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riHover text"],InvalidStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riError text"],DisabledStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riDisabled text"],FocusedStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riFocused text"],EmptyMessageStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riEmpty text"],ReadOnlyStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riRead text"],EnabledStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riEnabled text"]}}, null, null, $get("login"));
});


Setting charset:

<?xml version="1.0" encoding="ISO-8859-1"?>
 
<globalization requestEncoding="ISO-8859-1" responseEncoding="ISO-8859-1" culture="pt-BR" uiCulture="pt-BR" />


RadMaskedTextBox:

<Telerik: Mask RadMaskedTextBox ="###.###.###-##" id = "login" CssClass = "text" runat = "server"TabIndex = "1" WIDTH = "300"></ Telerik: RadMaskedTextBox>



Anyone know any way to solve the problem?

Thanks,
Martin
Telerik team
 answered on 17 Dec 2010
7 answers
451 views
We have a radgrid which when adding or editing records, opens a separate form in a radwindow with it's own .aspx page.  We have run into an issue when attempting to add a new, or edit a record from a radwindow and upon clicking the save button in the window, we cannot get the corresponding radgrid to refresh the data properly.  The data saves properly in the database, the window closes, the ajax request method server side runs, and rebind method server side for the grid also runs when called from the ajax request method.

This used to work on the older RadControls back before we upgraded the site to the ASP.NET AJAX RadControls.  The following sets of code are how we open the radwindow, save the data and close the radwindow, call the ajaxrequest method, and call the grid rebind method.

We open the radwindow dynamically through the itemcommand event of the radgrid as such:
Private Sub radgPayRequest_ItemCommand(ByVal source As ObjectByVal e As GridCommandEventArgs) Handles radgPayRequest.ItemCommand 
        If LCase(e.CommandName) = LCase("AddNewPaymentRequest"Then 
            'Set the cache values to pass to the window 
            Common.Cache.CacheSiteInfo.Cache_PageMode = EnumUI.PageMode.AddNew 
 
            'Open the radwindow 
            Call RadWindowSettings_AdminPilotPayRequest() 
End If 
End Sub 
 
Private Sub RadWindowSettings_AdminPilotPayRequest() 
        Dim rwPilotPayRequest As New RadWindow 
 
        rwPilotPayRequest.InitialBehaviors = WindowBehaviors.None 
        rwPilotPayRequest.NavigateUrl = "Pilot/AdminPilotPayRequest.aspx" 
        rwPilotPayRequest.Height = System.Web.UI.WebControls.Unit.Pixel(500) 
        rwPilotPayRequest.Width = System.Web.UI.WebControls.Unit.Pixel(725) 
        rwPilotPayRequest.VisibleStatusbar = False 
        rwPilotPayRequest.Modal = False 
        rwPilotPayRequest.Behaviors = WindowBehaviors.Close 
        rwPilotPayRequest.DestroyOnClose = True 
        rwPilotPayRequest.VisibleOnPageLoad = True 
 
        radwWindowMan.Windows.Add(rwPilotPayRequest) 
    End Sub 

This is the save button method from the window, which saves the new or existing record, and closes the window:
Private Sub btnSave_Click(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles btnSave.Click 
        Try 
            'We run the save event here, which saves the data correctly to the database 
 
            'Close the window 
            ClientScript.RegisterStartupScript(Page.GetType](), "CloseWindow""<script language=""javascript"">CloseRadWindow();</script>"
        End Try 
    End Sub 

This is our javascript method, located in an external .js file which closes the radwindow:
function GetRadWindow() 
    { 
        var oWindow = null
        if (window.radWindow) oWindow = window.radWindow; 
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; 
        return oWindow; 
    } 
 
function CloseRadWindow() 
    { 
        var oWindow = GetRadWindow(); 
 
        oWindow.Close(); 
    } 

After the save button event runs from the aspx page in the radwindow, it accessed the refreshGrid() javascript method on the aspx page which contains the radgrid.  This is our code to get the id of the radajaxmanager to begin the Ajax Request:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
<script TYPE="text/javascript">              
            function refreshGrid(arg) 
            { 
                if(!arg) 
                { 
                    $find("<%=radaManager.ClientID %>").ajaxRequest("Rebind"); 
                } 
                else 
                { 
                    $find("<%=radaManager.ClientID %>").ajaxRequest("RebindAndNavigate"); 
                } 
            } 
        </script> 
    </telerik:RadCodeBlock> 

The Ajax Manager we have on the same .aspx page as the radgrid has the following settings applied:
<telerik:RadAjaxManager ID="radaManager" RUNAT="server" OnAjaxRequest="radaManager_AjaxRequest"
        <AjaxSettings> 
            <telerik:AjaxSetting AJAXCONTROLID="radaManager"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl CONTROLID="radgPayRequest"></telerik:AjaxUpdatedControl> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AJAXCONTROLID="radgPayRequest"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl CONTROLID="radgPayRequest"></telerik:AjaxUpdatedControl> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

The following code is the Ajax Request run server side:
Protected Sub radaManager_AjaxRequest(ByVal sender As ObjectByVal e As AjaxRequestEventArgs) Handles radaManager.AjaxRequest 
        Select Case e.Argument 
            Case "Rebind" 
                radgPayRequest.MasterTableView.SortExpressions.Clear() 
                radgPayRequest.MasterTableView.GroupByExpressions.Clear() 
                radgPayRequest.MasterTableView.Rebind() 
            Case "RebindAndNavigate" 
                radgPayRequest.MasterTableView.SortExpressions.Clear() 
                radgPayRequest.MasterTableView.GroupByExpressions.Clear() 
                radgPayRequest.MasterTableView.Rebind() 
        End Select 
    End Sub 

Then the rebind hits our NeedsDataSource Method and in theory should rebind the grid and refresh the data.  However, after we run this process the grid does not refresh the data, unless we hit the refresh command link in the command header we created on the grid.

We have confirmed through testing that our Ajax Request event is being accessed and running the grid rebind method in the server side code.  We are not receiving any javascript errors either.

On the older RadControls we had to force the postback on the page to get the AjaxManager to properly reload the grid data, which we found through the forums:
Protected Overrides Sub RaisePostBackEvent(ByVal sourceControl As IPostBackEventHandler, ByVal eventArgument As String
        MyBase.RaisePostBackEvent(sourceControl, eventArgument) 
 
        If TypeOf sourceControl Is RadAjaxManager Then 
            Select Case eventArgument 
                Case "Rebind" 
                    radgPayRequest.MasterTableView.SortExpressions.Clear() 
                    radgPayRequest.MasterTableView.GroupByExpressions.Clear() 
                    radgPayRequest.MasterTableView.Rebind() 
                Case "RebindAndNavigate" 
                    radgPayRequest.MasterTableView.SortExpressions.Clear() 
                    radgPayRequest.MasterTableView.GroupByExpressions.Clear() 
                    radgPayRequest.MasterTableView.Rebind() 
            End Select 
        End If 
    End Sub 'RaisePostBackEvent 

Has anyone run into this issue before with the ASP.NET AJAX controls?  If so, how were you able to get the grid to refresh the data?  Is it possible that the way we are opening the radwindow could cause the grid not to refresh?

We appreciate any help or suggestions.
Jonx
Top achievements
Rank 2
 answered on 17 Dec 2010
2 answers
169 views
Hi,

I have used 8 radgrid in my application. when i open the page in IE7 it is taken nearly 60,000K memory used in my system. but when click any add button in my radgrid it is increased 2,000K like this 62,000K. then when i canceled add option memory doesn't decreased. then i open add option in same grid memory increased another 2,000K like 64,000. whenever using add button memory increased but whenever closed memory doesn't decreased.

How to resolved this problem. i used CarbageCollecter in my application like CG.Collect(). but doesn't any changes. please give me tips for this Performance issue.

Otherwise any other option like CG.Collect().

Thanks in Advance,
Dhamu.
Dhamodharan
Top achievements
Rank 1
 answered on 17 Dec 2010
2 answers
161 views
Hello,
I'm attempting to perform server side filtering on a RadGrid.  I'm trying to follow your examples on filtering as well as some blog posts found here and here.  On intial page load I load the Grid using a SQL data set. This loads fine.  I then load filters for the status column of "All, Active, and Working".  These values match exactly to what is returned in the data. When I click on the filter for the status column the server side event is called but the data is removed from the grid. 
Can you tell me what I'm doing wrong?
thanks
pete

ASPX
<rad:RadGrid id="RadGrid1" 
 OnItemCreated="RadGrid1_ItemCreated" 
 OnPreRender="RadGrid1_PreRender" 
 OnItemCommand="RadGrid1_ItemCommand"                                 
 ShowStatusBar="true" runat="server" AllowPaging="False" AllowSorting="True"
 AllowMultiRowSelection="True" AutoGenerateColumns="false"  
 ClientSettings-Resizing-ResizeGridOnColumnResize="false" 
 EnablePostBackOnRowClick="true"
 Width="100%"   Height="92%"  Skin="Windows7" AllowFilteringByColumn="true" EnableLinqExpressions="false">
        <MasterTableView PageSize="10" Width="100%" TableLayout="Fixed" EnableViewState="false">
              <Columns>                        
                    <rad:GridTemplateColumn UniqueName="CheckBoxTemplateColumn"  
                                           HeaderStyle-Width="10%" 
                                           HeaderStyle-HorizontalAlign="Center" 
                                           AllowFiltering="false">
                                               <HeaderTemplate>
                                                <asp:CheckBox id="headerChkbox" Text="Select All" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox>
                                               </HeaderTemplate>
                                               <ItemTemplate >
                                                   <asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server" Width="65"></asp:CheckBox>
                                               </ItemTemplate>                                            </rad:GridTemplateColumn>                                                         <rad:GridBoundColumn 
                                               DataField="DISCUSSION" 
                                               DataType="System.String" 
                                               HeaderText="Discussion"    
                                               Visible="False"                                                   
                                               UniqueName="DISCUSSION">
                                               <ItemStyle />
                                           </rad:GridBoundColumn>                        
                                           <rad:GridBoundColumn 
                                               DataField="KEY" 
                                               DataType="System.String" 
                                               HeaderText="ID"                                                 Visible="True"                                                   
                                               UniqueName="KEY"
                                                 
                                               HeaderStyle-HorizontalAlign="Center" 
                                               ItemStyle-HorizontalAlign="Center" 
                                               AllowFiltering="false">
                                               <ItemStyle />
                                           </rad:GridBoundColumn>
                                           <rad:GridBoundColumn 
                                               DataField="NAME" 
                                               DataType="System.String" 
                                               HeaderText="Name"                                                       
                                               UniqueName="NAME" 
                                               HeaderStyle-HorizontalAlign="Center" 
                                               ItemStyle-HorizontalAlign="Center" 
                                               HeaderStyle-Width="40%" 
                                               AllowFiltering="false">
                                               <ItemStyle />
                                           </rad:GridBoundColumn>
                                                                                       <rad:GridBoundColumn 
                                               DataField="STATUS" 
                                               DataType="System.String" 
                                               HeaderText="Status"                                                       
                                               UniqueName="STATUS"                                               
                                               SortExpression="STATUS"                                                
                                               ShowSortIcon="true"  
                                               HeaderStyle-HorizontalAlign="Center" 
                                               ItemStyle-HorizontalAlign="Center" 
                                               HeaderStyle-Width="10%" 
                                               AllowFiltering="true"
                                               AutoPostBackOnFilter="true" >
                                               <ItemStyle />
                                               <FilterTemplate>                                                    
                                                   <rad:RadComboBox ID="RadComboBoxStatus"  OnSelectedIndexChanged="FilterCombo_SelectedIndexChanged" 
                                                       DataTextField="STATUS" 
                                                       AutoPostBack="true"
                                                       DataValueField="STATUS" Width="70px"                                                          
                                                       runat="server" 
                                                       AppendDataBoundItems="true">                                                         <Items>                                                             <rad:RadComboBoxItem Text="All"  Value="All" /> 
                                                           <rad:RadComboBoxItem Text="Active"  Value="Active"/> 
                                                           <rad:RadComboBoxItem Text="Working" Value="Working" />  
                                                                                 
                                                       </Items>
                                                   </rad:RadComboBox>                                                   
                                               </FilterTemplate>
                                           </rad:GridBoundColumn>
                                                                                                                                                                          </Columns>
                                   </MasterTableView>
                                   <ClientSettings EnableRowHoverStyle="true" 
                                                   Resizing-AllowColumnResize="true"
                                                   Resizing-AllowRowResize="true"  
                                                   Resizing-EnableRealTimeResize ="false" 
                                                   Resizing-ResizeGridOnColumnResize="false" 
                                                   Resizing-ClipCellContentOnResize ="false">                                                    
                                       <Scrolling AllowScroll ="true" UseStaticHeaders="true" />
                                       <ClientEvents OnColumnResized="OnColumnResized" />                                        
                                   </ClientSettings>
                                   <PagerStyle Mode="Slider"></PagerStyle>
                               </rad:RadGrid>

CS
protected void FilterCombo_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
    {
        string filterExpression;
        filterExpression = "([STATUS] = \'" + e.Text + "\')";
        RadGrid1.MasterTableView.FilterExpression = filterExpression;
        RadGrid1.MasterTableView.Rebind();
    }
Pete
Top achievements
Rank 1
 answered on 17 Dec 2010
2 answers
57 views
how to set the cell alignment in export pdf
Daniel
Telerik team
 answered on 17 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?