Radgrid pager mess on rebind

5 posts, 0 answers
  1. Lukrs
    Lukrs avatar
    39 posts
    Member since:
    Sep 2012

    Posted 16 Apr 2009 Link to this post

    Hi,

    I have a strange problem. When I Rebind() the grid in the preRender event, the pager looks like a textBox and at the end there is a word "select".

    It looks like the styles (CSS) of the embeded RadComboBox are somehow lost on the rebind.

    Is this a bug?


    LP, Lukrs



  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Apr 2009 Link to this post

    Hi Lukrs,

    Which version of the Grid are you using and which PagerStyle-Mode have you set for the Grid? Sending your aspx code will be more nice.

    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Lukrs
    Lukrs avatar
    39 posts
    Member since:
    Sep 2012

    Posted 17 Apr 2009 Link to this post

    Hi,

    I'm using 2009 Q1 release developer edition. (the last one)

    Here is my code:

    <telerik:RadGrid ID="skupineGrid" runat="server" AllowAutomaticDeletes="True" EnableAJAX="true"
              AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
              AllowMultiRowSelection="True" AllowPaging="True"
              PagerStyle-ShowPagerText="True" AllowSorting="True" SortingSettings-SortToolTip="Klikni tukaj za sortiranje"
              AutoGenerateColumns="False" AutoGenerateDeleteColumn="False"   
              AutoGenerateEditColumn="False" DataSourceID="skupineSource" GridLines="None"
              Skin="Vista"
              OnItemCommand="skupineGrid_ItemCommand"
              OnItemCreated="skupineGrid_ItemCreated"
              onitemdatabound="skupineGrid_ItemDataBound"
              oninsertcommand="skupineGrid_InsertCommand">        
              <PagerStyle Mode="NextPrevAndNumeric" ShowPagerText="True"
                  PagerTextFormat="Stran: {4} &amp;nbsp;Prikazujem stran {0} od {1}, zapisov {2} do {3} od {5}."
                  NextPagesToolTip="Naslednje strani" NextPageToolTip="Naslednja stran"
                  PrevPagesToolTip="Prejšnje strani" PrevPageToolTip="Prejšnja stran"
                  FirstPageToolTip="Prva stran" LastPageToolTip="Zadnja stran" />        
               <ValidationSettings EnableValidation="false" />     
                <MasterTableView DataSourceID="skupineSource" DataKeyNames="ID,checked" ClientDataKeyNames="ID"
                  TableLayout="Auto" EditMode="InPlace" CommandItemDisplay="Top"
                  CommandItemSettings-AddNewRecordText="Dodaj skupino"
                  CommandItemSettings-RefreshText="Osveži" Name="Skupine"
                  NoDetailRecordsText="V bazi ni zapisov o naslovnikih."
                  NoMasterRecordsText="V bazi ni zapisov o skupinah.">
                    <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>          
    <CommandItemSettings AddNewRecordText="Dodaj skupino" RefreshText="Osveži"></CommandItemSettings>
        <Columns>
            <telerik:GridBoundColumn DataField="skupina" HeaderText="Skupina" HeaderButtonType="TextButton"
                UniqueName="skupina">
            </telerik:GridBoundColumn>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Uredi"
                UniqueName="EditCommandColumn">
                <HeaderStyle HorizontalAlign="Center" Width="50px"></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" />
            </telerik:GridEditCommandColumn>
            <telerik:GridButtonColumn ConfirmText="Ali želite res izbrisati skupino?\n\nIzbrisali boste tudi vsa planirana SMS sporočila namenjena tej skupini, tako kot tudi vezave naslovnikov na to skupino." ButtonType="ImageButton" HeaderText="Izbriši"
                        CommandName="Delete" UniqueName="DeleteColumn">
                        <HeaderStyle HorizontalAlign="Center" Width="50px"></HeaderStyle>
                         <ItemStyle HorizontalAlign="Center" />
             </telerik:GridButtonColumn>  
             <telerik:GridTemplateColumn HeaderText="Pošlji SMS" UniqueName="SMS">
             <ItemTemplate>
                 <asp:CheckBox ID="smscheck" runat="server" Enabled="true" />
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Center" Width="80px"></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" />
             </telerik:GridTemplateColumn>
       </Columns>
    <DetailTables>
                        <telerik:GridTableView DataKeyNames="ID,checked" DataSourceID="naslovnikiSource"
                        EditMode="InPlace" CommandItemDisplay="Top"
                         CommandItemSettings-AddNewRecordText="Dodaj Naslovnika" Width="100%"
                         CommandItemSettings-RefreshText="Osveži"
                         NoDetailRecordsText="V tej skupini ni zapisov o naslovnikih." runat="server"
                         Name="Naslovniki">                      
                  <PagerStyle Mode="NextPrevAndNumeric" ShowPagerText="True"
                      PagerTextFormat="Stran: {4} &amp;nbsp;Prikazujem stran {0} od {1}, zapisov {2} do {3} od {5}."
                      NextPagesToolTip="Naslednje strani" NextPageToolTip="Naslednja stran"
                      PrevPagesToolTip="Prejšnje strani" PrevPageToolTip="Prejšnja stran"
                      FirstPageToolTip="Prva stran" LastPageToolTip="Zadnja stran" />          
                            <ParentTableRelation>
                                <telerik:GridRelationFields DetailKeyField="skupID" MasterKeyField="ID" />
                            </ParentTableRelation>               
                            <CommandItemSettings AddNewRecordText="Dodaj Naslovnika" RefreshText="Osveži"></CommandItemSettings>             
                            <Columns>
                                <telerik:GridBoundColumn HeaderText="Ime" HeaderButtonType="TextButton"
                                    DataField="ime" UniqueName="ime">
                                </telerik:GridBoundColumn>                    
                                <telerik:GridBoundColumn HeaderText="Telefonska številka(m)" HeaderButtonType="TextButton"
                                    DataField="stevilka" UniqueName="stevilka">
                                </telerik:GridBoundColumn>                                                  
                                 <telerik:GridTemplateColumn UniqueName="LST" HeaderText="Skupine">
                                 <ItemTemplate>
                                     <asp:ListBox ID="skupddl" Width="160" runat="server" Rows="5" SelectionMode="Multiple"></asp:ListBox>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Width="80px"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Center" />
                                 </telerik:GridTemplateColumn>                                      
                                       <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Uredi"
                                            UniqueName="EditCommandColumn">
                                            <HeaderStyle HorizontalAlign="Center" Width="50px"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </telerik:GridEditCommandColumn>                                
                                        <telerik:GridButtonColumn ConfirmText="Ali želite res izbrisati naslovnika?\n\nIzbrisali boste tudi vsa planirana SMS sporočila namenjena temu naslovniku." ButtonType="ImageButton" HeaderText="Izbriši"
                                                    CommandName="Delete" UniqueName="DeleteColumn">
                                                    <HeaderStyle HorizontalAlign="Center" Width="50px"></HeaderStyle>
                                                     <ItemStyle HorizontalAlign="Center" />
                                         </telerik:GridButtonColumn>                            
                                         <telerik:GridTemplateColumn HeaderText="Pošlji SMS" UniqueName="SMS">
                                         <ItemTemplate>
                                             <asp:CheckBox ID="smscheck" runat="server" Enabled="true" />
                                            </ItemTemplate>
                                            <HeaderStyle HorizontalAlign="Center" Width="80px"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Center" />
                                         </telerik:GridTemplateColumn>                        
                            </Columns>
                        </telerik:GridTableView>
                    </DetailTables>
    </MasterTableView>
             <ClientSettings AllowKeyboardNavigation="True">
                <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                <ClientEvents OnRowSelecting="RowSelecting" OnRowSelected="RowSelected" />
                 <ClientMessages PagerTooltipFormatString="Stran: &lt;b&gt;{0}&lt;/b&gt; od &lt;b&gt;{1}&lt;/b&gt; strani" />
                </ClientSettings>
              <SortingSettings SortToolTip="Klikni tukaj za sortiranje"></SortingSettings>
              <StatusBarSettings LoadingText="Nalagam..." ReadyText="Pripravljen" />
              <HierarchySettings CollapseTooltip="Minimiziraj" ExpandTooltip="Maksimiziraj" />
        </telerik:RadGrid>


    LP, Luka
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 20 Apr 2009 Link to this post

    Hi,

    I tried with the Grid settings that you have applied on my end and the RadComboBox in the Pager appears okay. I am not sure what is happening on your end. I am using RadControls for asp.net AJAX(2009.1.311.20).

    Shinu
  6. Lukrs
    Lukrs avatar
    39 posts
    Member since:
    Sep 2012

    Posted 20 Apr 2009 Link to this post

    Hi,

    I was rebinding the grid in the Page_PreRenderComplete event.
    That's how you can reproduce the error.

    When I rebind the grid in the skupineGrid_PreRender it works fine.

    I don't know why, but this is the case. I had no problems in previous releases....till now :)

    This rests the case, thanks for your help Shinu.

    LP, Luka
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017