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

Problems on Azure/Amazon

1 Answer 28 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ted
Top achievements
Rank 1
Ted asked on 14 Jan 2013, 10:25 PM
Hi Folks - I'm having a problem with code working in VS2012, but not when I deploy to Azure, so I'm hoping someone can point me in the right direction.  I've also tried Amazon as well, with the same results.

What I'm trying to do is have a gridbutton column in a grid that when pressed, calls another page with a parameter. I've stripped down the code to that listed below, and changed the redirect link to CNN to see if that makes a difference.  The grid populates, but also paging behavior isn't normal. When the gridbutton is pressed, nothing seems to happen.

I also saw the threads regarding server time, so I've made sure I waited 24 hours after deployment before testing, with the same results, so I'm at a loss. Any help is appreciated.

Here's the sample aspx file (public URL is http://iceasppricecompare.azurewebsites.net )

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ICEAspPriceCompare.Default" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManagerMain" Runat="server">
        </telerik:RadScriptManager>
 
    <asp:SqlDataSource ID="SqlDataSourceCatalog" runat="server" ConnectionString="<%$ ConnectionStrings:icelocalmerchandiseConnectionString %>" SelectCommand="SELECT * FROM [Catalogs]"></asp:SqlDataSource>
        <telerik:RadGrid ID="RadGridMain" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" CellSpacing="0" DataSourceID="SqlDataSourceCatalog" GridLines="None" Skin="Metro" OnItemCommand="RadGridMain_ItemCommand">
<MasterTableView datakeynames="Id" datasourceid="SqlDataSourceCatalog">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" FilterControlAltText="Filter Id column" HeaderText="Id" ReadOnly="True" SortExpression="Id" UniqueName="Id">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="MaritzCatalogId" FilterControlAltText="Filter MaritzCatalogId column" HeaderText="MaritzCatalogId" SortExpression="MaritzCatalogId" UniqueName="MaritzCatalogId">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Title" FilterControlAltText="Filter Title column" HeaderText="Title" SortExpression="Title" UniqueName="Title">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Description" FilterControlAltText="Filter Description column" HeaderText="Description" SortExpression="Description" UniqueName="Description">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="UPC" FilterControlAltText="Filter UPC column" HeaderText="UPC" SortExpression="UPC" UniqueName="UPC">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Cost" DataType="System.Decimal" FilterControlAltText="Filter Cost column" HeaderText="Cost" SortExpression="Cost" UniqueName="Cost">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="MSRP" FilterControlAltText="Filter MSRP column" HeaderText="MSRP" SortExpression="MSRP" UniqueName="MSRP">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="MktAverage" DataType="System.Decimal" FilterControlAltText="Filter MktAverage column" HeaderText="MktAverage" SortExpression="MktAverage" UniqueName="MktAverage">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="MktHigh" DataType="System.Decimal" FilterControlAltText="Filter MktHigh column" HeaderText="MktHigh" SortExpression="MktHigh" UniqueName="MktHigh">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="MktLow" FilterControlAltText="Filter MktLow column" HeaderText="MktLow" SortExpression="MktLow" UniqueName="MktLow">
        </telerik:GridBoundColumn>
        <telerik:GridImageColumn DataImageUrlFields="ImageLink" FilterControlAltText="Filter column1 column" ImageHeight="" ImageWidth="75px" UniqueName="column1">
        </telerik:GridImageColumn>
        <telerik:GridButtonColumn CommandName="UPC" FilterControlAltText="Filter column column" Text="Market Price" UniqueName="column">
        </telerik:GridButtonColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
    </form>
</body>
</html>

 

 

 

and here's the codebehind file

using System;
using Telerik.Web.UI;
 
 
namespace ICEAspPriceCompare
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        protected void RadGridMain_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName.Equals("UPC"))
            {
                var item = (GridDataItem)e.Item;
                string id = item.OwnerTableView.DataKeyValues[item.ItemIndex]["Id"].ToString();
                Response.Redirect("http://www.cnn.com", true);
                //Response.Redirect("GoogleSimpleLookup.aspx?Id=" + id, true);
            }
        }
    }
}

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 17 Jan 2013, 03:44 PM
Hi Ted,

Going by your code I suspect that RadGrid is not well-suited for those cloud services.  Your grid is perfectly set-up and no wonder that it works find outside of Azure/Amazon. Unfortunately, I cannot tell what the issue might be as I don't have a way to test the grid. If you can provide some stack trace or any further information we might be able to investigate the issue further.

Regards, Tsvetoslav
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.
Tags
General Discussions
Asked by
Ted
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or