Hi Mike,
When I load my datasource on my grid every name was setting good excepted the bands(0)
Exemple
Bands(0).key = "List`1"
Bands(1).key = "SoumissionDetail"
My First Class is calling "Soumission" and second classe calling "SoumissionDetail"
Why is writing "List'1" on my first band ? and not "Soumission"
Thank.
Francois.
Hi Francois,
Thank you for contacting Infragistics Developer Support.
If you have set the Band data source to be a list it will have its Key as “List’1”. If you want to display something else as the band caption you will have to use code like:
ultraGrid1.DisplayLayout.Bands(0).Header.Caption = "Soumission";
For the other bands the name will be determined by the name of the respective public property in the “parent” class.
Let me know if you have any additional question.
Just to clarify a little - the Key of the band comes from the DotNet BindingManager. If you are binding to a List<T>, then the BindingManager doesn't have any way to know the name of the variable you are using to reference the list, so it uses the type name. For the child bands, it knows the property that returns the child list, so it uses that as the key.
Hi Dimitar,
Thank you for your attention.
My sub initialize every grid automatically with custom attribut property and is work very find.
François.
Hello Francois,
I am just checking about the progress of this issue. Let me know if you need my further assistance on this issue.
Thank you for using Infragistics Components.
Thank you for the reply.
Yes the key is determined by the BindingManager and it is read-only after is set. Trying to set it will result in NotSupportedException with message “Band key can not be set”.
Please let me know if you have any additional questions.
Hi,
Thank for your answer, I understand.
I use PropertyInfo.NAme of my property to calling my sub.
When I calling my sub the first time I send nothing to my BandName, and I do exception for that, it's work fine.
Band = grid.DisplayLayout.Bands(IIF(BandName = "",0,BandName)
I think is no way to change de key of the band.key or the GetType.Name of my LIST<T>
Thank you for your time.
Francois