Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
265
UltraWebGrid to WebHierarchicalGrid
posted

I have converted a UltraWebGrid to WebHierarchicalGrid with existing code - I am trying to figure out how the WebHierarchicalGrid allows the bands and children members to be available in the code behind - Due to time constraints - I would appreciate if someone can look at this and tell how to parse through child records...

Thanks!

 

Is there a cheat sheet or something that can show us what are the replaced new properties in the new controls comparing the old controls - It would really help.!

 

 

for (int i = 0; i < WebHierarchicalDataGrid1.Rows.Count; i++) //looping the parent table                

{

decimal parentvalue = 0, childValue = 0;                    

if (WebHierarchicalDataGrid1.Bands.Count == 2)                    

{                        

if (WebHierarchicalDataGrid1.Rows[i].HasChildRows == true)                        

{                            

for (int k = 0; k < WebHierarchicalDataGrid1.Rows[i].Rows.Count; k++)                            

{                                

if (WebHierarchicalDataGrid1.Rows[i].Rows[k].Items.FindItemByKey("Qty").Value == null || WebHierarchicalDataGrid1.Rows[i].Rows[k].Items.FindItemByKey("Batches").Value == null)                                    

 EmptyBatches = true;                                

 else                                    

childValue += Convert.ToDecimal(WebHierarchicalDataGrid1.Rows[i].Rows[k].Items.FindItemByKey("Qty").ToString());                            

}

if (WebHierarchicalDataGrid1.Rows[i].Items.FindItemByKey("Qty").Value != null && WebHierarchicalDataGrid1.Rows[i].Items.FindItemByKey("Qty").Value != "")                                 parentvalue = Convert.ToDecimal(WebHierarchicalDataGrid1.Rows[i].Items.FindItemByKey("Qty").ToString());

if ((childValue != parentvalue) && (WebHierarchicalDataGrid1.Rows[i].HasChildRows == true))                                

Result = false;                        

 }                                                         

}                

}