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

Luciano _ lnc19 at hotmail.com
Mon Feb 5 10:53:23 EST 2007

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

>From: "Dr. McArrow" <dr_mcarrow at mail.ru>
>To: gtk-sharp-list at lists.ximian.com
>Subject: [Gtk-sharp-list] how can I get value in CellRendererCombo 
>withmulticolumn Model?
>Date: Mon, 05 Feb 2007 17:28:11 +0200
>MIME-Version: 1.0
>Received: from lists.ximian.com ([]) by 
>bay0-mc2-f20.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Mon, 5 
>Feb 2007 07:28:29 -0800
>Received: from galactus.ximian.com (localhost.localdomain [])by 
>lists.ximian.com (Postfix) with ESMTP id 040811CFC86;Mon,  5 Feb 2007 
>11:54:29 -0500 (EST)
>Received: from herald.ximian.com (frontgate.ximian.com [])by 
>lists.ximian.com (Postfix) with ESMTP id 2A0691CFB76for 
><gtk-sharp-list at lists.ximian.com>;Mon,  5 Feb 2007 11:54:28 -0500 (EST)
>Received: by herald.ximian.com (Postfix, from userid 2601)id B554470029; 
>Mon,  5 Feb 2007 10:28:26 -0500 (EST)
>Received: from mx4.mail.ru (fallback.mail.ru [])by 
>herald.ximian.com (Postfix) with ESMTP id E6D7770029for 
><gtk-sharp-list at lists.ximian.com>;Mon,  5 Feb 2007 10:28:22 -0500 (EST)
>Received: from mx33.mail.ru (mx33.mail.ru [])by mx4.mail.ru 
>(mPOP.Fallback_MX) with ESMTP id 50E2F388802for 
><gtk-sharp-list at lists.ximian.com>;Mon,  5 Feb 2007 18:28:21 +0300 (MSK)
>Received: from [] (port=20569 helo=dr)by mx33.mail.ru with 
>psmtp id 1HE5lM-000Ezi-00for gtk-sharp-list at lists.ximian.com; Mon, 05 Feb 
>2007 18:28:13 +0300
>X-Message-Info: txF49lGdW43HTtWShKnOP1skam+SM4CZTxjqs+Yu/To=
>X-Original-To: gtk-sharp-list at lists.ximian.com
>Delivered-To: gtk-sharp-list at lists.ximian.com
>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 
>X-Spam-Level: *
>X-Spam-Status: No, score=2.0 required=5.0 
>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 
><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>
><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 15:28:29.0746 (UTC) 
>I have a CellRendererCombo in a treeview.
>how can I retrive a value from a column different than the one defined by
>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
>ListStore ls_dept = new ListStore(typeof(string),typeof(string));
>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?
>Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com

¿Cuánto vale tu auto? Tips para mantener tu carro. ¡De todo en MSN Latino 
Autos! http://latino.msn.com/autos/

More information about the Gtk-sharp-list mailing list