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

Row Expanded Changed

0 Answers 56 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Koti
Top achievements
Rank 1
Koti asked on 24 Jul 2012, 10:15 AM
Hi
I have hierarchial radgridview.
gridview have childgridview. In child gridview has subchild gridview.
In sub child gridview has another child.
Like parent ->child ->sub child -> sub subchild
when expanding parent, child gridview poplating ,
when expanding child, sub child gridview poplating. 
when expanding sub child gridview, sub subchild gridview poplating. 

My problem is 
when expanding the child, it's RowIsExpandedChanged is firing and also it's parent gridview RowIsExpandedChanged is firing,

when expanding the sub child, it's RowIsExpandedChanged is firing and also child gridview's RowIsExpandedChanged is firing and parent gridview RowIsExpandedChanged is firing,
 

when expanding the sub subchild, it's RowIsExpandedChanged is firing and also sub child gridview's RowIsExpanded is firing and also child gridview's RowIsExpandedChanged is firing and parent gridview RowIsExpandedChanged is firing,
  

 How to restrict child grid's parent RowIsExpandedChanged event firing ?  

//Parent Gridview
    private void radProductivityGrid_RowIsExpandedChanged(object sender, RowEventArgs e)
        {
                var row = e.Row as Telerik.Windows.Controls.GridView.GridViewRow;
                var id = row.Cells[0] as Telerik.Windows.Controls.GridView.GridViewCell;
                var ws = row.Cells[5] as Telerik.Windows.Controls.GridView.GridViewCell;
                int cid = Convert.ToInt32(id.Value);
                string workstatus = ws.Value.ToString();
                if (workstatus == "")
                    workstatus = cbWorkStatus.Text.ToString();
                PopulateAccountDetails(cid, workstatus);            
        }
 
    //Child Gridview
       private void radProductivityAccount_RowIsExpandedChanged(object sender, RowEventArgs e)
        {
                var row = e.Row as Telerik.Windows.Controls.GridView.GridViewRow;
                var id = row.Cells[0] as Telerik.Windows.Controls.GridView.GridViewCell;
                var ws = row.Cells[5] as Telerik.Windows.Controls.GridView.GridViewCell;
                int acid = Convert.ToInt32(id.Value);
                string workstatus = ws.Value.ToString();
                if (workstatus == "")
                    workstatus = cbWorkStatus.Text.ToString();
                PopulateProviderDetails(acid, workstatus);
        }
     
    //Sub Child Gridview
    private void radProductivityProvider_RowIsExpandedChanged(object sender, RowEventArgs e)
        {
            var row = e.Row as Telerik.Windows.Controls.GridView.GridViewRow;
            var id = row.Cells[0] as Telerik.Windows.Controls.GridView.GridViewCell;
            var ws = row.Cells[5] as Telerik.Windows.Controls.GridView.GridViewCell;
            int pid = Convert.ToInt32(id.Value);
            string workstatus = ws.Value.ToString();
            PopulateUserDetails(pid, workstatus);
        }

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Koti
Top achievements
Rank 1
Share this question
or