force selected items in DataSelectorControl

edited 6:00PM 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 6:00PM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.