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

Change ImageUrl and ConfirmText in DetailTable GridButtonColumn Delete

1 Answer 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Purushothama
Top achievements
Rank 1
Purushothama asked on 12 Nov 2017, 03:45 PM

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

 

 

 

1 Answer, 1 is accepted

Sort by
0
Purushothama
Top achievements
Rank 1
answered on 13 Dec 2017, 07:13 PM

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

Tags
Grid
Asked by
Purushothama
Top achievements
Rank 1
Answers by
Purushothama
Top achievements
Rank 1
Share this question
or