customized grid

3 posts, 1 answers
  1. sadiqabbas
    sadiqabbas avatar
    21 posts
    Member since:
    Mar 2009

    Posted 04 Mar 2009 Link to this post

    Dear Sir/s,

    I would like to ask a solution for data grid that

    i need an output as


    eg:
    {database}
    id        name         description
    1         raj               xyz xyz abc
    2         mohan        abc abc xyz


    {query select * from database}


    output
    {RAD datagrid}
                <tr>
                    <td>
                              <a href="~/profiles.aspx?id=ID{of database}"> NAME{of database}</a><br>
                    </td>
                </tr>
                <tr>
                    <td>
                              Description{of database}
                    </td>
                </tr>

    i hope i am able to make u understand.......
    if not then please below is link to image

    image


    really very sorry for poor english
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 Mar 2009 Link to this post

    Hi,

    You can use a GridTemplateColumn to achieve the desired scenario.

    ASPX:
    <MasterTableView AutoGenerateColumns="false"   > 
                   
                 <Columns> 
                   
                   <telerik:GridTemplateColumn UniqueName="TempCol"  HeaderText="TempCol" > 
                     <ItemTemplate> 
                       <tr> 
                             <td> 
                                <href="profiles.aspx?id='<%#Eval("id") %>' "<%#Eval("name")%></a><br> 
                             </td> 
                      </tr> 
                      <tr> 
                            <td> 
                               <%#Eval("description")%> 
                           </td> 
                     </tr> 
                     </ItemTemplate> 
                   </telerik:GridTemplateColumn> 
                </Columns> 
                 
                </MasterTableView> 


    Thanks
    Shinu
  3. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Mar 2009 Link to this post

    Hello,

    You can also refer to the following help document which explains on how to customize your grid cells using TemplateColumns:
    Customizing with GridTemplateColumn

    Thanks
    Princy.
Back to Top