Hi
How can i find the band index of the row im deleting in the BeforeRowDelete event of the UltraWindGrid?
Hello Burmo,
You could get the band through:
e.Rows[0].Band;
Please do not hesitate to contact me if you need any additional assistance.
Hi Boris
This doesnt seem to work...
I dont get a Band property from the rows attribute...
this is my error for the following syntax: e:Rows:Band
Could not locate element 'Band' in class 'Infragistics.Win.UltraWinGrid.UltraGridRow[]'.
this is my error when trying the following syntax: e:Rows[0]:Band
Rows is not an array or an indexed property, therefore using a subscript is not valid.
i tried messaging the above statements and those were the errors...??
Any ideas???
I am talking about using a particular row from the given collection, please use Rows(0) instead of the whole collection Rows and let me know of the result.
This doesnt seem to work for me.. i am in the DataGrid_BeforeRowsDeleted event and there is no Band or BandIndex property..
Ive tried what you metioned and i get compile errors. ive tried the following syntax's and the all result in compile errors...
e:Rows(0):Band.
e:Rows[0]:Band.
e:Rows:Band.
Could you maybe provide me with your code for the BeforeRowsDeleted event and how you access the BandIndex?? This would be a great help... Thanks
Could you please review the sample attached to this post and see if it meets your requirements.Please feel free to let me know if I misunderstood you or if you have any other questions.
Thanks for the sample but it appears that the language im using doesnt support the rows attribute as an ARRAY
error message:
Rows is not an ABL array or an indexed property, therefore using a subscript is not valid.
Is there any other way to determine the band index? maybe set a property based on another event that triggers before the BeforeRowsDeleted event???
Probably your language is not supported by our NetAdvantage.
I however thought of a custom approach, please take a look:
int index; private void ultraGrid1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Delete) { index = ultraGrid1.Selected.Rows[0].Band.Index; } }
This index variable now holds your Band index and you could use it in the BeforeRowsDeleted event of the WinGrid control.