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

Rad Grid view Hierarchy

4 Answers 211 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sudhakar
Top achievements
Rank 1
Sudhakar asked on 15 Oct 2008, 11:48 AM
How to Handle Inner (Child)Grid events in Rad Grid view Hierarchy (Win Forms)

How to set  Inner (Child)Grid  Heigh in Rad Grid View Hierarchy (Win Forms).

4 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 16 Oct 2008, 12:02 PM
Hi Sudhakar,

Events are shared. Please use the parent property to check whether this is the root template:

//in some event  
 
if (this.radGridView1.Parent == null) {   
   ...  
}  
else {  
   ...  

Don't hesitate to contact me back if you have further questions.


Kind regards,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Sudhakar
Top achievements
Rank 1
answered on 17 Oct 2008, 08:44 AM
How to handle Child Grid Events in  HierarchyGridView. My code like

radGridView1 =

new Telerik.WinControls.UI.RadGridView();

 

radGridView1.Name =

"radGridView1";

 

radGridView1.AutoScroll =

true;

 

radGridView1.MultiSelect =

false;

 

radGridView1.AutoSize =

true;

 

radGridView1.SelectionMode = Telerik.WinControls.UI.

GridViewSelectionMode.FullRowSelect;

 

radGridView1.MasterGridViewTemplate.BestFitColumns();

radGridView1.BackColor = System.Drawing.

Color.Transparent;

 

radGridView1.BackgroundImageLayout = System.Windows.Forms.

ImageLayout.None;

 

radGridView1.BeginEditMode = Telerik.WinControls.

RadGridViewBeginEditMode.BeginEditOnEnter;

 

radGridView1.Dock = System.Windows.Forms.

DockStyle.Fill;

 

radGridView1.MasterGridViewTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.

GridViewAutoSizeColumnsMode.Fill;

 

radGridView1.MasterGridViewTemplate.BestFitColumns();

radGridView1.MasterGridViewTemplate.AllowAddNewRow =

false;

 

radGridView1.MasterGridViewTemplate.AllowDeleteRow =

false;

 

radGridView1.MasterGridViewTemplate.AllowEditRow =

false;

 

radGridView1.EnableKeyMap =

true;

 

radGridView1.EnableSorting =

true;

 

radGridView1.Font =

new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

 

 

//radGridView1.Location = new System.Drawing.Point(0, 0);

 

radGridView1.ThemeClassName =

"Telerik.WinControls.UI.RadGridView";

 

radGridView1.ThemeName =

"Basic";

 

radGridView1.DataMember =

"Main";

 

radGridView1.Width = width;

radGridView1.Height = Height;

radGridView1.ReadOnly =

true;

 

radGridView1.ShowGroupPanel =

false;

 

radGridView1.RootElement.BackColor = System.Drawing.

Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(248)))), ((int)(((byte)(248)))));

 

pnlPoolLoad.Controls.Add(radGridView1);

radGridView1.DataSource =

null;

 

Temp_DataSet =

new DataSet();

 

Temp_DataSet = Copy_dataset(Temp_DataSet, bol).Copy();

radGridView1.DataSource = Temp_DataSet;

radGridView1.MasterGridViewTemplate.BestFitColumns();

radGridView1.AutoGenerateHierarchyFromDataSet =

true;

 

 

GridViewCommandColumn commandColumn = new GridViewCommandColumn();

 

 

 

commandColumn.HeaderText = "Change Status";

 

commandColumn.Width = 100;

commandColumn.DataField =

"Status";

 

commandColumn.DataTextFormatString =

"Status";

 

commandColumn.DefaultText =

"Status";

 

commandColumn.UseDefaultText =

true;

 

radGridView1.MasterGridViewTemplate.Columns.Add(commandColumn);

radGridView1.MasterGridViewTemplate.AllowDeleteRow =

false;

i whant Child Grid Events.


 

0
Nick
Telerik team
answered on 17 Oct 2008, 06:47 PM
Hi Sudhakar,

We are eager to help you. Please tell us more about the scenario in which you are using the gridview. A sample application can be very helpful as well. Which events do you want to use or what situations do you want to handle? I am looking forward to your reply.

 
Kind regards,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Sudhakar
Top achievements
Rank 1
answered on 27 Aug 2009, 04:07 PM
How to remove inner grid header?
How to handle inner grid height?
how to add image column in master grid?
Tags
GridView
Asked by
Sudhakar
Top achievements
Rank 1
Answers by
Nick
Telerik team
Sudhakar
Top achievements
Rank 1
Share this question
or