[Gtk-sharp-list] how can I get value in CellRendererCombowithmulticolumn Model?

Luciano _ lnc19 at hotmail.com
Mon Feb 5 11:08:16 EST 2007


Yes, you're right:

Cell.Model.GetActiveIter(out iter)
is the correct way of do this.

Luciano


>From: "Dr. McArrow" <dr_mcarrow at mail.ru>
>To: "Luciano _" <lnc19 at hotmail.com>
>CC: gtk-sharp-list at lists.ximian.com
>Subject: Re: [Gtk-sharp-list] how can I get value in 
>CellRendererCombowithmulticolumn Model?
>Date: Mon, 05 Feb 2007 18:05:07 +0200
>MIME-Version: 1.0
>Received: from lists.ximian.com ([130.57.169.22]) by 
>bay0-mc6-f2.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Mon, 5 
>Feb 2007 08:05:56 -0800
>Received: from galactus.ximian.com (localhost.localdomain [127.0.0.1])by 
>lists.ximian.com (Postfix) with ESMTP id E4C8B1CFD49;Mon,  5 Feb 2007 
>12:31:19 -0500 (EST)
>Received: from herald.ximian.com (frontgate.ximian.com [130.57.169.19])by 
>lists.ximian.com (Postfix) with ESMTP id 8B8001CFD45for 
><gtk-sharp-list at lists.ximian.com>;Mon,  5 Feb 2007 12:31:18 -0500 (EST)
>Received: by herald.ximian.com (Postfix, from userid 2601)id 904DE70065; 
>Mon,  5 Feb 2007 11:05:16 -0500 (EST)
>Received: from mx33.mail.ru (mx33.mail.ru [194.67.23.194])by 
>herald.ximian.com (Postfix) with ESMTP id BEE4C7004Bfor 
><gtk-sharp-list at lists.ximian.com>;Mon,  5 Feb 2007 11:05:12 -0500 (EST)
>Received: from [91.124.108.220] (port=55176 helo=dr)by mx33.mail.ru with 
>psmtp id 1HE6L5-000EU1-00; Mon, 05 Feb 2007 19:05:08 +0300
>X-Message-Info: txF49lGdW431Az5OGnyhmeltWYBx8WVKNeBbPFGjTlU=
>X-Original-To: gtk-sharp-list at lists.ximian.com
>Delivered-To: gtk-sharp-list at lists.ximian.com
>X-Greylist: delayed 2212 seconds by postgrey-1.27 at 
>frontgate.ximian.com;Mon, 05 Feb 2007 11:05:12 EST
>References: <BAY104-F307C8E35C54BBD3FB7DADBA6980 at phx.gbl>
>User-Agent: Opera Mail/9.10 (Win32)
>X-Antivirus: avast! (VPS 0710-2, 05.02.2007), Outbound message
>X-Antivirus-Status: Clean
>X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on 
>frontgate.ximian.com
>X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 
>tests=SPF_HELO_PASS,SPF_PASS version=3.0.3
>X-BeenThere: gtk-sharp-list at lists.ximian.com
>X-Mailman-Version: 2.1.8
>Precedence: list
>List-Id: "Discussion of the .Net bindings for 
>Gnome"<gtk-sharp-list.lists.ximian.com>
>List-Unsubscribe: 
><http://lists.ximian.com/mailman/listinfo/gtk-sharp-list>,<mailto:gtk-sharp-list-request at lists.ximian.com?subject=unsubscribe>
>List-Archive: <http://lists.ximian.com/pipermail/gtk-sharp-list>
>List-Post: <mailto:gtk-sharp-list at lists.ximian.com>
>List-Help: <mailto:gtk-sharp-list-request at lists.ximian.com?subject=help>
>List-Subscribe: 
><http://lists.ximian.com/mailman/listinfo/gtk-sharp-list>,<mailto:gtk-sharp-list-request at lists.ximian.com?subject=subscribe>
>Errors-To: gtk-sharp-list-bounces at lists.ximian.com
>Return-Path: gtk-sharp-list-bounces at lists.ximian.com
>X-OriginalArrivalTime: 05 Feb 2007 16:05:57.0650 (UTC) 
>FILETIME=[8598CF20:01C7493F]
>
>Thanks for your advice.
>But actually, I don't need to get value of TreeView.
>in TreeView i have many columns, and one of its - CellRendererCombo.
>(look at my first message.)
>i need a kind of "CellRendererCombo.model.getvalue" , not
>TheTreeView.Model.GetValue,
>
>
>
>On Mon, 05 Feb 2007 17:53:23 +0200, Luciano _ <lnc19 at hotmail.com> wrote:
>
> > Try this:
> >
> > private void OnEdited(object o, EventArgs a)
> > {
> >    TreeIter iter;
> >     if(TheTreeView.Selection.GetSelected(out iter)) // This return the
> > selected Iter
> >    {
> >         Console.WriteLine(TheTreeView.Model.GetValue(iter, 0)) // This
> > print the first column content
> >         Console.WriteLine(TheTreeView.Model.GetValue(iter, 1)) // This
> > print the second column content
> >    }
> > }
> >
> >
> >
> >>
> >> I have a CellRendererCombo in a treeview.
> >> how can I retrive a value from a column different than the one defined
> >> by
> >> TextColumn?
> >> My ListStore holds two values: an id from a database and a string.
> >> TextColumn points to the string (column 0), but I want to know the id
> >> (col
> >> 1).
> >>
> >>
> >> ListStore ls_dept = new ListStore(typeof(string),typeof(string));
> >> ls_dept.AppendValue("sssss","1");
> >> ls_dept.AppendValue("zzzzz","2")
> >>
> >> ...
> >>
> >> CellRendererCombo crc = new CellRendererCombo();
> >> crc.Editable = true;
> >> crc.Model = ls_dept;
> >> crc.TextColumn = 0;
> >> crc.Edited += (OnEdited);
> >> ...
> >>
> >> private void OnEdited(object o, EventArgs a)
> >> {
> >> in this place i need to know the value of column 1.
> >> how can I do this?
> >> }
> >>
> >>
> >> --
> >> Dr.McArrow
> >> _______________________________________________
> >> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> >> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> >
> > _________________________________________________________________
> > ¿Cuánto vale tu auto? Tips para mantener tu carro. ¡De todo en MSN
> > Latino Autos! http://latino.msn.com/autos/
> >
>
>
>
>--
>Dr.McArrow
>_______________________________________________
>Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

_________________________________________________________________
MSN Latino: el sitio MSN para los hispanos en EE.UU. http://latino.msn.com/



More information about the Gtk-sharp-list mailing list