On the UltraGridBand object there is a private method that gets called during data binding called InitBandKey and it is within this method that the key is being set.
The logic for this is similar to the following:
CurrencyManager cm = (CurrencyManager)this.bindingManager;
if (cm.List is ITypedList)
{
newKey = ((ITypedList)cm.List).GetListName(null);
}
else
{
newKey = cm.List.GetType().Name;
}
In your example, you are getting the result of (new List<row>()).GetType().Name
You could define a class that derives from List<row>
and then the name of that class would be the key of the band. For example:
public class CustomList:List<row>
{
}
And then the updated call to SetDataBinding for this example is:
this.ultraGrid1.SetDataBinding(new CustomList(), string.Empty, true);