Hello,

I´m using MonoTouch.Dialog to make an editable ViewTable like the Alarm
app. I use two different Element, one when I don't edit (RadioElement) and
another when I am in edit mode (StringElement).

private RootElement CreateEditablCourts (bool editable=false)

 {


  var root = editable? new RootElement("Juzgados") : new RootElement(
"Juzgados",new RadioGroup(-1));

 var section = new Section ();

 var courts = lawerData.getAllCourts();

 foreach (var c in courts) {

  var court = c;

  section.Add(CreateEditableElement(court.Location,editable));

 }

 root.Add(section);


  return root;

 }


 private Element CreateEditableElement (string caption, bool editable =
false)

 {

 if (editable)

  return new StringElement (caption, () => {

  new UIAlertView ().Show ();}); //NEVER TRIGGER


  var radioElement = new RadioElement(caption,string.Empty);

 radioElement.Tapped+= () => {
new UIAlertView ().Show ();  //WORKS

 } ;


  return radioElement;


 }


Thanks in advance,
_jmgomez_
Juan  M Gómez
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to