Hi Iki,

I think what you want to do is:

// Select and scroll to a particular element
//
// From Apple's documentation:
//
// To scroll to the newly selected row with minimum scrolling, select the
row using
// selectRowAtIndexPath:animated:scrollPosition: with
UITableViewScrollPositionNone,
// then call scrollToRowAtIndexPath:atScrollPosition:animated: with
// UITableViewScrollPositionNone.

using (var path = element.IndexPath) {
    TableView.SelectRow (path, true, UITableViewScrollPosition.None);
    TableView.ScrollToRow (path, UITableViewScrollPosition.None, true);
}


Hope that helps,

Jeff

On Mon, Dec 3, 2012 at 10:47 AM, Iki <[email protected]> wrote:
>
> Hi guys, I'm trying to select a cell inside DialogViewController (only
one at a time).
>
> For now only thing that I'm able to do is following :
>
> StringElement se1 = new StringElement("TEST CLICK");
> se1.Tapped += () =>
> {
>
> se1.GetCell(this.TableView).SelectionStyle =
UITableViewCellSelectionStyle.Blue
> } ;
>
> While using this, cell is only temporary selected, i.e. flashing blue
after is pressed. Is there a way to make this permanent, or unit i select
another one?
>
>
>
> Thanks for your help!!
>
>
>
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to