Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
63 views
Hello,

I implemented your solution for a custom column filter from the link below:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filteringtemplatecolumns/defaultcs.aspx

This works when running it, but it has a big problem (I'm on VS 2008 SP1): the .aspx.desginer file does regenerate anymore!
I tried deleting it, and then Convert to Web Application from the .aspx file (which should generate the .aspx.designer file), but I got the error:
"Generation of designer file failed: unknown server tag <custom ...."
Once I remove this tag (<custom....), the generation of .aspx.designer file works very well.

Thanks,
Toni
Kostadin
Telerik team
 answered on 10 Oct 2013
1 answer
240 views

I am working on a contact list similar to the demos for the RadListView. What I want to do is have the items bind server side. This could be via labels for each data field for an item or inputs like textboxes. Then on each item bound there would be an edit button. When the edit button is clicked then via client side script the values of the item would be passed to a dialog radwindow where they can edit it. When done they would click and ok button and then the dialog would pass the values back, they would be added to the ListView as a new item. Well the dialog was easy to do, but its the sending and receiving from the ListView that is proving difficult. The only option I see is custom attributes on the fields in the item and using jquery selectors.


So my question is whether there is a good sample code of editing the items of a list view client side and particularly in a rad window?



Secondly is there a way to have say either via loading it via the page or a service call back to the page the data list for a list view, bind it client side and then do similar what I described previously.



Thanks.

Marin
Telerik team
 answered on 10 Oct 2013
5 answers
165 views
I am very new at this so if this is too easy a question, please refer me to an example page/video. Otherwise here's my quesion.

I have a table with 3 columns for example

ProductName
ProductColor (RED,WHITE,BLUE)
ProductDate

What I want to do is create a form to search for products by allowing partial name of the product, allow users to choose from a listbox to select one or more colors, and a productdate begin and productdate end to find out the timeframe of product creation.

I know how to create a radgrid and display it using a selected query.

How would I go about creating the initial search screen and using the form fields to modify the grid?

Any pointers, samples appreciated!
Maria Ilieva
Telerik team
 answered on 10 Oct 2013
3 answers
1.6K+ views
I want the code where i can bound the data code behind and access and change all the bind controls on the ItemDataBound Event
see the code.
<telerik:RadGrid ID="RadGrid1" runat="server"
        onitemcommand="RadGrid1_ItemCommand" GridLines="None"
        onitemdatabound="RadGrid1_ItemDataBound">
        <MasterTableView>
            <Columns>
                <telerik:GridTemplateColumn HeaderText="CompanyName" UniqueName="CompanyName">
                    <EditItemTemplate>
                        <asp:TextBox runat="server"></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server"><%# Eval("CompanyName")%></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
    </telerik:RadGrid>
This is my c# code
protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadData();
            }
        }
 
        private void LoadData()
        {
// done some binding code
            RadGrid1.DataSource = gd.GetDataTable("SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, PostalCode FROM Customers");
        }
        protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {
             // what i have to do for the stuff for example
        }
 
        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item.ItemType == GridItemType.AlternatingItem || e.Item.ItemType == GridItemType.Item)
            {
                GridItem item = default(GridItem);
                // get the label value on databound and change it.
 
            }
        }
Princy
Top achievements
Rank 2
 answered on 10 Oct 2013
3 answers
92 views

I'm having some problems with one of our webshops. A Telerik radgrid works as the cart and lists all products currently in the cart. The paging on the Radgrid correctly splits the cart view into different pages. The problem occurs when one manually tries to change the amount of a product, but only if the product is on the LAST page of the radgrid and only if the number of products are less than the page size limit.


I have figured it out as much as the radgrid believes there are always an even amount of products, based on the radgrid's page size.

The crash occurs in the tbQuantity_TextChanged event handler, more specific when var shopItemID = Convert.ToInt32(item.GetDataKeyValue("ID")); is called for an item that doesn't exist on this page, but on another page.

The exception is

System.ArgumentOutOfRangeException was unhandled by user code
  Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

 
Gridview code

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ShopItems.ascx.cs" Inherits="Litho.Framework.Web.Modules.Shop.ShopItems" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<telerik:RadGrid
    ID="gvCartItems"
    runat="server"
    AutoGenerateColumns="False"
    AllowPaging="True"
    PageSize="5"
    Skin="Default"
    GridLines="None"
    AllowFilteringByColumn="False"
    AllowSorting="True"
    ShowFooter="True"
    OnNeedDataSource="gvCartItems_NeedDataSource"
    OnItemCreated="gvCartItems_ItemCreated"
    OnItemDataBound="gvCartItems_ItemDataBound"
    OnDeleteCommand="gvCartItems_DeleteCommand">
 
    <MasterTableView Width="100%" NoMasterRecordsText="Inga artiklar" ShowHeadersWhenNoRecords="false" DataKeyNames="ID">
        <Columns>
            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Radera" UniqueName="DeleteColumn" HeaderStyle-Width="20" />
            <telerik:GridTemplateColumn HeaderText="Antal" HeaderStyle-Width="110px" DataField="Quantity" UniqueName="Quantity" Aggregate="Sum" FooterText="Totalt antal: ">
                <ItemTemplate>
                    <telerik:RadNumericTextBox
                        ID="tbQuantity"
                        runat="server"
                        AutoPostBack="true"
                        Width="70px"
                        MinValue="1"
                        Visible="false"
                        ShowSpinButtons="true"
                        IncrementSettings-InterceptArrowKeys="false"
                        NumberFormat-GroupSizes="9"
                        NumberFormat-DecimalDigits="0"
                        IncrementSettings-InterceptMouseWheel="true"
                        NumberFormat-AllowRounding="False"
                        OnTextChanged="tbQuantity_TextChanged">
 
                        <EnabledStyle HorizontalAlign="Right" />
 
                    </telerik:RadNumericTextBox>
                        <telerik:RadComboBox ID="ddlQuantity" DataTextField="Quantity" DataValueField="Quantity" Visible="false" runat="server" Width="50px" AutoPostBack="true" OnSelectedIndexChanged="ddlQuantity_SelectedIndexChanged" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
 
 
            <telerik:GridBoundColumn HeaderText="Artnr" ReadOnly="True" DataField="ArticleNumber" UniqueName="ArticleNumber" HeaderStyle-Width="80" />
 
            <telerik:GridTemplateColumn  HeaderText="Artikel" UniqueName="Title" ShowFilterIcon="false">
                <ItemTemplate>
                    <asp:HyperLink ID="hlTitle" runat="server" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
 
            <telerik:GridTemplateColumn HeaderText="a`pris" UniqueName="Price" ShowFilterIcon="false">
                <ItemTemplate>
                    <asp:Label ID="lblUnitprice" runat="server" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
 
            <telerik:GridTemplateColumn HeaderText="Totalpris" UniqueName="Totalprice" ShowFilterIcon="false">
                <ItemTemplate>
                    <asp:Label ID="lblTotalPrice" runat="server" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
 
        </Columns>
    </MasterTableView>
 
    <FooterStyle Font-Bold="true" BackColor="#e6e6e6" />
 
    <PagerStyle Mode="NextPrevAndNumeric" />
 
    <FilterMenu EnableTheming="True">
        <CollapseAnimation Duration="200" Type="OutQuint" />
    </FilterMenu>
 
</telerik:RadGrid>
 
<asp:PlaceHolder ID="phItemSummary" runat="server" />

Code behind

using System;
using System.Collections.Generic;
using System.Web.UI;
using System.Web.UI.WebControls;
using Litho.Framework.BusinessLayer;
using Litho.Framework.BusinessLayer.Base;
using Litho.Framework.BusinessLayer.Base.Settings;
using Litho.Framework.BusinessLayer.Modules.Shop;
using Litho.Framework.PresentationLayer;
using Litho.Framework.ServiceLayer;
using Telerik.Web.UI;
 
namespace Litho.Framework.Web.Modules.Shop
{
    public partial class ShopItems : UserControl
    {
        IShopItemHolder _shopItemHolder = null;
        bool _readMode = true;
        SessionHelper _sessionHelper = new SessionHelper();
 
        #region Public methods
 
        public void LoadItems(IShopItemHolder shopItemHolder, bool readMode)
        {
            _shopItemHolder = shopItemHolder;
            _readMode = readMode;
 
            gvCartItems.Rebind();
 
            loadItemsSummary();
        }
 
        private void loadItemsSummary()
        {
            phItemSummary.Controls.Clear();
 
            var ucItemSummary = (ShopItemsSummary)Page.LoadControl("~/Modules/Shop/ShopItemsSummary.ascx");
            ucItemSummary.LoadItemSummary(_shopItemHolder);
 
            phItemSummary.Controls.Add(ucItemSummary);
        }
 
        #endregion
 
        #region Events
 
        protected void gvCartItems_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            gvCartItems.DataSource = _shopItemHolder.Items;
        }
 
        protected void gvCartItems_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                var item = (GridDataItem)e.Item;
                var btnDelete = (ImageButton)item["DeleteColumn"].Controls[0];
 
                btnDelete.ImageUrl = string.Format("~/Base/Themes/{0}/Images/Icons16x16/iconDelete.png", SettingsManager.GetGlobalSettings().AdminTheme);
                btnDelete.Visible = !_readMode;
            }
        }
 
        protected void gvCartItems_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                var shopItem = (IShopItem)e.Item.DataItem;
 
                var hlTitle = (HyperLink)e.Item.FindControl("hlTitle");
                var lblUnitPrice = (Label)e.Item.FindControl("lblUnitprice");
                var lblTotalPrice = (Label)e.Item.FindControl("lblTotalPrice");
 
                if (!shopItem.IsExternal)
                {
                    var tbQuantity = (RadNumericTextBox)e.Item.FindControl("tbQuantity");
                    tbQuantity.ShowSpinButtons = !_readMode;
                    tbQuantity.Text = shopItem.Quantity.ToString();
                    tbQuantity.Visible = true;
                    tbQuantity.Enabled = !_readMode;
                }
                else
                {
                    if (!_readMode)
                    {
                        var ddlQuantity = (RadComboBox)e.Item.FindControl("ddlQuantity");
                        ddlQuantity.DataSource = shopItem.PriceCollection;
                        ddlQuantity.DataBind();
                        ddlQuantity.SelectedValue = shopItem.Quantity.ToString();
                        ddlQuantity.Visible = true;
                    }
                }
 
                if (!shopItem.IsExternal)
                {
                    var parameters = new Dictionary<string, string>();
                    parameters.Add(KeyMaster.RequestParamsNames.Modules.Shop.PRODUCT_ID, shopItem.ID.ToString());
 
                    hlTitle.NavigateUrl = new FWContent().GetContentUrl(ModuleIDConstant.SHOP, ContentIDConstant.Shop.PRODUCT_VIEW, parameters);
                }
 
                hlTitle.Text = shopItem.Title;
 
                lblUnitPrice.Text = shopItem.Price.ToString("0.00") + " SEK";
                lblTotalPrice.Text = shopItem.GetCost(false).ToString("0.00") + " SEK";
            }
        }
 
        protected void tbQuantity_TextChanged(object sender, EventArgs e)
        {
            if (!_readMode)
            {
                RadNumericTextBox tbQuantity;
 
                foreach (GridDataItem item in gvCartItems.Items)
                {
                    if (item is GridDataItem)
                    {
                        tbQuantity = item.FindControl("tbQuantity") as RadNumericTextBox;
 
                        var shopItemID = Convert.ToInt32(item.GetDataKeyValue("ID"));
                        var shopItem = _sessionHelper.CurrentCart.CartItems.Find(x => x.ID == shopItemID);
 
                        if (!shopItem.IsExternal)
                        {
                            _sessionHelper.CurrentCart.CartItems.Find(x => x.ID == shopItemID).Quantity = Convert.ToInt32(tbQuantity.Text);
                            _sessionHelper.CurrentCart.CartItems.Find(x => x.ID == shopItemID).TotalPrice = _sessionHelper.CurrentCart.GetItemCost(shopItemID, false);
                            _shopItemHolder = _sessionHelper.CurrentCart;
                        }
                    }
                }
 
                loadItemsSummary();
                gvCartItems.Rebind();
            }
        }
 
        protected void gvCartItems_DeleteCommand(object source, GridCommandEventArgs e)
        {
            if (!_readMode)
            {
                var cartItemID = (int)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"];
                _sessionHelper.CurrentCart.DeleteItem(cartItemID);
                _shopItemHolder = _sessionHelper.CurrentCart;
 
                if (_sessionHelper.CurrentCart.Items.Count == 0)
                {
                    Response.Redirect(new FWContent().GetContentUrl(ModuleIDConstant.SHOP, ContentIDConstant.Shop.CART));
                }
                else
                {
                    gvCartItems.Rebind();
                    loadItemsSummary();
                }
            }
        }
 
        protected void ddlQuantity_SelectedIndexChanged(object sender, EventArgs e)
        {
            RadComboBox ddlQuantity;
 
            foreach (GridDataItem item in gvCartItems.Items)
            {
                if (item is GridDataItem)
                {
                    ddlQuantity = item.FindControl("ddlQuantity") as RadComboBox;
 
                    var cartItemID = Convert.ToInt32(item.GetDataKeyValue("ID"));
                    var cartItem = _sessionHelper.CurrentCart.CartItems.Find(x => x.ID == cartItemID);
 
                    if (cartItem.IsExternal)
                    {
                        cartItem.Quantity = Convert.ToInt32(ddlQuantity.Text);
                        cartItem.TotalPrice = getProductPrice(cartItem);
                    }
                }
            }
 
            loadItemsSummary();
 
            gvCartItems.Rebind();
        }
 
        #endregion
 
        private double getProductPrice(CartItem cartitem)
        {
            foreach (var price in cartitem.PriceCollection)
            {
                if (price.Quantity == cartitem.Quantity)
                {
                    return price.Price;
                }
            }
 
            throw new Exception(); // todo lägg till customexception
        }
    }
}

I've been trying to work something out with custom paging, but no luck so far, so I'm still using this code, only changed PageSize to 100 so the shop won't crash that easily. ;)

Thanks in advance!
Magnus
Top achievements
Rank 1
 answered on 10 Oct 2013
1 answer
39 views
<telerik:GridBoundColumn HeaderText="PromotionSKUGroup" UniqueName="PromotionSKUGroup" DataField="PromotionSKUGroup"   Visible="true"  EmptyDataText="" >
   </telerik:GridBoundColumn>
 
//code cs
 foreach (GridDataItem item in RG.Items)
                    {
                        
                        string sku = item["PromotionSKUGroup"].Text;
}
Telerik 2012 Q2: string sku = item["PromotionSKUGroup"].Text; get text ok
but 2013 do not get text mush set Visible="true" and Display="false"
why???????

Princy
Top achievements
Rank 2
 answered on 10 Oct 2013
0 answers
71 views
Hi,

We are using RadControls for ASP.NET AJAX Q2 2013 SP1.

we are using the radtextbox contol. In that, we need to insert the * during enter keypress. And, the cursor position should be next to the * character.

Please let us know on how to do this.
Selva Raman
Top achievements
Rank 1
 asked on 10 Oct 2013
1 answer
264 views

I upgrade to IE 10 today and was debugging my website that uses Telerik AJAX Controls (Version 2011.2.915.40) and am getting a

JavaScript runtime error: Unable to get property 'documentElement' of undefined or null reference


this happens when I click the arrow on the RadComboBox (also happens when I hover over a RadGrid).
I noticed that it happens only when I am debugging the site on IE10 (Even happens if I choose 'Start without debugging' option in VS 2010).
I found that the java script error is occurred inside dynamically loaded java script file “Telerik.Web.UI.Common.Core.js” at statement (var C=a.document.documentElement

) by HttpHandler “Telerik.Web.UI.WebResource.axd” for Telerik control.

If I host the site on IIS 7.5 and open it in IE 10, then I don't get the JavaScript error, however the RadComboBox does not drop down.
Plamen
Telerik team
 answered on 10 Oct 2013
6 answers
200 views
Hello!

Recently I had a problem with a button not working in IE10. (Last post in http://www.telerik.com/community/forums/aspnet-ajax/button/radbutton-onclick-event-won-t-fire.aspx )

Anyway, after upgrading to Q2 2013 the button worked, even in IE 10. However, now it won't validate the textboxes, meaning one can enter an empty invoice address.

Everything works fine in Chrome/FF/IE8 (didn't try IE9 yet) but as I said, in IE 10 it is possible to leave all textboxes empty and still get the order through. Any ideas?

I also noticed that your demo on http://demos.telerik.com/aspnet-ajax/input/examples/common/validation/defaultcs.aspx isn't working in IE10, i. e. the same problem I had before I updated to Q2.

The button is used in a shopping cart with multiviews and the problem occurs from step 2 to step 3, due to validation on that specific button.

<%@ Page Language="C#" AutoEventWireup="True" Inherits="Litho.MP.Web.Base.UI.ShoppingCart" Codebehind="ShoppingCart.aspx.cs" %>
<%@ Register Src="AddressControl.ascx" TagName="AddressControl" TagPrefix="uc2" %>
<%@ Register Src="ShoppingCartItemList.ascx" TagName="ShoppingCartItemList" TagPrefix="uc1" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" runat="Server">
 
<style type="text/css">
     
    .buttons
    {
        display:none;
    }
    .radButton
    {
        display:block;
    }
    
     
</style>
 
    <h1><asp:Literal ID="ltrShoppingCart" runat="server" Text="Varukorg"/></h1>
 
    <div id="content">
     
        <asp:MultiView ID="mvMain" runat="server">
             
            <asp:View ID="viewEmptyCart" runat="server">
                <asp:Label ID="lblShoppingCartIsEmpty" runat="server" Font-Bold="true" Text="Varukorgen är tom" />
            </asp:View>
             
            <asp:View ID="viewEditCart" runat="server">
                 
                <h2><asp:Literal ID="ltrStepOneOfFour" runat="server" Text="Steg 1 av 3" /></h2>
                <p><asp:Label ID="lblChooseAmountAndProceed" runat="server" Text="Välj det antal du vill ha av varje vara och klicka sedan på nästa för att fortsätta" /></p>
                 
                <asp:Panel ID="pnlHelpText" runat="server">
                    <div style="float:left;padding-bottom:15px;">
                        <asp:Label ID="lblHelpText" CssClass="lblHelpText" runat="server" />
                    </div>
                    <div style="clear:both;"></div>
                </asp:Panel>
                <br />
                 
                <uc1:ShoppingCartItemList id="ShoppingCartItemList1" Editable="true" OnShoppingCartItemDeleted="ShoppingCartItemList1_ShoppingCartItemDeleted" runat="server" />
                <br />
                <br />
                  
                <div style="clear:both;"></div>
                 
                <div style="float:left;width:300px;">
                     
                    <div style="float:left;">
                        <div class="buttons">
                            <asp:Button ID="btnClearShoppingCart" runat="server" CssClass="btn btnClearShoppingCart" Text="Töm varukorgen" OnClick="btnClearShoppingCart_Click" />
                        </div>
                        <div class="radButton">
                            <telerik:RadButton ID="btnClearShoppingCartRadbutton" Text="Töm varukorgen" runat="server" OnClick="btnClearShoppingCart_Click">
                                <Icon PrimaryIconCssClass="rbRemove" PrimaryIconLeft="4" PrimaryIconTop="4" />
                            </telerik:RadButton>   
                        </div>
                    </div>
                     
                    <div style="float:left;padding-left:5px;">
                        <asp:Panel ID="pnlContinueShopping" runat="server">
                            <div class="buttons">
                                <asp:Button ID="btnContinueShopping" runat="server" CssClass="btn btnContinueShopping" Text="Beställ mer" OnClick="btnContinueShopping_Click" />
                            </div>
                            <div class="radButton">
                                <telerik:RadButton ID="btnContinueShoppingRadbutton" Text="Beställ mer" runat="server" OnClick="btnContinueShopping_Click" />   
                            </div>
                        </asp:Panel>
                    </div>
                     
                    <div style="float:left;padding-left:5px;">
                        <div class="buttons">
                            <asp:Button ID="btnStep1Next2" runat="server" CssClass="btn btnStep1Next btnNext" Text="Nästa" OnClick="btnStep1Next_Click" />
                        </div>
                        <div class="radButton">
                            <telerik:RadButton ID="btnStep1Next2RadButton" Text="Nästa" runat="server" OnClick="btnStep1Next_Click">
                                <Icon SecondaryIconCssClass="rbNext" SecondaryIconRight="4" SecondaryIconTop="5" />
                            </telerik:RadButton>   
                        </div>
                    </div>
                     
                </div>
                 
            </asp:View>
             
            <asp:View ID="viewAddresses" runat="server">
                
                <h2><asp:Literal ID="ltrStepTwoOfFour" runat="server" Text="Steg 2 av 3" /></h2>
                <p><asp:Label ID="lblEnterAddressesAndContinue" runat="server" Text="Fyll i leveransadress och fakturaadress och klicka sedan på nästa för att fortsätta" /></p>
                 
                <br />
                 
                <table>
                 
                    <tr>
                        <td class="tdAddress">
                            <uc2:AddressControl id="ucDeliveryAddressControl" runat="server" />
                        </td>
                        <td class="tdAddress">
                            <uc2:AddressControl id="ucInvoiceAddressControl" runat="server" />
                        </td>
                    </tr>
                     
                    <asp:Panel ID="pnlCopyDeliveryAddress" runat="server">
                        <tr>
                            <td colspan="2">
                               <div class="buttons"><asp:Button ID="btnCopyDeliveryAddress" runat="server" Text="Kopiera address ->" CssClass="btn btnCopyDeliveryAddress" OnClick="btnCopyDeliveryAddress_Click" /></div>
                               <div class="radButton">
                                    <telerik:RadButton ID="btnCopyDeliveryAddressRadbutton" Text="Kopiera address ->"  runat="server" OnClick="btnCopyDeliveryAddress_Click" />  
                                </div>
                               <br />
                               <br />
                            </td>
                        </tr
                    </asp:Panel>
                     
                    <asp:Panel ID="pnlOrganisationNumber" runat="server">
                        <tr>
                            <td>
                                <asp:Label ID="lblOrganisationNumber" runat="server" />
                                <asp:RequiredFieldValidator ID="reqOrganisationNumber" runat="server" ControlToValidate="tbOrganisationNumber" ValidationGroup="vgAddress" Enabled="false"/>
                                <br />
                                <telerik:RadTextBox ID="tbOrganisationNumber" runat="server" CssClass="AddressTextBox" />
                                <br />
                            </td>
                        </tr>
                    </asp:Panel>
                     
                    <asp:Panel ID="pnlDocumentNumber" runat="server">
                        <tr>
                            <td>
                            <div style="margin-left:5px">
                                <asp:Label ID="lblDocumentNumber" runat="server" />
                                <asp:RequiredFieldValidator ID="reqDocumentNumber" runat="server" ControlToValidate="tbDocumentNumber" ValidationGroup="vgAddress" Enabled="false"/>
                                <br />
                                <telerik:RadTextBox ID="tbDocumentNumber" runat="server" CssClass="AddressTextBox" Width="200px" />
                                </div>
                                <br />
                            </td>
                        </tr>
                    </asp:Panel>
                     
                    <tr>
                        <td colspan="2">
                        <div style="margin-left:5px">
                            <asp:Label ID="lblMessage" runat="server" Text="Meddelande" /><br />
                            <telerik:RadTextBox ID="tbMessage" runat="server" CssClass="AddressTextBox" TextMode="MultiLine" Width="200px"/>
                            </div>
                            <br />
                        </td>
                    </tr>
                     
                </table>
                 
                <br />
                <div style="float:left;margin-left:6px;">
                <div class="buttons">
                    <asp:Button ID="btnStep2Prev2"  runat="server" CssClass="btn btnStep2Prev btnPrev" Text="Föregående" OnClick="btnStep2Prev_Click" />
                </div>
                <div class="radButton">
                    <telerik:RadButton ID="btnStep2Prev2RadButton" Text="Föregående" runat="server" OnClick="btnStep2Prev_Click">
                        <Icon PrimaryIconCssClass="rbPrevious" PrimaryIconLeft="4" PrimaryIconTop="5" />
                    </telerik:RadButton>   
                </div>
                </div>
                <div style="float:left;padding-left:5px;">
                <div class="buttons">
                    <asp:Button ID="btnStep2Next2" runat="server" ValidationGroup="vgAddress" CssClass="btn btnStep2Next btnNext" Text="Nästa" OnClick="btnStep2Next_Click" />
                </div>
                <div class="radButton">
                    <telerik:RadButton ID="btnStep2Next2RadButton" ValidationGroup="vgAddress" Text="Nästa" runat="server" OnClick="btnStep2Next_Click">
                        <Icon SecondaryIconCssClass="rbNext" SecondaryIconRight="4" SecondaryIconTop="5" />
                    </telerik:RadButton>   
                </div>
                </div>
            </asp:View>
             
            <asp:View ID="viewReviewAndOrder" runat="server">
                 
                <h2><asp:Literal ID="ltrStep3OfFour" runat="server" Text="Steg 3 av 3" /></h2>
                <p><asp:Label ID="lblReviewAndOrder" runat="server" Text="Kontrollera alla uppgifter och klicka sedan på beställ för att genomföra beställningen" /></p>
                 
                <br />
                 
                <table cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <uc1:ShoppingCartItemList id="ShoppingCartItemList2" Editable="false" runat="server" />
                            <br />
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table cellpadding="0" cellspacing="0">
                                <tr>
                                    <td style="vertical-align: top; padding-right: 20px;">
                                        <uc2:AddressControl id="ucDelivery2AddressControl" Mode="0" runat="server" />
                                    </td>
                                    <td style="vertical-align: top;">
                                        <uc2:AddressControl id="ucInvoice2AddressControl" Mode="0" runat="server" />
                                    </td>
                                </tr>
                            </table>
                            <br />
                        </td>
                    </tr>
                     
                    <asp:Panel ID="pnlOrganisationNumberReview" runat="server">
                        <tr>
                            <td>
                                <asp:Label ID="lblOrganisationNumberReviewHeading" runat="server" Font-Bold="true" Text="Organisationsnummer" /><br />
                                <asp:Label ID="lblOrganisationNumberReview" runat="server" />
                                <br />
                                <br />
                            </td>
                        </tr>
                    </asp:Panel>
                     
                    <asp:Panel ID="pnlDocumentNumberReview" runat="server">
                        <tr>
                            <td>
                                <asp:Label ID="lblDocumentNumberReviewHeading" runat="server" Font-Bold="true" Text="CDIID" /><br />
                                <asp:Label ID="lblDocumentNumberReview" runat="server" />
                                <br />
                                <br />
                            </td>
                        </tr>
                    </asp:Panel>
                     
                    <asp:Panel ID="pnlMessageReview" runat="server">
                        <tr>
                            <td>
                                <asp:Label ID="lblMessageReviewHeading" runat="server" Font-Bold="true" Text="Meddelande" /><br />
                                <asp:Label ID="lblMessageReview" runat="server" />
                                <br />
                                <br />
                            </td>
                        </tr
                    </asp:Panel>
                     
                    <asp:Panel ID="pnlExpressOrder" runat="server">
                        <tr>
                            <td>
                                <asp:CheckBox ID="cbExpressOrder" runat="server" Text="Expressbeställning" />
                                <br />
                                <br />
                            </td>
                        </tr>
                    </asp:Panel>
 
                </table>
 
                <br />
 
                <div class="buttons">
                    <asp:Button ID="btnStep3Prev2" runat="server" Text="Föregående" CssClass="btn btnStep3Prev btnPrev" OnClick="btnStep3Prev_Click" />
                </div>
                <div style="float:left;">
                    <div class="radButton">
                        <telerik:RadButton ID="btnStep3Prev2RadButton" Text="Föregående" runat="server" OnClick="btnStep3Prev_Click">
                            <Icon PrimaryIconCssClass="rbPrevious" PrimaryIconLeft="4" PrimaryIconTop="5" />
                        </telerik:RadButton>   
                    </div>
                </div>
                 
                <div class="buttons">
                    <asp:Button ID="btnStep3Order2" runat="server" Text="Beställ" CssClass="btn btnStep3Order btnOrder" OnClick="btnStep3Order_Click" />
                </div>
                <div style="float:left;padding-left:5px;">
                    <div class="radButton">
                        <telerik:RadButton ID="btnStep3Order2RadButton" Text="Beställ" runat="server" OnClick="btnStep3Order_Click" />
                    </div>
                </div>
            </asp:View>
             
            <asp:View ID="viewConfirmation" runat="server">
             
                <p><asp:Label ID="lblOrderConfirmation" runat="server" Text="Tack för din beställning!" /></p>
                 
            </asp:View>
             
            <asp:View ID="viewOrderError" runat="server">
             
                <p><asp:Label ID="lblOrderError" runat="server" Text="Beställningen misslyckades. Kontakta support@litho.se för hjälp." /></p>
                 
            </asp:View>
             
        </asp:MultiView>
     
    </div>
     
</asp:Content>

Regards,

Magnus


Magnus
Top achievements
Rank 1
 answered on 10 Oct 2013
1 answer
187 views
I have a table with 5,355,113 records. I want to display them in a grid. I have a test application similar
to this: Link

The description of the example says: "allows you to handle millions of records within a few milliseconds",
but I'm getting the error displayed in the attached image.

What am I doing wrong?. The example linked before should be able to handle 5 million records? or, should
I handle the paging in code behind?

This is my ASPX code (No code behind):

<
telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" />
 
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AutoGenerateColumns="False" PageSize="1"
    DataSourceID="LinqDataSource1">
    <PagerStyle Mode="NextPrevAndNumeric" />
     <MasterTableView TableLayout="Fixed">
        <Columns>
            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID">
            </telerik:GridBoundColumn>
        </Columns>
 
    </MasterTableView>
</telerik:RadGrid>
 
<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="WebApplication1.DAL.DataClassesDataContext" TableName="Cards" OrderBy="ID">
</asp:LinqDataSource>

Any help would be appreciated. Thanks
Angel Petrov
Telerik team
 answered on 10 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?