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

Adding group field to group panel.

5 Answers 99 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
KIRAN RAJ
Top achievements
Rank 1
KIRAN RAJ asked on 04 Oct 2011, 08:12 AM
Hi guys,
Can any one help me out , in adding a group field  to Rad grid group panel .
Ex: i Want to add a field "Name" to Radgrid group panel when you click on "Name" node from rad tree view.

5 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 04 Oct 2011, 09:56 AM
Hello,

you can dynamically add grouping from code behind based selected value of radtreeview.
for reference Please try with below link.
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/groupby/defaultcs.aspx
http://www.telerik.com/community/forums/aspnet-ajax/grid/dynamic-columns-in-a-grid-and-grouping-aggregate-problem.aspx

let me know if any concern.

Thanks,
Jayesh Goyani
0
KIRAN RAJ
Top achievements
Rank 1
answered on 05 Oct 2011, 02:41 PM
Hi,
I couldnt get the Reqd info there...

I am able to drag the column from rad tree view and add it to radgrid...

But my Requirement  is when i drag the field from Rad Tree view to grid, the field should be placed into the group panel as well and showing me grouped results...

SAY,
i have created ds with extra coulmn as  name 
public void AddColumnToGrid(DataTable dt, RadTreeNode node)
 {
         SqlConnection con = new SqlConnection(conStr);
         var strsql= select empid, age,loacation,name 
             con.Open();
             SqlDataAdapter da = new SqlDataAdapter(strsql, con);
             DataSet ds = new DataSet();
             SqlDataSource sqlds = new SqlDataSource();
             da.Fill(ds);
             RadGrid1.DataSource = ds;
             RadGrid1.Rebind();
  }
when i bind this to rad grid i got the  "name"  field as well, and  i want this to be in my rad grid group panel..ANY HELP..???

Thanks in advance..!! 
0
KIRAN RAJ
Top achievements
Rank 1
answered on 05 Oct 2011, 02:45 PM
Need code TO place name Column into Radgrid group panel programatically.....
0
KIRAN RAJ
Top achievements
Rank 1
answered on 06 Oct 2011, 12:42 PM
Hope some one can Give me the solution "For placing column into group panel " without actually dragging from radgrid...
0
Kevin
Top achievements
Rank 2
answered on 06 Oct 2011, 01:17 PM
Hello Kiran,

If you want to add grouping programmatically. You can refer to this help documentation:

http://www.telerik.com/help/aspnet-ajax/grid-group-by-programmatic-definition.html

You just need to modify the GroupByExpressions collection.

I hope that helps.
Tags
Ajax
Asked by
KIRAN RAJ
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
KIRAN RAJ
Top achievements
Rank 1
Kevin
Top achievements
Rank 2
Share this question
or