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

UpdateImageUrl showing default image

1 Answer 22 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gourangi
Top achievements
Rank 1
Gourangi asked on 08 Oct 2008, 09:53 AM
Hi,

I have GridEditCommandColumn and I have set its UpdateImageUrl but still it is showing default theme Edit Image.

I dont know what can be wrong with this. Here is code I have written.

<telerik:GridEditCommandColumn ButtonType="ImageButton" UpdateImageUrl="Extra/edit.gif" UniqueName="EditCommandColumn">

</telerik:GridEditCommandColumn>

Regards,
Divyesh

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 Oct 2008, 05:34 AM
Hi Divyesh,

I tried setting the imageurl for edit as well as update button and it is working as expected. Try setting it in the code behind and see whether it is working.

ASPX:
 <telerik:GridEditCommandColumn    UniqueName="EditCol" ButtonType="ImageButton"     ></telerik:GridEditCommandColumn> 

CS:
protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
         
        foreach (GridColumn col in RadGrid1.MasterTableView.RenderColumns) 
        { 
            if (col.UniqueName == "EditCol") 
            { 
                GridEditCommandColumn editcl = (GridEditCommandColumn)col; 
                editcl.EditImageUrl = "Images/Image1.jpg"
                editcl.UpdateImageUrl = "Images/Image2.jpg"
            } 
        } 
   } 


Thanks
Shinu.
Tags
Grid
Asked by
Gourangi
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or