I have a grid that has several parent-child relationship.
Is there a way in which I can disable the AllowAddNew() on some child rows,
For example
1.
1.1
1.2
2.
2.2
... If a certain condition is true, this row must have an allowaddnew property. This might be true to some relationship.
As you can see, In group 1, the AllowAddNew() property is disabled. But in 2, it may be enabled since theres a condition that it is true.
I hope you could understand what i mean.
Thanks
Im done with this, Anyway, il change my question,
but related to that somehow,
is this possible?
ParentRow
CHILDROW
TemplateAddRow() - this row has no yet values.
Thanks.
I cant make a parent row with only TemplateAddRow() on bottom. I causes an error. Thanks
Why can't you? What's the error?
I did a work around, It works well now. However, I need to focus to a TemplateAddRow when I click on a button on my form.
private void Form1_Load(object sender, System.EventArgs e) { // Bind the grid this.BeginInvoke(new MethodInvoker(this.SetFocusToTemplateAddRow)); } private void SetFocusToTemplateAddRow() { this.ultraGrid1.ActiveCell = this.ultraGrid1.Rows.TemplateAddRow.Cells[0]; this.ultraGrid1.PerformAction(UltraGridAction.EnterEditMode); }
i did use the example above, but i think it won't work if the grid has child rows. Any ideas ?? Need to focus it in my child row. Thanks
Have struggled with the same problem, and ended upp with a workaround......
1. Identify the parent row (in my example the active row is a one of its child rows) and make it active
2. Step to next row, the "TemplateAddRow"
ultraGridParentChild.ActiveRow = ultraGridParentChild.ActiveRow.ParentRow;
ultraGridParentChild.PerformAction(UltraGridAction.NextRow);