This is a migrated thread and some comments may be shown as answers.

Sort and Filter Not Working

9 Answers 106 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Juan
Top achievements
Rank 1
Juan asked on 30 Dec 2011, 09:52 PM
Hello everyone.  I have a page with a grid in which the grid and sort works properly when used against the personal webserver that comes with Visual Studio but not when used against the remote server.  When I say remote server I mean from one of the those hosting companies that you pay a small fee per month.  In trying to solve this problem I even allowed reordering but it still didn't solve the problem and even with reordering turned on the project works fine off of the personal web server.  Can someone please give me a hand with this?


<%@ 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">

<html xmlns="http://www.w3.org/1999/xhtml">
<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>
   <%--Needed for JavaScript IntelliSense in VS2010--%>
   <%--For VS2008 replace RadScriptManager with ScriptManager--%>
   <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>
 <script type="text/javascript">
  //Put your JavaScript code here.
    </script>
 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
 </telerik:RadAjaxManager>
 <div>
        <telerik:RadGrid runat="server" AllowFilteringByColumn="True"
            AllowPaging="True" AllowSorting="True" CellSpacing="0"
            DataSourceID="PeopleDBds" GridLines="None">
            <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="ContactID"
                DataSourceID="PeopleDBds">
<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 DataField="ContactID" DataType="System.Int32"
            FilterControlAltText="Filter ContactID column" HeaderText="ContactID"
            ReadOnly="True" SortExpression="ContactID" UniqueName="ContactID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="FirstName"
            FilterControlAltText="Filter FirstName column" HeaderText="FirstName"
            SortExpression="FirstName" UniqueName="FirstName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="LastName"
            FilterControlAltText="Filter LastName column" HeaderText="LastName"
            SortExpression="LastName" UniqueName="LastName">
        </telerik:GridBoundColumn>
    </Columns>

<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>

<FilterMenu EnableImageSprites="False"></FilterMenu>

<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
        </telerik:RadGrid>
     <asp:SqlDataSource ID="PeopleDBds" runat="server"
            ConnectionString="<%$ ConnectionStrings:DB_2381_testConnectionString %>"
            SelectCommand="SELECT * FROM [vContactTbl]"></asp:SqlDataSource>
 </div>
 </form>
</body>
</html>

9 Answers, 1 is accepted

Sort by
0
Juan
Top achievements
Rank 1
answered on 30 Dec 2011, 10:31 PM
btw everyong; I now realize that the paging isn't working either.
0
Pavlina
Telerik team
answered on 03 Jan 2012, 11:03 AM
Hi,

Can you please verify that you have not received any Javascript errors on the page? I tried to replicate the problem you are facing using the provided code, but to no avail. Please give it a try and let me know if it works properly when you use remote server or the same problem persists.

I am looking forward for your reply.

All the best,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Juan
Top achievements
Rank 1
answered on 04 Jan 2012, 11:07 PM
Hi there.  Thanks for taking the time to take a look at this.  I don't know how to verify if I am getting JavaScript errors.  Am I somehow able to determine if I'm getting JavaScript errors through Visual Studio or another Application?  If so can I get a pointer on how to do that?  Or can someone tell if JavaScript errors are happening by going to my troublesome app which is www.juanmatos.net  For sure I'm not seeing any errors of any kind on the surface.  I would appreciate any help I can get :)
0
Pavlina
Telerik team
answered on 05 Jan 2012, 11:17 AM
Hello,

You could run the project in debug mode after you click on F5 and see if you get any javascript errors. If you are running the project in non-debug mode it will ask you to add a new web.config file (with debugging enabled).

Additionally, you could also refer to the following link for more information about how to enable script debugging in Internet Explorer:
http://msdn.microsoft.com/en-us/library/ms241741(v=vs.80).aspx

Kind regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Juan
Top achievements
Rank 1
answered on 06 Jan 2012, 03:31 PM
Hi,  I didn't get any JavaScript errors. I also put a post on the hosting company's forum and still am waiting for a response.  Looks pretty bleak at this point :(
0
Pavlina
Telerik team
answered on 09 Jan 2012, 01:35 PM
Hi,

I am afraid we can not determine the exact cause for the issue you encountered without a working demo which demonstrate it. Therefore, I suggest you modify the example which I sent you in the previous post to replicate the problem or isolate a stripped working version of your project and send it attached via formal support ticket. We will examine it and will get back to you with our findings. 

All the best,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Juan
Top achievements
Rank 1
answered on 10 Jan 2012, 03:52 PM
Hi there.  I used the project you supplied, modified it and it now works!   The way I did my project originally was I opened Visual Studio 2010 Ultimate; clicked Telerik\RadControls for ASP.NET AJAX\Create New Telerik Project.  Then I added the code from a Telerik tuturial.  It looks like the project you supplied was from a "Create Website".  Is that so?  Can you please list the steps to create a project like the one you supplied in which I can just replace the code with the one that I have now that works for future projects?  Please.  Thanks a lot once again.
0
Pavlina
Telerik team
answered on 10 Jan 2012, 04:39 PM
Hello,

Yes, the project which I sent you is a Web Site and for step by step instructions about how to create Web Site project in VS 2010 you can refer to the link below: 
http://msdn.microsoft.com/en-us/library/k4cbh4dh.aspx

Regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Juan
Top achievements
Rank 1
answered on 10 Jan 2012, 08:57 PM
Hi.  I glanced over the link you provided and I see that there's no mention of clicking on Telerik on the toolbar so no mention of Telerik specifially anywhere.  I am familiar with VS website.  I just thought you could outline the steps you took to setup the working project you shared with us.  I suppose then I can go ahead and do a VS website the way I'm used to(which is how the provided link instructs), place a Telerik control on an aspx page and all should work.  Ok, thanks for help :)
Tags
Grid
Asked by
Juan
Top achievements
Rank 1
Answers by
Juan
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or