Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
355
Show a LinkButton/Button/Image on a cell
posted

Hi there,

I'm binding a grid to a collection of businessobjects. Is there a way to control how each column is rendered?

For example, I want that the column of the ID property of my business object is rendered as a LinkButton so I can have the user to click on it and link to a page with more information about that object and manipulate it.

In a similar fashion I'd like to have a special column with some ImageButtons with commands to operations available to do on the object the row is representing (for instance changing one of its values, increment a counter and similar things.

I think the way to go is using templated columns but I haven't seen any example on how to do it clearly.

Thanks!

Parents
No Data
Reply
  • 28464
    Verified Answer
    posted

    Hello,

    Yes, templated columns are the way to go. There are two good examples in forums here:

    http://forums.infragistics.com/forums/p/11539/43837.aspx#43837
    http://forums.infragistics.com/forums/p/15044/55166.aspx#55166

    I think they will be able to get this started. If you need to pass column / field value as a link parameter, you can use <%# Eval("ColumnName") %> directly in the template / link, there ColumnName is the name of the columns / field of the datasource.

    Hope this helps.

Children
No Data