EditImageUrl in DetailTable

6 posts, 0 answers
  1. Volker Weg
    Volker Weg avatar
    15 posts
    Member since:
    Nov 2007

    Posted 23 Apr 2009 Link to this post

    I try to set the EditImageUrl (also update and cancel) in the Detailtable but the defaultimage appears (An pen for edit and the texts "update" "cancel" for the commands).
    What I have to do to solve this?

    <radG:RadGrid ID="Grid_ris_ein" runat="server" EnableAJAX="True" OnNeedDataSource="Grid_ris_ein_NeedDataSource"  
                            AutoGenerateColumns="False" OnItemDataBound="Grid_ris_ein_ItemDataBound" OnItemCommand="Grid_ris_ein_ItemCommand" 
                            AllowPaging="False" BorderStyle="None" CellPadding="0" Skin="None" > 
                        <AlternatingItemStyle /> 
                         
                        <HeaderStyle Font-Bold="false" ForeColor="#000000" BackColor="#ffffff" BorderWidth="1px" HorizontalAlign="Center" VerticalAlign="Top" BorderStyle="Solid" BorderColor="White"  /> 
                        <FooterStyle BackColor="#cc6633"></FooterStyle> 
                        <EditItemStyle Font-Bold="True" /> 
                        <MasterTableView Width="780px" GridLines="None" BorderStyle="None" PageSize="7" 
                              Name="tblMaster" CellPadding="0" CellSpacing="3" HorizontalAlign="Left" EditMode="InPlace" 
                              DataKeyNames="ris_ein_id" > 
                            <ExpandCollapseColumn Resizable="False" Visible="True" CollapseImageUrl="/images/down.png" ExpandImageUrl="/images/right.png"
                                <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
                            <RowIndicatorColumn Visible="False"></RowIndicatorColumn> 
                            <Columns> 
                                <radg:GridBoundColumn UniqueName="ris_ein_id" HeaderText="ris_ein_id" DataField="ris_ein_id" Visible="False" ReadOnly="True" ></radg:GridBoundColumn>     
                                <radg:GridBoundColumn UniqueName="ris_ein_nr" HeaderText="ris_ein_nr" DataField="ris_ein_nr" Visible="False" ReadOnly="True"></radg:GridBoundColumn>     
                                <radg:GridBoundColumn UniqueName="ris_ein_text" HeaderText="Monatliche Einnahmen (netto)" DataField="ris_ein_text" ReadOnly="true"
                                    <ItemStyle Width="250px" /></radg:GridBoundColumn>     
                                <radg:GridBoundColumn UniqueName="ris_ein" HeaderText="" DataField="ris_ein" DataFormatString="{0:###,### &euro;}" DataType="System.Double"
                                    <ItemStyle Width="120px" /></radg:GridBoundColumn>   
                                <radG:GridEditCommandColumn UniqueName="Editbutton" ButtonType="ImageButton" EditImageUrl="/images/edit.png" > 
                                    <ItemStyle Width="16px" /></radg:GridEditCommandColumn>  
                                <radg:GridBoundColumn UniqueName="ris_ein_comment" HeaderText="" ReadOnly="true"
                                    <ItemStyle Width="394px" /></radg:GridBoundColumn>   
                            </Columns> 
                            <DetailTables> 
                                <radg:GridTableView AllowSorting="False" DataKeyNames="ris_ein_id" width="255px" 
                                    Name="tblDetail" > 
                                    <ParentTableRelation> 
                                        <radG:GridRelationFields DetailKeyField="ris_ein_id" MasterKeyField="ris_ein_id" /> 
                                    </ParentTableRelation> 
                                     
                                    <Columns> 
                                        <radg:GridBoundColumn UniqueName="ris_ein_id" HeaderText="ris_ein_id" DataField="ris_ein_id" Visible="False" ReadOnly="True" ></radg:GridBoundColumn>     
                                        <radg:GridBoundColumn UniqueName="ris_ein_nr" HeaderText="ris_ein_nr" DataField="ris_ein_nr" Visible="False" ReadOnly="True"></radg:GridBoundColumn>     
                                        <radg:GridBoundColumn UniqueName="ris_ein_beg" HeaderText="Beginn" DataField="ris_ein_beg" DataFormatString="{0:dd.MM.yyyy}"
                                            <ItemStyle Width="85px" /></radg:GridBoundColumn>     
                                        <radg:GridBoundColumn UniqueName="ris_ein_end" HeaderText="Ende" DataField="ris_ein_end" DataFormatString="{0:dd.MM.yyyy}"
                                            <ItemStyle Width="85px" /></radg:GridBoundColumn>     
                                        <radg:GridBoundColumn UniqueName="ris_ein_inffak" HeaderText="Infl.-Ausgl." DataField="ris_ein_inffak" DataFormatString="{0:0.0%}" DataType="System.Double"
                                            <ItemStyle Width="85px" /></radg:GridBoundColumn>    
                                        <radG:GridEditCommandColumn UniqueName="EditbuttonDetail" ButtonType="ImageButton" EditImageUrl="/images/edit.png" UpdateImageUrl="/images/update.gif" CancelImageUrl="/images/cancle.gif" > 
                                            <ItemStyle Width="16px" /></radg:GridEditCommandColumn> 
                                    </Columns> 
                                </radg:GridTableView> 
                            </DetailTables> 
                        </MasterTableView> 
                    </radG:RadGrid> 


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

    Posted 23 Apr 2009 Link to this post

    Hi Volker,

    Try setting the UpdateImageUrl and CancelImageUrl in EditFormSettings for DetailTable and see whether it helps.

    ASPX:
     
        . . . 
    <ParentTableRelation> 
            <radG:GridRelationFields DetailKeyField="ris_ein_id" MasterKeyField="ris_ein_id" />  
    </ParentTableRelation> 
     
    <EditFormSettings EditColumn-ButtonType="ImageButton" EditColumn-CancelImageUrl="../Images/Cancel.gif" EditColumn-UpdateImageUrl="../Images/Update.gif" > 
    </EditFormSettings> 
     
            <Columns> 
                   <radg:GridBoundColumn UniqueName="ris_ein_id" HeaderText="ris_ein_id" DataField="ris_ein_id" Visible="False" ReadOnly="True"
    </radg:GridBoundColumn> 
        . . .     

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Volker Weg
    Volker Weg avatar
    15 posts
    Member since:
    Nov 2007

    Posted 23 Apr 2009 Link to this post

    Still not working properly.
    I try:
    <EditFormSettings EditColumn-ButtonType="ImageButton"  
                                    EditColumn-EditImageUrl="/images/edit.png" EditColumn-EditText="Bearbeiten" 
                                     EditColumn-CancelImageUrl="/images/cancel.gif" EditColumn-CancelText="Abbrechen" 
                                      EditColumn-UpdateImageUrl="/images/update.gif" EditColumn-UpdateText="Speichern"></EditFormSettings> 

    cancel and update works fine, but editimageurl not.

    Regards,


  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 24 Apr 2009 Link to this post

    Hello Volker,

    To display the update and cancel buttons as images you have to set the EditFormSettings>EditColumn-CancelImageUrl and EditFormSettings>EditColumn-UpdateImageUrl to the corresponding image urls. Whereas to display an image for the EditButton you have to set the image url in the EditCommandColumn as shown below:
    aspx:
     <Columns>  
     .... 
      <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="imagesImage(1).bmp">         
      </telerik:GridEditCommandColumn> 
     </Columns> 
     <EditFormSettings> 
                <EditColumn UniqueName="EditCommandColumn1" ButtonType="ImageButton" EditImageUrl="images/Image(1).bmp" 
                 UpdateImageUrl="images/Image(2).bmp" CancelImageUrl="images/Image(3).bmp"
                </EditColumn> 
     </EditFormSettings> 

    Thanks
    Princy.
  6. Steven
    Steven avatar
    1 posts
    Member since:
    Apr 2015

    Posted 21 Apr 2015 Link to this post

    Hi, I'm having a similar issue here:

     

    <DetailTables>
            <radG:GridTableView runat="server" AllowSorting="true" AllowFilteringByColumn="true" AutoGenerateColumns="false"
                    ShowFooter="false" DataKeyNames="sysId" HierarchyLoadMode="ServerOnDemand"
                    GridLines="None" Name="DetailGrid1" EditMode="InPlace" Width="100%" Height="75%">
                            <EditFormSettings>
                                    <EditColumn UniqueName="EditCommandColumn1" ButtonType="ImageButton"
                                            EditImageUrl="~/APP_THEMES/MASTERPAGE/btnEdit.gif"
                                            UpdateImageUrl="~/APP_THEMES/MASTERPAGE/btnSaveSM.gif"
                                            CancelImageUrl="~/APP_THEMES/MASTERPAGE/btnCancelSM.gif"
                                            InsertImageUrl="~/APP_THEMES/MASTERPAGE/btnSaveSM.gif"
                                            UpdateText="Save" InsertText="Save" >
                                    </EditColumn>
                            </EditFormSettings>
                            <Columns>
                                    <radG:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"
                                            EditImageUrl="~/APP_THEMES/MASTERPAGE/btnEdit.gif">
                                            <ItemStyle Width="5%" />
                                    </radG:GridEditCommandColumn>

     

    I've also included what the images should look like, and what they do look like.

  7. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1803 posts

    Posted 24 Apr 2015 Link to this post

    Hello Steven,

    Please specify the image URLs in the GridEditColumn as well:
    <EditFormSettings>
        <EditColumn UniqueName="EditCommandColumn1" ButtonType="ImageButton"
            EditImageUrl="Images/btnEdit.gif"
            UpdateImageUrl="~/APP_THEMES/MASTERPAGE/btnSaveSM.gif"
            CancelImageUrl="~/APP_THEMES/MASTERPAGE/btnCancelSM.gif"
            InsertImageUrl="~/APP_THEMES/MASTERPAGE/btnSaveSM.gif"
            UpdateText="Save" InsertText="Save">
        </EditColumn>
    </EditFormSettings>
    <Columns>
        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"
            EditImageUrl="~/APP_THEMES/MASTERPAGE/btnEdit.gif"
            UpdateImageUrl="~/APP_THEMES/MASTERPAGE/btnSaveSM.gif"
            CancelImageUrl="~/APP_THEMES/MASTERPAGE/btnCancelSM.gif"
            InsertImageUrl="~/APP_THEMES/MASTERPAGE/btnSaveSM.gif">
            <ItemStyle Width="5%" />
        </telerik:GridEditCommandColumn>
    </Columns>

    The above is working correctly in our latest versions, so if the issue on your end persists, please upgrade to a newer version.


    Regards,
    Konstantin Dikov
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

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