зеркало из https://github.com/mono/mail-archives.git
143 строки
5.5 KiB
HTML
143 строки
5.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Gtk-sharp-list] Query getting values from treeview
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Query%20getting%20values%20from%20treeview&In-Reply-To=981F46194F2B4AE7BEADE6A400C551CC%40D134151">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="009334.html">
|
|
<LINK REL="Next" HREF="009338.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Gtk-sharp-list] Query getting values from treeview</H1>
|
|
<B>Iggy</B>
|
|
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Query%20getting%20values%20from%20treeview&In-Reply-To=981F46194F2B4AE7BEADE6A400C551CC%40D134151"
|
|
TITLE="[Gtk-sharp-list] Query getting values from treeview">iggy.ma at gmail.com
|
|
</A><BR>
|
|
<I>Wed Jan 7 13:12:44 EST 2009</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="009334.html">[Gtk-sharp-list] Query getting values from treeview
|
|
</A></li>
|
|
<LI>Next message: <A HREF="009338.html">[Gtk-sharp-list] Query getting values from treeview
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#9337">[ date ]</a>
|
|
<a href="thread.html#9337">[ thread ]</a>
|
|
<a href="subject.html#9337">[ subject ]</a>
|
|
<a href="author.html#9337">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>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 <<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">libin.mohanan at wipro.com</A>> wrote:
|
|
><i>
|
|
</I>><i> Hi All,
|
|
</I>><i>
|
|
</I>><i> i have a GTK# treeview which have two columns Name and value.
|
|
</I>><i> I am populating the values of this in a liststore and i am adding this to
|
|
</I>><i> the treeview.
|
|
</I>><i> Now for testing purpose i want to itetrate through all the values inside
|
|
</I>><i> this two columns.
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i> This is how the code look like,
|
|
</I>><i> ------------------------------------------------------------------------------------------------------------------------------------
|
|
</I>><i> inside a foreach loop
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i> {
|
|
</I>><i>
|
|
</I>><i> strName = childNode.Attributes.GetNamedItem("name").Value;
|
|
</I>><i>
|
|
</I>><i> strValue = childNode.Attributes.GetNamedItem("value").Value;
|
|
</I>><i>
|
|
</I>><i> listStore.AppendValues(strValue,strName);
|
|
</I>><i>
|
|
</I>><i> }
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i> then adding this liststore to treeview
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i> ListView= new TreeView(listStore);
|
|
</I>><i>
|
|
</I>><i> ListView.AppendColumn(
|
|
</I>><i>
|
|
</I>><i> "Name", new CellRendererText(), "text", 0);
|
|
</I>><i>
|
|
</I>><i> ListView.AppendColumn(
|
|
</I>><i>
|
|
</I>><i> "Value", new CellRendererText(), "text", 1);
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i> ListWindow.Add(ListView);
|
|
</I>><i>
|
|
</I>><i> --------------------------------------------------------------------------------------------------------------------------------------
|
|
</I>><i>
|
|
</I>><i> Anyboby pls provide me the syntax for iterating through each values in each
|
|
</I>><i> columns.
|
|
</I>><i>
|
|
</I>><i> Thanks a lot!!!
|
|
</I>><i>
|
|
</I>><i> Libin
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i> Please do not print this email unless it is absolutely necessary.
|
|
</I>><i>
|
|
</I>><i> The information contained in this electronic message and any attachments to
|
|
</I>><i> this message are intended for the exclusive use of the addressee(s) and may
|
|
</I>><i> contain proprietary, confidential or privileged information. If you are not
|
|
</I>><i> the intended recipient, you should not disseminate, distribute or copy this
|
|
</I>><i> e-mail. Please notify the sender immediately and destroy all copies of this
|
|
</I>><i> message and any attachments.
|
|
</I>><i>
|
|
</I>><i> WARNING: Computer viruses can be transmitted via email. The recipient should
|
|
</I>><i> check this email and any attachments for the presence of viruses. The
|
|
</I>><i> company accepts no liability for any damage caused by any virus transmitted
|
|
</I>><i> by this email.
|
|
</I>><i>
|
|
</I>><i> www.wipro.com
|
|
</I>><i>
|
|
</I>><i> _______________________________________________
|
|
</I>><i> Gtk-sharp-list maillist - <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">Gtk-sharp-list at lists.ximian.com</A>
|
|
</I>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</A>
|
|
</I>><i>
|
|
</I>><i>
|
|
</I></PRE>
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="009334.html">[Gtk-sharp-list] Query getting values from treeview
|
|
</A></li>
|
|
<LI>Next message: <A HREF="009338.html">[Gtk-sharp-list] Query getting values from treeview
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#9337">[ date ]</a>
|
|
<a href="thread.html#9337">[ thread ]</a>
|
|
<a href="subject.html#9337">[ subject ]</a>
|
|
<a href="author.html#9337">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
|
|
mailing list</a><br>
|
|
</body></html>
|