I am struggling to find out the row expanding event i.e. a user click at (+) sihgn to write some custom logic. I tried looking for AfterRowExpanded event but strangely it is not available to me. Am iI doing something wrong.
Also does ultrarow has something so that I can configure ultragrid.DisplayLayout.Override.AllowAddNew property at the ultrarow or childrow level. The propertyultragrid.DisplayLayout.Override.AllowAddNew is set at the grid level. I want to configure it at the click of (+) button at row level. Please advise.
Hello Nipun,
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
Hi Nipun,
I am not sure what you want exactly. The mentioned property could only be set on a band level which is intelligibly. It seems to me that you want to set it on a row level, which does not make sense for me, I could be wrong of course. I mean, you could do something like this:
private void ultraGrid1_AfterRowExpanded(object sender, Infragistics.Win.UltraWinGrid.RowEventArgs e)
{
if(e.Row.Index == 0)
e.Row.ChildBands[0].Band.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.No;
else e.Row.ChildBands[0].Band.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.FixedAddRowOnBottom;
}
but I am not sure, that it is very intuitive.
Please feel free to let me know if I misunderstood you or if you have any other questions.
Hi Boris,
Thanks for the response. We are using version 10.1 . My requirement is to runtime evaluate the childrows at the click event of (+) button and based on the condition override the "AllowAddNew" property at the childrow level which is already set once at the band level as suggested by you also.
Thanks,
Nipun
What is your version?
The 'AllowAddNew' could be set on a band level, like this:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
e.Layout.Bands[0].Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.FixedAddRowOnBottom;
e.Layout.Bands[1].Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.No;