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

[Solved] Horizontal scrolling problem with radbutton when using FrozenColumnsCount

1 Answer 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Freddy
Top achievements
Rank 1
Freddy asked on 26 Jun 2014, 10:05 AM
Hi,

i have a problem with my radgrid ; i use horizontal scrolling and FrozenColumnsCount is set to 4.
In one of the columns, i have a radbutton in a template column. 


<telerik:RadGrid ID="rgPreparation" runat="server" AllowSorting="true" AllowFilteringByColumn="true" AutoGenerateColumns="false" AllowCustomPaging="false" Height="700px" Culture="fr-FR" AllowPaging="true" PageSize="15" ShowFooter="true" ShowStatusBar="True" 
onitemcreated="rgPreparation_ItemCreated"
onitemdatabound="rgPreparation_ItemDataBound" 
  onneeddatasource="rgPreparation_NeedDataSource" 
  onexcelexportcellformatting="rgPreparation_ExcelExportCellFormatting" 
  onitemcommand="rgPreparation_ItemCommand">
<ClientSettings EnableRowHoverStyle="true" AllowKeyboardNavigation="true">
  <ClientEvents OnKeyPress="OnKeyPress" /> 
  <Scrolling AllowScroll="true" UseStaticHeaders="true" FrozenColumnsCount="4" />
</ClientSettings>
<GroupingSettings CaseSensitive="false" />
<MasterTableView DataKeyNames="Id" HeaderStyle-Font-Underline="false" AlternatingItemStyle-HorizontalAlign="Left" AlternatingItemStyle-Font-Size="7pt" HeaderStyle-Font-Bold="true" ItemStyle-Font-Size="7pt" HeaderStyle-Font-Size="7pt" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" FilterItemStyle-HorizontalAlign="Left" NoMasterRecordsText="Cliquer sur ''Actualiser'' pour afficher la préparation de commande..." ShowHeadersWhenNoRecords="true">
<Columns>
<telerik:GridBoundColumn DataField="TypeProduit" HeaderText="Type" SortExpression="TypeProduit" UniqueName="coloneType" ItemStyle-Font-Size="7pt" FooterStyle-Font-Size="7pt" AllowFiltering="false" />
<telerik:GridBoundColumn UniqueName="colonneFamille" DataField="Famille.IdNom" HeaderText="Famille" SortExpression="Famille.IdNom" ItemStyle-Font-Size="7pt" FooterStyle-Font-Size="7pt" AllowFiltering="false" FilterControlWidth="10px" FooterText="Nb de produits :" />
<telerik:GridBoundColumn UniqueName="colonneIdProduit" DataField="Id" HeaderText="Code Produit" SortExpression="Id" Aggregate="Count" FooterAggregateFormatString=" {0} " AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" ShowFilterIcon="false" FilterControlWidth="50px" />
<telerik:GridBoundColumn UniqueName="colonneNomProduit" DataField="Nom" HeaderText="Produit" SortExpression="Nom" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" ShowFilterIcon="false" />
<telerik:GridBoundColumn UniqueName="Conditionnement" DataField="Conditionnement" HeaderText="Conditionnement de dispensation" SortExpression="Conditionnement" AllowFiltering="false" />



<telerik:GridTemplateColumn HeaderText="Stock Tampon (Calcul automatique ?)" HeaderTooltip="'Oui' : Calcul automatique de la quantité tampon ; 'Non' : Renseignez manuellement la quantité tampon" UniqueName="quantiteTampon" ItemStyle-BackColor="LightGray" AllowFiltering="false" ItemStyle-Width="150px">
<ItemTemplate> 
                            <div style="float:left">
   <telerik:RadNumericTextBox ID="rtbQuantiteTampon" runat="server" Width="50px" Skin="Vista">
                                    <NumberFormat AllowRounding="false" DecimalDigits="0" />
   </telerik:RadNumericTextBox>
                            </div>
                            <div style="float:left">
                                <telerik:EchoRadButton ID="rbAppliquerFormuleTampon" runat="server" ToggleType="CheckBox" ButtonType="StandardButton" Skin="Metro" Width="30px" AutoPostBack="false" OnClientClicked="check" LienHtml="true" style="position:relative"></telerik:EchoRadButton>
                            </div>
</ItemTemplate>
</telerik:GridTemplateColumn>



      <telerik:GridButtonColumn UniqueName="actionSupprimerProduit" CommandName="Delete" ButtonType="ImageButton" HeaderText="Supprimer le produit de la commande" ConfirmText="Êtes-vous sûr de vouloir supprimer ce produit de la commande ?"  HeaderStyle-Font-Underline="false" HeaderStyle-Font-Bold="false" ShowFilterIcon="false" Visible="false" />

</Columns>
</MasterTableView>
</telerik:RadGrid>

When i scroll the bar from left to right, the radbutton is still visible even if the column is hidden (take a look at the printscreens in attach files).

I put this style in my page but it still not work :
<style type="text/css">
.RadGrid .rgDataDiv
{
position: relative;
}
</style>

Is there a solution for this problem ? thanks in advance,

Freddy















1 Answer, 1 is accepted

Sort by
0
Galin
Telerik team
answered on 01 Jul 2014, 08:09 AM
Hi Freddy,

In order to resolve the described bug in IE7  you should modify the CSS rule as following

.RadGrid .rgDataDiv,
.RadGrid .rgRow td,
.RadGrid .rgAltRow td {
    position: relative;
}

I hope this help.

Regards,
Galin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Freddy
Top achievements
Rank 1
Answers by
Galin
Telerik team
Share this question
or