How to disable a option of SelectBox

void Main() { 
  string[] colors = { "Red", "Green", "Violet", "Blue", "Orange", "Yellow" };
  var selectBox = new LINQPad.Controls.SelectBox(colors, onSelectionChanged: x => {
    //todo disable selected, enable other

  });
  selectBox.Dump();
}

I want to achieve like while I choose a option of a SelectBox, the selected option become disable,
Is this possible?

Comments

  • Could you elaborate on use case? It looks weird from end user perspective.

  • Once options selected , it will run a method and show result in DumpContainer below.
    When another option selected run another method and replace result DumpContainer.content .
    I want to notice user which method is executed by disable the options.

  • I'd cache result (Util.Cache, Util.CacheAsync) and show it every time user selects item.

    You can manipulate HTML dumped using Util.InvokeScript, I don't think it worth it.