rad gridview

8 posts, 0 answers
  1. Troika
    Troika avatar
    101 posts
    Member since:
    Feb 2013

    Posted 20 Feb 2013 Link to this post

    http://www.telerik.com/registration-

    i'm using telerik gridview like here http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx but in that demo when filter data it shows a loding with blue background in my case it reloads my page everytime i filter it, maybe because i'm getting the data from different tables into the rad gridview?

    i have enabled ajax so why it reloads? is there a way to not refresh the page like that

    by the way how to activate pdf export?
    choose default id panel is empty , why? i'm using metro skin

    also how can i edit some fields only when we are at edit template i dont see the textboxes in designtime...

    also filter options are not getting translates nor filter when we set culture why?

  2. MasterChiefMasterChef
    MasterChiefMasterChef avatar
    152 posts
    Member since:
    Jan 2013

    Posted 20 Feb 2013 Link to this post

    Hi Troika,

    I'm unsure why the filter language is not getting translated along with your other text. Did you make sure to put your RadGrid inside of a RadAjaxPanel? It is an important part of making sure that there is an AJAX callback as opposed to a postback on the page.

    Hopefully this helps,
    Master Chief
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Troika
    Troika avatar
    101 posts
    Member since:
    Feb 2013

    Posted 21 Feb 2013 Link to this post

    here is the code in want when user clicks on filter in loads a loading panel like here when you search you see the ... http://demos.telerik.com/aspnet-ajax/grid/examples/programming/savinggridsettingsonperuserbasis/defaultcs.aspx
    also i have edit mode enabled but in edit templates instead of textboxes i want labels , and leave the checkmark but when i enter edit template cant find them to replace

    my code:
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
                </asp:ScriptReference>
            </Scripts>
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager runat="server">
        </telerik:RadAjaxManager>
        <br />
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server" Skin="Metro" AnimationDuration="5000" HorizontalAlign="Center" InitialDelayTime="5000">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" CellSpacing="0" DataSourceID="sql_ds_listarUsers" GridLines="None" Skin="Metro">
            <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                <Selecting AllowRowSelect="True" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
    <MasterTableView AutoGenerateColumns="False" DataSourceID="sql_ds_listarUsers">
    <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="UserName" FilterControlAltText="Filter UserName column" HeaderText="UserName" SortExpression="UserName" UniqueName="UserName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="RoleName" FilterControlAltText="Filter RoleName column" HeaderText="RoleName" SortExpression="RoleName" UniqueName="RoleName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="LastActivityDate" DataType="System.DateTime" FilterControlAltText="Filter LastActivityDate column" HeaderText="LastActivityDate" SortExpression="LastActivityDate" UniqueName="LastActivityDate">
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn DataField="IsApproved" DataType="System.Boolean" FilterControlAltText="Filter IsApproved column" HeaderText="IsApproved" SortExpression="IsApproved" UniqueName="IsApproved">
            </telerik:GridCheckBoxColumn>
            <telerik:GridCheckBoxColumn DataField="IsLockedOut" DataType="System.Boolean" FilterControlAltText="Filter IsLockedOut column" HeaderText="IsLockedOut" SortExpression="IsLockedOut" UniqueName="IsLockedOut">
            </telerik:GridCheckBoxColumn>
            <telerik:GridBoundColumn DataField="CreateDate" DataType="System.DateTime" FilterControlAltText="Filter CreateDate column" HeaderText="CreateDate" SortExpression="CreateDate" UniqueName="CreateDate">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="LastLoginDate" DataType="System.DateTime" FilterControlAltText="Filter LastLoginDate column" HeaderText="LastLoginDate" SortExpression="LastLoginDate" UniqueName="LastLoginDate">
            </telerik:GridBoundColumn>
        </Columns>
     
    <EditFormSettings>
    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
    </EditFormSettings>
    </MasterTableView>
     
    <FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
  5. Eyup
    Admin
    Eyup avatar
    3015 posts

    Posted 25 Feb 2013 Link to this post

    Hi Troika,

    You can use RadAjaxLoadingPanel together with RadAjaxManager or RadAjaxPanel and fully customize its appearance to achieve the desired behavior:
     LoadingPanel Demo
     LoadingPanel OverView

    You can also check out various demos to get a practical idea of its implementation.

    As for altering the edit mode controls, you can use ItemCreated or ItemDataBound server events as to access the generated controls:
    ( Section Accessing controls in edit/insert mode )
    http://www.telerik.com/help/aspnet-ajax/grid-accessing-cells-and-rows.html

    This example demonstrates how to distinguish edit and insert forms:
    http://www.telerik.com/help/aspnet-ajax/grid-distinguish-edit-insert-mode-on-itemcreated-itemdatabound.html

    You can get general information about the differences between the two events in this article:
    http://www.telerik.com/help/aspnet-ajax/listview-differences-between-itemcreated-itemdatabound-events.html

    For an example of PDF exporting, please refer to this demo and its related topic:
    http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/pdfexport/defaultcs.aspx

    In order to localize the grid, you will need to use a resource file .resx to apply a global localization to your RadGrid:
     http://www.telerik.com/help/aspnet-ajax/grid-localization-global-resources.html
    You could use one of the files provided in the following code library:
    http://www.telerik.com/community/code-library/aspnet-ajax/localization/global-resources-for-radgrid.aspx

    And here is an actual example:
    http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/localization/defaultcs.aspx

    Hope these guides will help.

    Regards,
    Eyup
    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.
  6. Troika
    Troika avatar
    101 posts
    Member since:
    Feb 2013

    Posted 02 Mar 2013 Link to this post

    but howv to use it the loading panel when we change gridview page:

    <%@ Page Title="" Language="C#" MasterPageFile="~/admin_template/MP/Admin.Master" AutoEventWireup="true" CodeBehind="GerirLogin.aspx.cs" Inherits="NovaOnda2013.admin_template.GerirLogin" %>
    <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderColEsq" runat="server">
    </asp:Content>
    <asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderColDir" runat="server">
    </asp:Content>
    <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
                </asp:ScriptReference>
            </Scripts>
        </telerik:RadScriptManager>
        <br />
        <br />
     
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" EnableHistory="True" UpdatePanelsRenderMode="Inline">
            <AjaxSettings>
                
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
     
     
     
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" CellSpacing="0" GridLines="None" OnDataBinding="RadGrid1_DataBinding" Skin="Metro">
            <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                <Selecting AllowRowSelect="True" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
    <MasterTableView>
    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
     
    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
    </RowIndicatorColumn>
     
    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
    </ExpandCollapseColumn>
     
    <EditFormSettings>
    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
    </EditFormSettings>
    </MasterTableView>
     
    <FilterMenu EnableImageSprites="False"></FilterMenu>
    </telerik:RadGrid>
        <br />
        <br />
    </asp:Content>


    i put this code but it dont display the loading like here in the second grid: http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx

    i'm doing this on codebehind:
    public partial class GerirLogin : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                 
                RadGrid1.DataBind();
                
            }
     
           
     
            protected void RadGrid1_DataBinding(object sender, EventArgs e)
            {
                RadGrid1.DataSource= Membership.GetAllUsers();
     
            }
     
            
        }


    also if you could do this working exemple with loading panel  pdf export like here http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/pdfexport/defaultcs.aspx
  7. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 Mar 2013 Link to this post

    Hi,

    Please make sure that you are using advanced data binding using its NeedDataSource event when using features in grid like paging, sorting etc. Check the following help documentation which explains more about this.
    Advanced Data-binding (using NeedDataSource event)

    Thanks,
    Shinu
  8. Troika
    Troika avatar
    101 posts
    Member since:
    Feb 2013

    Posted 04 Mar 2013 Link to this post

    now its other gridview with selecting feature on click but this is reloading my page when i select a item and page gets to top.... so i want to select it but do not refresh like that here is the code:
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" CellSpacing="0" GridLines="None" Skin="Metro" PageSize="5" DataSourceID="SqlDataSource1">
            <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnablePostBackOnRowClick="True" Selecting-AllowRowSelect="True">
                <Selecting AllowRowSelect="True" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="SqlDataSource1">
    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
     
    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
    </RowIndicatorColumn>
     
    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
    </ExpandCollapseColumn>
     
        <Columns>
            <telerik:GridBoundColumn DataField="nome" FilterControlAltText="Filter nome column" HeaderText="nome" SortExpression="nome" UniqueName="nome">
    <ColumnValidationSettings>
    <ModelErrorMessage Text=""></ModelErrorMessage>
    </ColumnValidationSettings>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="id" FilterControlAltText="Filter id column" HeaderText="id" SortExpression="id" UniqueName="id" DataType="System.Int32" ReadOnly="True">
    <ColumnValidationSettings>
    <ModelErrorMessage Text=""></ModelErrorMessage>
    </ColumnValidationSettings>
            </telerik:GridBoundColumn>
        </Columns>
     
    <EditFormSettings>
    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
    </EditFormSettings>
     
    <PagerStyle PageSizeControlType="RadComboBox" AlwaysVisible="True"></PagerStyle>
    </MasterTableView>
     
    <PagerStyle PageSizeControlType="RadComboBox" AlwaysVisible="True"></PagerStyle>
     
    <FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
  9. Eyup
    Admin
    Eyup avatar
    3015 posts

    Posted 07 Mar 2013 Link to this post

    Hello Troika,

    I suppose you have a DefaultButton set to your form. In that case, please check out the following thread for using the DefaultFocus property:
    http://www.telerik.com/community/forums/aspnet-ajax/ajax/usage-of-defaultbutton-logic-is-resulting-in-moving-to-the-top-of-the-page-on-other-control-clicks.aspx

    Hope this helps.

    Greetings,
    Eyup
    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017