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

Image Button with RadGrid

3 Answers 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Medac
Top achievements
Rank 1
Medac asked on 13 Oct 2008, 11:10 AM
Hi,

I am having one requirement wherein i need to display one button based some falg value. I tried with <Item Tmplate> tag but in this case for all the rows in the Rad Grid it is displaying the button. How can I show and hide the button based on some condition inside telerik radgrid.

Regards,
Medac

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 13 Oct 2008, 11:18 AM
Hi Medac,

If you want to have the button only once in RadGrid, you can use CommandItemTemplate.

Let us know if you need more information. In this case, please provide some details what are you trying to do exactly.

Regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Medac
Top achievements
Rank 1
answered on 13 Oct 2008, 11:26 AM
Hi,

I have pasted my piece of code which i have written inside Telerik Radgrid.

<

telerik:GridTemplateColumn HeaderText="">

 

 

<ItemStyle width="85px" />

 

 

 

<ItemTemplate>

 

 

<img alt="Click" runat="server" id="btnReversals" src="../Images/btn_Reversal.gif" onclick="OpenReversalPopUp('<%# Eval("Tran #")%>','<%# Eval("Responsible Party")%>')" />

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 RadGrid is displaying the image buttons in all the rows, but my requireement is to be shown only based on some flag value. That flag valu also exists in the RadGrid.

Is it possible to acieve this through CommandItemTemplate?
If yes can please explain me the steps to implement?

Thanks in advance,
Medac

 

0
Sebastian
Telerik team
answered on 13 Oct 2008, 11:55 AM
Hi Medac,

I think that the implementation from the following documentation topic will help you attain the functionality you are searching for:

http://www.telerik.com/help/aspnet-ajax/grdconditionalimagedisplayingridcolumn.html

Feel free to modify the approach to be in conformance with your configuration schema.

Best regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Medac
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Medac
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or