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

HeaderText is not working in a grid inside RadWindow

5 Answers 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
PAOLO
Top achievements
Rank 1
PAOLO asked on 01 Jul 2013, 12:40 PM
Good day.
I need to change, in the Page_Load event, the grid header.
I'm using the code grdArticoli.MasterTableView.GetColumn("Codice").HeaderText = 'SOME TEXT' but nothing happen if the grid is in a RadWindow control. The same line of code is working fine if the grid is not in a RadWindow.
Another element: after some work in the RadWindow and after another postback the header text is changed !
What's wrong ?

5 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 01 Jul 2013, 12:52 PM
Hello,

Can you please with either Page_PreRender or RadGrid_PreRender event?

Thanks,
Jayesh Goyani
0
PAOLO
Top achievements
Rank 1
answered on 01 Jul 2013, 01:12 PM
Hi.
I've try to change the headertext in the Page_Prerender but nothing happen. For be more clear:

1. in the Page_Load i have a method that translate every control in another language
2. all the controls are translated but not the grid headers
3. after the press of a button that open another window (radopen) over the last one, the Page_Load is called another times (and the translation routine too).
4. now the grid columns are translated

0
Eyup
Telerik team
answered on 04 Jul 2013, 10:42 AM
Hi Paolo,

I have prepared a sample RadGrid web site to test the described behavior. Can you please run the attached application and instruct us the exact steps to reproduce the issue?

Regards,
Eyup
Telerik
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 the blog feed now.
0
PAOLO
Top achievements
Rank 1
answered on 04 Jul 2013, 12:00 PM
Hi Eyup.
I have reproduced the problem in a single page website.
If you run the page, the Page_Load is fired but the columns header are not changed.
If you press the button btnNuovoArticolo in the third tab, the Page_load is fired another times and now the columns are translated !

THIS IS THE CODE BEHIND
=======================

public partial class Default : System.Web.UI.Page 
{
  public struct ArticoloRichiestaEntrata
  {
    public string   Codice         { get; set; } 
    public string   Descrizione    { get; set; } 
    public string   UnitaMisura    { get; set; } 
    public decimal  Quantita       { get; set; } 
    public string   Lotto          { get; set; } 
    public DateTime DataScadenza   { get; set; } 
    public DateTime DataProduzione { get; set; } 
    public string   Note           { get; set; } 
  }

  List<ArticoloRichiestaEntrata> ArticoliRichiestaEntrata = new List<ArticoloRichiestaEntrata>();

    protected void Page_Load(object sender, EventArgs e)
    {
      grdArticoli.DataSource = ArticoliRichiestaEntrata;
      grdArticoli.DataBind();

      grdArticoli.MasterTableView.GetColumn("Codice").HeaderText                            = "COL 1";
      grdArticoli.MasterTableView.GetColumn("Descrizione").HeaderText                       = "COL 2";
      grdArticoli.MasterTableView.GetColumn("UnitaMisura").HeaderText                       = "COL 3";
      grdArticoli.MasterTableView.GetColumn("Quantita").HeaderText                          = "COL 4";
    }
}

AND THIS IS THE ASPX
=======================

<%@ 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">
<script type="text/javascript">
//Put your JavaScript code here.
    </script>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<div>

    <telerik:RadScriptManager ID="RadScriptManager2" runat="server">
   <Scripts>
     <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>

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Office2010Blue">
    </telerik:RadAjaxLoadingPanel>

    <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
      <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnRicercaProvenienzaNomeInizia">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="grdRicercaMittenteDestinatario" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
          </UpdatedControls>
        </telerik:AjaxSetting>

        <telerik:AjaxSetting AjaxControlID="btnRicercaProvenienzaNomeContiene">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="grdRicercaMittenteDestinatario" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
          </UpdatedControls>
        </telerik:AjaxSetting>

        <telerik:AjaxSetting AjaxControlID="grdRicercaMittenteDestinatario">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="tboxProvenienzaRagioneSociale" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxProvenienzaIndirizzo" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxProvenienzaCap" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxProvenienzaLocalita" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxProvenienzaProvincia" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="cboProvenienzaNazione" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxMittenteRagioneSociale" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxMittenteIndirizzo" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxMittenteCap" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxMittenteLocalita" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxMittenteProvincia" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="cboMittenteNazione" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
          </UpdatedControls>
        </telerik:AjaxSetting>
 
        <telerik:AjaxSetting AjaxControlID="grdRicercaMittenteDestinatario">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="RadAjaxPanelMittente" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
          </UpdatedControls>
        </telerik:AjaxSetting>

        <telerik:AjaxSetting AjaxControlID="btnDataEntryArticoloRiporta">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="grdArticoli" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
          </UpdatedControls>
        </telerik:AjaxSetting>

        <telerik:AjaxSetting AjaxControlID="btnRicercaArticoloInizia">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="grdRicercaArticolo" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
          </UpdatedControls>
        </telerik:AjaxSetting>

        <telerik:AjaxSetting AjaxControlID="btnRicercaArticoloContiene">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="grdRicercaArticolo" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
          </UpdatedControls>
        </telerik:AjaxSetting>

        <telerik:AjaxSetting AjaxControlID="grdRicercaArticolo">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloCodice" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="lblOutArticoloDescrizione" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="cboArticoloUnitaMisura" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
          </UpdatedControls>
        </telerik:AjaxSetting>

        <telerik:AjaxSetting AjaxControlID="grdArticoli">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloCodice" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="lblOutArticoloDescrizione" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="cboArticoloUnitaMisura" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloQuantita" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloLotto" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloSscc" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloDataProduzione" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloDataScadenza" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloNote" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="cboArticoloStato" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
          </UpdatedControls>
        </telerik:AjaxSetting>

        <telerik:AjaxSetting AjaxControlID="btnNuovoArticolo">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloCodice" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="lblOutArticoloDescrizione" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="cboArticoloUnitaMisura" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloQuantita" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloLotto" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloDataProduzione" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloDataScadenza" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="tboxArticoloNote" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
          </UpdatedControls>
        </telerik:AjaxSetting>

        <telerik:AjaxSetting AjaxControlID="btnRiportaArticolo">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="lblOutArticoloDescrizione" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
            <telerik:AjaxUpdatedControl ControlID="cboArticoloUnitaMisura" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
          </UpdatedControls>
        </telerik:AjaxSetting>

        <telerik:AjaxSetting AjaxControlID="btnMemorizza">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="TabCtlDataEntry" LoadingPanelID="RadAjaxLoadingPanel1">
            </telerik:AjaxUpdatedControl>
          </UpdatedControls>
        </telerik:AjaxSetting>

      </AjaxSettings>
    </telerik:RadAjaxManager>

    <asp:Panel ID="pnlErrore" runat="server" Visible="false" ClientIDMode="Static">
      <div style="width:60%; height:50px; height:100px; margin-top:30%;text-align:center;">
        <asp:Label ID="lblErrore" runat="server" Text="Label"></asp:Label>
      </div>
    </asp:Panel>

    <asp:HiddenField ID="HiddenAnno" runat="server" />
    <asp:HiddenField ID="HiddenFiliale" runat="server" />
    <asp:HiddenField ID="HiddenNumero" runat="server" />
    <asp:HiddenField ID="HiddenTipoRicercaMittentiDestinatari" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="HiddenAzioneDataEntry" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="HiddenRigaArticoloModifica" runat="server" ClientIDMode="Static" />
    
    <!-- Tab contenuto nel Form -->
    <div style="padding-top:4px;overflow:hidden;">
      <telerik:RadTabStrip ID="TabStrip" runat="server" Skin="Office2010Blue" MultiPageID="TabCtlDataEntry" SelectedIndex="0" Width="100%">
        <Tabs>
          <telerik:RadTab runat="server" Text="Generale" Selected="True">
          </telerik:RadTab>
          <telerik:RadTab runat="server" Text="Mittente">
          </telerik:RadTab>
          <telerik:RadTab runat="server" Text="Articoli">
          </telerik:RadTab>
        </Tabs>
      </telerik:RadTabStrip>

      <!-- Pannelli -->
      <telerik:RadMultiPage ID="TabCtlDataEntry" runat="server" SelectedIndex="0" CssClass="multiPage" Width="100%">
  
        <!-- Generale -->
        <telerik:RadPageView ID="RadPageGenerale" runat="server">
          
          <div style="width:100%;height:100%;background-color:white">
            <div style="margin-left:8px">

            </div>
          </div> 
         
        </telerik:RadPageView>
  
        <!-- Mittente -->  
        <telerik:RadPageView ID="RadPageMittente" runat="server">
          <div style="width:100%;height:100%;background-color:white">
            <div style="height:140px"></div>
            <div style="margin-left:8px">                 
            </div>
          </div>
        </telerik:RadPageView>
  
        <!-- Aricoli -->  
        <telerik:RadPageView ID="RadPageArticoli" runat="server">
          <div style="margin:4px">
            <div style="height:8px;background-color:white""></div>
            <asp:Button ID="btnNuovoArticolo" runat="server" text="Nuovo articolo" Width="100px" Height="28px" Font-Names="Verdana" Font-Size="8pt" CssClass="Bottone"/>
            <div style="height:8px"></div>

            <telerik:RadGrid ID="grdArticoli" runat="server" AllowPaging="false" PagerStyle-AlwaysVisible="true" Skin="Office2010Blue" Width="100%" Height="424px" Style="border: 0;outline: none">
              <ClientSettings AllowColumnsReorder="false">
                <Selecting AllowRowSelect="false" UseClientSelectColumnOnly="True" />
                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                <Resizing AllowColumnResize="false" /> 
              </ClientSettings>
              <MasterTableView AutoGenerateColumns="false" NoDetailRecordsText="" NoMasterRecordsText="" ShowHeadersWhenNoRecords="true">
                <CommandItemSettings ExportToPdfText=""/>
                <RowIndicatorColumn FilterControlAltText="" Visible="True">
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="" Visible="True">
                </ExpandCollapseColumn>
                <Columns>              
                  <telerik:GridTemplateColumn HeaderText="" HeaderTooltip="Modifica" UniqueName="Modifica" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="24px">
                    <ItemTemplate>            
                      <asp:ImageButton ID="imgModifica" ImageUrl="~/Immagini/Modifica.ico" runat="server" ToolTip="Modifica" CommandName="MODIFICA" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                  </telerik:GridTemplateColumn>
                  <telerik:GridTemplateColumn HeaderText="" HeaderTooltip="Elimina" UniqueName="Elimina" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="24px">
                    <ItemTemplate>                        
                      <asp:ImageButton ID="imgElimina" ImageUrl="~/Immagini/Elimina.ico" runat="server" ToolTip="Elimina" CommandName="ELIMINA" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                  </telerik:GridTemplateColumn>
                  <telerik:GridBoundColumn DataField="Codice" HeaderText="Codice Articolo" HeaderStyle-Wrap="false" ItemStyle-Wrap="false">
                  </telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="Descrizione" HeaderText="Descrizione Articolo" HeaderStyle-Wrap="false" ItemStyle-Wrap="false">
                  </telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="UnitaMisura" HeaderText="Um" HeaderStyle-Wrap="false" ItemStyle-Wrap="false" HeaderStyle-Width="30px">
                  </telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="Quantita" HeaderText="Quantita" HeaderStyle-Wrap="false" ItemStyle-Wrap="false" HeaderStyle-Width="80px" ItemStyle-HorizontalAlign="Right">
                  </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings>
                  <EditColumn FilterControlAltText="">
                  </EditColumn>
                </EditFormSettings>
                <PagerStyle AlwaysVisible="True" PageSizeControlType="RadComboBox"/>
              </MasterTableView>
              <PagerStyle AlwaysVisible="True" PageSizeControlType="RadComboBox"/>
              <FilterMenu EnableImageSprites="False">
              </FilterMenu>
            </telerik:RadGrid>
          </div> 
        </telerik:RadPageView>
      </telerik:RadMultiPage>
    </div>    

    <div class="WndFooter">
      <table style="width: 100%; height: 100%;">
        <tr>
          <td style="text-align:right;">        
            <asp:Button ID="btnMemorizza" runat="server" CssClass="Bottone" Width="80px" Height="28px" Font-Names="Verdana" Font-Size="8pt" Text="Memorizza"/>
          </td>
          <td style="text-align:left;">
            <asp:Button ID="btnFine" runat="server" CssClass="Bottone" Width="80px" Height="28px" Font-Names="Verdana" Font-Size="8pt" Text="Fine"/>       
          </td>
        </tr>
      </table>
    </div>

    <!-- Finestre -->
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true" Skin="Office2010Blue">
      <Windows>

        <telerik:RadWindow ID="RadWindowRicercaMittenteDestinatario" runat="server" Modal="true" ShowContentDuringLoad="false" VisibleStatusbar="false" Behaviors="Move, Close" KeepInScreenBounds="false" CenterIfModal="true" Width="820px" Height="500px">
          <ContentTemplate>
            <div style="height:12px"></div>

            <div class="CampiDivLabelCampo" style="width:300px;margin-left:5px;">
              <asp:Label runat="server" id="lblRicercaMittenteDestinatarioInizia" class="CampiLabel" Text="Nome inizia" Width="92px"></asp:Label>
              <div id="divCampo" class="CampiDivCampo" style="padding-left:96px;width:234px">
                <telerik:RadTextBox ID="tboxRicercaMittenteDestinatarioInizia" runat="server" Height="22px" Width="200px" ClientIDMode="Static"></telerik:RadTextBox>
                <span id="Span1" runat="server" class="ImgInText">
                  <asp:ImageButton ID="btnRicercaProvenienzaNomeInizia" runat="server" ImageUrl="~/Immagini/Ricerca.ico" ImageAlign="Middle" Width="16px" Height="16px"/>
                </span>
              </div>
            </div>

            <div class="CampiDivLabelCampo" style="width:300px;margin-left:5px;">
              <asp:Label runat="server" id="lblRicercaMittenteDestinatarioContiene" class="CampiLabel" Text="Nome contiene" Width="92px"></asp:Label>
              <div id="div1" class="CampiDivCampo" style="padding-left:96px;width:234px">
                <telerik:RadTextBox ID="tboxRicercaMittenteDestinatarioContiene" runat="server" Height="22px" Width="200px" ClientIDMode="Static"></telerik:RadTextBox>
                <span id="Span2" runat="server" class="ImgInText">
                  <asp:ImageButton ID="btnRicercaProvenienzaNomeContiene" runat="server" ImageUrl="~/Immagini/Ricerca.ico" ImageAlign="Middle" Width="16px" Height="16px"/>
                </span>
              </div>
            </div>            

            <div style="height:12px"></div>

            <telerik:RadGrid ID="grdRicercaMittenteDestinatario" runat="server" AllowPaging="true" PageSize="10" PagerStyle-AlwaysVisible="true" Skin="Office2010Blue" Width="100%" Height="378px" Style="border: 0;outline: none">
              <ClientSettings>
                <Selecting AllowRowSelect="false" UseClientSelectColumnOnly="True" />
                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
              </ClientSettings>
              <MasterTableView AutoGenerateColumns="false" NoDetailRecordsText="" NoMasterRecordsText="" ShowHeadersWhenNoRecords="true">
                <CommandItemSettings ExportToPdfText="Export to PDF"/>
                <RowIndicatorColumn FilterControlAltText="" Visible="True"></RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="" Visible="True"></ExpandCollapseColumn>
                <Columns>              
                  <telerik:GridTemplateColumn HeaderText="" HeaderTooltip="Riporta" UniqueName="Elimina" HeaderStyle-Width="28px" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>            
                      <asp:ImageButton ID="imgRiporta" ImageUrl="~/Immagini/Riporta.ico" runat="server" ToolTip="Riporta" CommandName="RIPORTA"/>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="24px"></ItemStyle>
                  </telerik:GridTemplateColumn>
                  <telerik:GridBoundColumn DataField="RagioneSociale" HeaderText="Ragione sociale" HeaderStyle-Wrap="false" ItemStyle-Wrap="false">
                  </telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="Indirizzo" HeaderText="Indirizzo" HeaderStyle-Wrap="false" ItemStyle-Wrap="false">
                  </telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="Cap" HeaderText="Cap" HeaderStyle-Wrap="false" ItemStyle-Wrap="false">
                  </telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="Localita" HeaderText="Località" HeaderStyle-Wrap="false" ItemStyle-Wrap="false">
                  </telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="Provincia" HeaderText="Pv" HeaderStyle-Wrap="false" ItemStyle-Wrap="false">
                  </telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="Nazione" HeaderText="Nz" HeaderStyle-Wrap="false" ItemStyle-Wrap="false">
                  </telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="Codice" HeaderText="Codice" HeaderStyle-Wrap="false" ItemStyle-Wrap="false">
                  </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings>
                  <EditColumn FilterControlAltText="">
                  </EditColumn>
                </EditFormSettings>
                <PagerStyle AlwaysVisible="True" PageSizeControlType="RadComboBox" />
              </MasterTableView>
              <PagerStyle AlwaysVisible="True" PageSizeControlType="RadComboBox" />
              <FilterMenu EnableImageSprites="False">
              </FilterMenu>
            </telerik:RadGrid>      
          </ContentTemplate>
        </telerik:RadWindow>

        <telerik:RadWindow ID="RadWindowDataEntryArticolo" runat="server" Modal="true" ShowContentDuringLoad="false" VisibleStatusbar="false" Behaviors="Move, Close" KeepInScreenBounds="false" CenterIfModal="true" Width="820px" Height="440px">
          <ContentTemplate>
            <div>
              <table style="width:100%;height:350px">
                <tr>
                  <td style="text-align:left;vertical-align:top;padding-left:4px">

                  </td>
                </tr>
              </table>
            </div>
            <div class="WndFooter2">
              <table style="width: 100%; height: 100%;">
                <tr>
                  <td style="text-align:center">
                    <asp:Button ID="btnDataEntryArticoloRiporta" runat="server" CssClass="Bottone" Width="80px" Height="28px" Font-Names="Verdana" Font-Size="8pt" Text="Riporta"/>
                    <asp:Button ID="btnDataEntryArticoloFine"    runat="server" CssClass="Bottone" Width="80px" Height="28px" Font-Names="Verdana" Font-Size="8pt" Text="Fine"/>
                  </td>
                </tr>
              </table>
            </div>  
          </ContentTemplate>
        </telerik:RadWindow>

        <telerik:RadWindow ID="RadWindowRicercaArticoli" runat="server" Modal="true" ShowContentDuringLoad="false" VisibleStatusbar="false" Behaviors="Move, Close" KeepInScreenBounds="false" CenterIfModal="true" Width="820px" Height="500px">
          <ContentTemplate>
            <div style="height:12px"></div>

            <div class="CampiDivLabelCampo" style="width:300px;margin-left:5px;">
              <asp:Label runat="server" id="lblRicercaArticoloDescrizioneInizia" class="CampiLabel" Text="Descrizione inizia" Width="120px"></asp:Label>
              <div id="div2" class="CampiDivCampo" style="padding-left:124px;width:234px">
                <telerik:RadTextBox ID="tboxRicercaArticoloInizia" runat="server" Height="22px" Width="200px" ClientIDMode="Static"></telerik:RadTextBox>
                <span id="Span3" runat="server" class="ImgInText">
                  <asp:ImageButton ID="btnRicercaArticoloInizia" runat="server" ImageUrl="~/Immagini/Ricerca.ico" ImageAlign="Middle" Width="16px" Height="16px"/>
                </span>
              </div>
            </div>

            <div class="CampiDivLabelCampo" style="width:300px;margin-left:5px;">
              <asp:Label runat="server" id="lblRicercaArticoloDescrizioneContiene" class="CampiLabel" Text="Descrizione contiene" Width="120px"></asp:Label>
              <div id="div3" class="CampiDivCampo" style="padding-left:124px;width:234px">
                <telerik:RadTextBox ID="tboxRicercaArticoloContiene" runat="server" Height="22px" Width="200px" ClientIDMode="Static"></telerik:RadTextBox>
                <span id="Span4" runat="server" class="ImgInText">
                  <asp:ImageButton ID="btnRicercaArticoloContiene" runat="server" ImageUrl="~/Immagini/Ricerca.ico" ImageAlign="Middle" Width="16px" Height="16px"/>
                </span>
              </div>
            </div>            

            <div style="height:12px"></div>

            <telerik:RadGrid ID="grdRicercaArticolo" runat="server" PageSize="10" AllowPaging="true" PagerStyle-AlwaysVisible="true" Skin="Office2010Blue" Width="100%" Height="378px" Style="border: 0;outline: none">
              <ClientSettings AllowColumnsReorder="false">
                <Selecting AllowRowSelect="false" UseClientSelectColumnOnly="True" />
                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                <Resizing AllowColumnResize="true" /> 
              </ClientSettings>
              <MasterTableView AutoGenerateColumns="false" NoDetailRecordsText="" NoMasterRecordsText="" ShowHeadersWhenNoRecords="true">
                <CommandItemSettings ExportToPdfText="" />
                <RowIndicatorColumn FilterControlAltText="" Visible="True"></RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="" Visible="True"></ExpandCollapseColumn>
                <Columns>              
                  <telerik:GridTemplateColumn HeaderText="" HeaderTooltip="Riporta" UniqueName="Elimina" HeaderStyle-Width="28px" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>            
                      <asp:ImageButton ID="imgRiporta" ImageUrl="~/Immagini/Riporta.ico" runat="server" ToolTip="Riporta" CommandName="RIPORTA" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="24px"></ItemStyle>
                  </telerik:GridTemplateColumn>
                  <telerik:GridBoundColumn DataField="Codice" HeaderText="Codice" HeaderStyle-Wrap="false" ItemStyle-Wrap="false">
                  </telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="Descrizione" HeaderText="Descrizione" HeaderStyle-Wrap="false" ItemStyle-Wrap="false">
                  </telerik:GridBoundColumn>                 
                </Columns>
                <EditFormSettings>
                  <EditColumn FilterControlAltText="">
                  </EditColumn>
                </EditFormSettings>
                <PagerStyle AlwaysVisible="True" PageSizeControlType="RadComboBox" />
              </MasterTableView>
              <PagerStyle AlwaysVisible="True" PageSizeControlType="RadComboBox" />
              <FilterMenu EnableImageSprites="False">
              </FilterMenu>
            </telerik:RadGrid>   
          </ContentTemplate>
        </telerik:RadWindow>
      </Windows>
    </telerik:RadWindowManager>



</div>
</form>
</body>
</html>


0
Eyup
Telerik team
answered on 09 Jul 2013, 10:07 AM
Hello Paolo,

Please note that using DataBind() is not recommended. Performing complex grid operations such as Inserting, Deleting, Updating, Hierarchy relations, Grouping, Paging, Sorting, Filtering, etc. require accommodating appropriate database operations.  Therefore, we suggest you to avoid Simple Databinding and strongly recommend the use of more advanced databinding methods, which automatically handle the aforementioned functions:
Declarative DataSource
Advanced Data Binding

Hope this helps. Please make the suggested modification and let us know about the result.

Furthermore, in a scenario which requires more complicated Ajax settings, it may be a better idea to use RadAjaxPanel instead of RadAjaxManager:
 http://www.telerik.com/help/aspnet-ajax/ajax-ajaxpanel.html

Regards,
Eyup
Telerik
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 the blog feed now.
Tags
Grid
Asked by
PAOLO
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
PAOLO
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or