Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
570
Bug in class UltraDataSource, method AddRange(...) ?
posted

Hi All !

Szenario:
By pushing a button a UltraCombo should be filled via a UltraDataSource (which is associated to the UltraCombo).

Problem:
Using UltraDataSource's "AddRange" method does not fill the UltraDataSource and therefore the UltraCombo. 

By the way:  using the UltraDataSource's method  "Add"  works fine.

e.g. this.ultraDataSource1.Rows.Add(new object[ { ((object)("1")), ((object)("Ralf"))});

Source code:
I have simplified the code like this:

//Form1.Designer.cs
private void InitializeComponent(){

 ...
 UltraDataColumn ultraDataColumn1 = new UltraDataColumn("Name");
 UltraDataColumn ultraDataColumn2 = new UltraDataColumn("Nr");
        ultraDataSource1 = new UltraDataSource(this.components);  
        ultraCombo1 = new UltraCombo();
       
// 
// ultraDataSource1
//
this.ultraDataSource1.Band.Columns.AddRange(new object[ {
     ultraDataColumn1,
     ultraDataColumn2});
           

// 
// ultraCombo1
//  
this.ultraCombo1.DataMember = "Band 0";  
this.ultraCombo1.DataSource = this.ultraDataSource1;            
 
ultraGridBand1.Columns.AddRange(new object[ {
             ultraGridColumn1,
             ultraGridColumn2});

this.ultraCombo1.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
this.ultraCombo1.DisplayMember = "Name";         
this.ultraCombo1.ValueMember = "Nr";
}
 
 
 // Form.cs
 private void ultraButton1_Click(object sender, EventArgs e)
         {
             this.ultraDataSource1.Rows.AddRange(new object[ {
             new Infragistics.Win.UltraWinDataSource.UltraDataRow(new object[ {
                         ((object)("Nr")),
                         ((object)("1")),
                         ((object)("Name")),
                         ((object)("Ralf"))}),
             new Infragistics.Win.UltraWinDataSource.UltraDataRow(new object[ {
                         ((object)("Nr")),
                         ((object)("2")),
                         ((object)("Name")),
                         ((object)("Claus"))}),
             new Infragistics.Win.UltraWinDataSource.UltraDataRow(new object[ {
                         ((object)("Nr")),
                         ((object)("3")),
                         ((object)("Name")),
                         ((object)("Georg"))}),
             new Infragistics.Win.UltraWinDataSource.UltraDataRow(new object[ {
                         ((object)("Nr")),
                         ((object)("4")),
                         ((object)("Name")),
                         ((object)("Monika"))})});
            
        }

Any advice or ideas you might have, would be very welcome. Thanks in advance !

Kind regards,

Claus 

 

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Claus, 

        The AddRange method does not show up in Intellisense for a reason. It's intended to be used for the Deserialization of the control. This method is intentionally hidden because you are not supposed to use it in your code. The AddRange method isn't even listed in the Online documentation for the same reason. 

Children
No Data