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

Dynamic conversion of declarative code

1 Answer 10 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ali Akbar
Top achievements
Rank 1
Ali Akbar asked on 04 Aug 2009, 01:38 PM
Below is the code in declarative format i need to dynamically build the radgrid and perform grouping. I am new to telerik so please could you help me out to convert it for code behind.


<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceI="SqlDataSource1" 
   GridLines="None" 
   AllowPaging="false" PageSize="25" 
   Skin="Outlook" DataSourceID="SqlDataSource1">  
 
 
 <MasterTableView DataSourceID="SqlDataSource1" GroupsDefaultExpanded="false"  >    
   <GroupByExpressions > 
         <telerik:GridGroupByExpression  > 
         <SelectFields> 
          <telerik:GridGroupByField  
            FieldName="name"  HeaderText=""/>  
         </SelectFields> 
           <GroupByFields> 
              <telerik:GridGroupByField  
                 FieldName="name" /> 
               </GroupByFields> 
         </telerik:GridGroupByExpression> 
         <telerik:GridGroupByExpression  > 
         <SelectFields> 
          <telerik:GridGroupByField  
            FieldName="lft"  HeaderText=""/>  
         </SelectFields> 
           <GroupByFields> 
              <telerik:GridGroupByField  
                 FieldName="lft" /> 
               </GroupByFields> 
         </telerik:GridGroupByExpression> 
   </GroupByExpressions> 
    </MasterTableView> 
   
   
</telerik:RadGrid> 

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 04 Aug 2009, 01:57 PM
Hi Ali,

You can refer to the following help document links to get started with programmatic creation of your grid:
Programmatic creation
GroupBy Programmatic Creation

Thanks
Princy.
Tags
Grid
Asked by
Ali Akbar
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or