I am using ext.net to create a multiple selector. The selector has two sources. One is a list of all possible options. Second is a list of selected options. To illustrate,

All possible option for dependencies: Project A, Project B, Project C and Project M. Selected dependency for Project M: Project B and Project C.

I can load a list of all possible dependencies easily. I have created ExtNetExtensions class to make it easier. CreateMultiAutoComplete is basically a generic combobox for selecting multiple items. After initializing the combobox with all possible values, I set the SelectedItems. Here is the code.

i.Add(Html.X().CreateMultiAutoComplete<ProjectDto>().ID("ProjectScorecardDependencies").Name("ProjectScorecardDependencies").FieldLabel("Dependencies")
                              .Value(Model.ProjectScorecardDependencies)
                              .AutoColSpan(3, 3)
                              .SelectedItems(t =>
                              {
                                  if (Model.SelectedProjectScorecardDependencies != null)
                                  {
                                      foreach (var dependency in Model.SelectedProjectScorecardDependencies)
                                      {
                                          t.Add(Html.X().ListItem().Value(dependency));
                                      }
                                  }
                              })
Now, the problem. Setting the selectedItems in this manner makes the form dirty.

That is a problem because I want to do a hard refresh for another functionality in the page but a popup appears even if there is no change in the form data.

Any way to mark prevent the dirty flag from being set or to prevent the popup from being displayed would be great. Thanks.