Hi Jeff, i tried this but with no luck, after little researching i found Craig 
Dunn post, here:

http://monotouch.2284126.n4.nabble.com/How-to-keep-selected-element-row-highlighted-td4655163.html

So I subclassed StringElement but I only override this:

public override void Selected (DialogViewController dvc, UITableView tableView, 
NSIndexPath indexPath)
                {
                        // dostuff
                        //tableView.DeselectRow (indexPath, true);
                        
tableView.SelectRow(indexPath,true,UITableViewScrollPosition.None);
                }

But thanks for Your help, you gave me push in the right direction!

P.S. Benedikt thank You also!!


On Dec 3, 2012, at 5:14 PM, Jeff Stedfast <[email protected]> wrote:

> 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