force selected items in DataSelectorControl

edited 4:46PM in FastReport .NET
I register the last selection of a DataSelectorControl with that code :
// filter the datasource    
      DataSelector4.FilterData();
      // get the datasource
      DataSourceBase data = Report.GetDataSource("Tout_mobiles_non_vides");
     
      data.Init();
      //data.Rows[0].Selected = true;
      // enumerate rows
      string s = "";
      while (data.HasMoreRows)
      {
        if (s.Replace( data["syndAffiche"].ToString(),"").Length==s.Replace( "a","a").Length )
        {s += data["syndAffiche"].ToString() + "\r\n";}
        data.Next();
      }

and I want to force the same selection when loading form again. But I don't find selecteditems method for the DataSelectorControl .

What's the way to do that ?

Comments

  • edited 4:46PM
    oliv wrote: »
    I register the last selection of a DataSelectorControl with that code :
    // filter the datasource    
          DataSelector4.FilterData();
          // get the datasource
          DataSourceBase data = Report.GetDataSource("Tout_mobiles_non_vides");
         
          data.Init();
          //data.Rows[0].Selected = true;
          // enumerate rows
          string s = "";
          while (data.HasMoreRows)
          {
            if (s.Replace( data["syndAffiche"].ToString(),"").Length==s.Replace( "a","a").Length )
            {s += data["syndAffiche"].ToString() + "\r\n";}
            data.Next();
          }
    

    and I want to force the same selection when loading form again. But I don't find selecteditems method for the DataSelectorControl .

    What's the way to do that ?



    Crate a method say dataselector() place the above code in that, and just call dataselector() method at above and same when your loading form executed.

Leave a Comment