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

[Solved] Change size of a command item

3 Answers 151 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Myriam
Top achievements
Rank 1
Myriam asked on 19 Mar 2010, 06:54 PM
Hello
I have a RadGrid which I would like to change the size of the command item "Ajouter un Ã©tablissement" but I just can't find how. I don't care if the others command items change. As long as "Ajouter un Ã©tablissement" is bigger.
Here is my code

<telerik:RadGrid   
        ID="RadGrid1"   
        runat="server" 
        DataSourceID="SQLETAB" 
        Skin="Office2007"   
        GridLines="None" 
        autogeneratecolumns="false" 
        AllowAutomaticInserts="true"   
        AllowAutomaticUpdates="True"   
        AllowAutomaticDeletes="true" 
        HorizontalAlign=left 
         EditFormSettings-FormmaintableStyle-HorizontalAlign=Left 
         Width="98%" 
        > 
          
        <PagerStyle   
            NextPageText="Suivant" PrevPageText="Précédent" Mode="NextPrevAndNumeric"   
            NextPagesToolTip="Pages suivante"   
            NextPageToolTip="Page suivante"   
            PrevPagesToolTip="Pages précédente"   
            PrevPageToolTip="Page précédente"/>  
                 <HierarchySettings ExpandTooltip="Voir les usagers pour votre Ã©tablissement" CollapseTooltip ="Revenir Ã  votre Ã©tablissement" /> 
        <MasterTableView   
            Name="MTVUsager" 
            AllowAutomaticInserts="true" 
            AllowAutomaticDeletes="true" 
            AllowAutomaticUpdates="true" 
            DataSourceID="SQLETAB" 
            DataKeyNames="NO_ETAB" 
            CommandItemSettings-AddNewRecordText="Ajouter un Ã©tablissement"   
            CommandItemSettings-RefreshText="Rafraichir" 
            EditFormSettings-EditColumn-CancelText="Annuler"   
            EditFormSettings-EditColumn-EditText="Modifier" 
            EditFormSettings-EditColumn-UpdateText="Mise Ã  jour" 
            HorizontalAlign=Left 
            CommandItemDisplay=Top 
            EditFormSettings-FormMainTableStyle-HorizontalAlign=Left 
            EditFormSettings-FormTableItemStyle-HorizontalAlign=Left 
             EditFormSettings-FormTableAlternatingItemStyle-HorizontalAlign=Left>      
                             
              
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
                 
            <Columns> 
              
                <telerik:GridBoundColumn   
                    SortExpression="TYPE_ECOLE"   
                    HeaderText="TYPE_ECOLE"   
                    DataField="TYPE_ECOLE"   
                    UniqueName="TYPE_ECOLE1"   
                    visible="false" 
                    readonly="true">  
                </telerik:GridBoundColumn> 
      
                      
                <telerik:GridBoundColumn   
                    SortExpression="NO_ORG"   
                    HeaderText="NO_ORG"   
                    DataField="NO_ORG"   
                    UniqueName="NO_ORG" Visible=false ReadOnly=true>  
                    <ItemStyle HorizontalAlign=Left /> 
                </telerik:GridBoundColumn> 
                  
                <telerik:GridEditCommandColumn   
                    ButtonType="ImageButton"   
                    UniqueName="EditCommandColumn" EditText="Modifier" > 
                </telerik:GridEditCommandColumn> 
                   
                 <telerik:GridButtonColumn   
                    ConfirmText="Supprimer cet Ã©tablissement?"   
                    ConfirmDialogType="RadWindow"   
                    ConfirmTitle="Supprimer"   
                    ButtonType="ImageButton" 
                    CommandName="Delete"   
                    Text="Supprimer"   
                    UniqueName="DeleteColumnEtab">  
                    <ItemStyle HorizontalAlign="Center"  /> 
                 </telerik:GridButtonColumn> 
                           
                                
                  
            </Columns> 
            <DetailTables> 
                <telerik:GridTableView   
                    Name="DTVUSAGER" 
                    DataSourceID="SqlUSAGER" 
                    DataKeyNames="NO_IDENT" 
                    AllowAutomaticDeletes="True" 
                    AllowAutomaticInserts="true" 
                    AllowAutomaticUpdates="True" 
                    CommandItemDisplay="Bottom" 
                    CommandItemSettings-AddNewRecordText="Ajouter un usager"   
                    CommandItemSettings-RefreshText="Rafraichir"   
                    EditFormSettings-EditColumn-CancelText="Annuler"   
                    EditFormSettings-EditColumn-InsertText="Ajouter"   
                    EditFormSettings-EditColumn-EditText="Modifier"   
                    EditFormSettings-EditColumn-UpdateText="Mise Ã  jour"   
                     EditFormSettings-EditColumn-HeaderButtonType="PushButton" 
                          
                    NoDetailRecordsText="Il n'y a aucun usager pour cet Ã©tablissement."   
                    EditMode="EditForms" > 
                      
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px" /> 
                    </ExpandCollapseColumn> 
                  
                    <ParentTableRelation> 
                        <telerik:GridRelationFields DetailKeyField="NO_ETAB" MasterKeyField="NO_ETAB" /> 
                    </ParentTableRelation> 
                      
                    <Columns> 
                      
                         <telerik:GridTemplateColumn UniqueName="Template3" HeaderText="Confirmer">  
                            <ItemTemplate> 
                                <asp:LinkButton ID="LlGenererMotDepasse" CommandName="RegenererMotPasse" runat="server">Regénérer mot de passe</asp:LinkButton>      
                            </ItemTemplate>   
                         </telerik:GridTemplateColumn> 
                  
                         <telerik:GridEditCommandColumn   
                            ButtonType="ImageButton"   
                            UniqueName="EditCommandColumn"   
                            EditText="Modifier">  
                         </telerik:GridEditCommandColumn> 
                           
                         <telerik:GridButtonColumn   
                            ConfirmText="Supprimer cet usager?"   
                            ConfirmDialogType="RadWindow"   
                            ConfirmTitle="Supprimer"   
                            ButtonType="ImageButton" 
                            CommandName="Delete"   
                            Text="Supprimer"   
                            UniqueName="DeleteColumnDomaine">  
                            <ItemStyle HorizontalAlign="Center"  /> 
                         </telerik:GridButtonColumn> 
                      
                     <telerik:GridBoundColumn   
                            SortExpression="NO_IDENT"   
                            HeaderText="NO_IDENT"   
                            DataField="NO_IDENT"   
                            UniqueName="NO_IDENT"   
                            ReadOnly=true   
                            Visible=false>  
                        </telerik:GridBoundColumn> 
                          
                        <telerik:GridBoundColumn   
                            SortExpression="NOM"   
                            HeaderText="Nom"   
                            DataField="NOM"   
                            UniqueName="NOM">  
                        </telerik:GridBoundColumn> 
                          
                           
                        <telerik:GridTemplateColumn EditFormHeaderTextFormat=" " HeaderText="d!" Visible=false>  
                            <EditItemTemplate> 
                                <asp:Label ID="Label1" runat=server visible=true Text="Le mot de passe de l'usager sera générer automatiquement lors d'un ajout. Celui-ci sera envoyé Ã  la personne concerné par courriel."></asp:Label> 
                            </EditItemTemplate> 
                        </telerik:GridTemplateColumn> 
                          
                    </Columns> 
                </telerik:GridTableView> 
            </DetailTables> 
        </MasterTableView> 
    </telerik:RadGrid> 
 
Thank you

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 22 Mar 2010, 08:22 PM
Hello Myriam,

Please try the following way:
<style type="text/css">
    .rgCommandRow td
    {
        height: 60px;
    }
</style>

I hope this helps

Regards,
Daniel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Myriam
Top achievements
Rank 1
answered on 08 Apr 2010, 08:24 PM
Hello
I tried this:
<style type="text/css">  
    .rgCommandRow td  
    {  
        height: 60px;   
        font-size:20px;  
    }  
</style> 
The height is bigger but the font-size didn't change...
0
Daniel
Telerik team
answered on 14 Apr 2010, 03:31 PM
Hello Myriam,

I created a sample project that is based on your code. Please download it locally and let me know whether this helps.

Regards,
Daniel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Myriam
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Myriam
Top achievements
Rank 1
Share this question
or