[Gtk-sharp-list] Query getting values from treeview

Iggy iggy.ma at gmail.com
Wed Jan 7 13:12:44 EST 2009


Look up the TreeView in the mono documentation. There is a method
called Foreach that iterates the store





On Wed, Jan 7, 2009 at 5:36 AM, libin <libin.mohanan at wipro.com> wrote:
>
> Hi All,
>
> i have a GTK#  treeview which have two columns Name and value.
> I am populating the values of this in a liststore and i am adding this to
> the treeview.
> Now for testing purpose i want to itetrate through all the values inside
> this two columns.
>
>
> This is how the code look like,
> ------------------------------------------------------------------------------------------------------------------------------------
> inside a foreach loop
>
>
> {
>
> strName = childNode.Attributes.GetNamedItem("name").Value;
>
> strValue = childNode.Attributes.GetNamedItem("value").Value;
>
> listStore.AppendValues(strValue,strName);
>
> }
>
>
>
> then adding this liststore to treeview
>
>
>
> ListView= new TreeView(listStore);
>
> ListView.AppendColumn(
>
> "Name", new CellRendererText(), "text", 0);
>
> ListView.AppendColumn(
>
> "Value", new CellRendererText(), "text", 1);
>
>
>
> ListWindow.Add(ListView);
>
> --------------------------------------------------------------------------------------------------------------------------------------
>
> Anyboby pls provide me the syntax for iterating through each values in each
> columns.
>
> Thanks a lot!!!
>
> Libin
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should
> check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>
>


More information about the Gtk-sharp-list mailing list