Change ImageUrl and ConfirmText in DetailTable GridButtonColumn Delete

2 posts, 0 answers
  1. Purushothama
    Purushothama avatar
    13 posts
    Member since:
    Jun 2016

    Posted 12 Nov 2017 Link to this post

    Hi,

    I have an requirement to change ImageUrl and ConfirmText message based on condition. I have mentioned requirement below.

    I have Grid with 2 level detail tables. Delete button is present in 1st Detail Table, But I need to change the image based on condition. Also I need to handle the behavior in DeleteCommand. Please refer the image attached.

    is it possible to change image and confirm text in pre_render event  of the grid and also let me know how we can get to know which operation to do in delete command?

    in the attached image, rows with + symbols are detail table rows, for the 1st row, confirm text will be "Are you sure to transform and update?" and operation is not delete and this row wont be deleted from the grid.

    for the 2nd row, confirm text will be "Are you sure to delete?" and operation will be delete. This row will be deleted from the grid

    i am using the below code:

    <telerik:GridButtonColumn  ButtonType="ImageButton" ImageUrl="..delete.png" CommandName="Delete" UniqueName="DeleteColumn" ConfirmText="Are you sure to delete?">
                                    </telerik:GridButtonColumn>

    Please let me know if we can achieve this? Thanks a lot in advance for your feedback

     

     

     

  2. Purushothama
    Purushothama avatar
    13 posts
    Member since:
    Jun 2016

    Posted 13 Dec 2017 Link to this post

    Hi,

    Can anybody provide solution to this problem? Please let me know if description is not clear so that i can rephrase it and provide more information.

    Regards,

    Puru

Back to Top