IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1951.74 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-07-26
[16:13]<rrd2uppnv>i have a question.. i have a collection of objects... each object has a collection itself... now i want to display this info in a datagridview (winform) so it looks like coll[0].prop1, coll[0].prop2, coll[0].coll2[0].prop1,coll[0].coll2[0].prop2 for each row where it iterates through the coll[0].coll first placing a row for each item.. does that make sense ?
[16:14]<rrd2uppnv>is the datagridview my best option.. or is there a better way ?
[16:20]<drygq>i found some reference cards..
[16:20]<drygq>http://www.reflectionit.nl/Downloads/DotNetRefCard.pdf
[16:20]<edjg>Hello
[16:21]<drygq>i forgot that these things are called reference cards :P > http://www.google.com/search?hl=en&lr=&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial_s&q=C%23+reference+card&btnG=Search
[16:23]<lxlwgnz>during RDA pull, how do i pull just the schema for a table or an empty table from the host sql server so that i can insert rows and later rda push from windows mobile? i don't need any existing rows.
[16:25]<edjg>With P/Invoke, what does a DllNotFoundException of reason "Invalid access to memory location" mean
[16:28]<y-gz>error CS0038: Cannot access a nonstatic member of outer type `System.ComponentModel.Design.SiteNestedContainer' via nested type `System.ComponentModel.Design.SiteNestedContainer.Site'
[16:28]<y-gz>0_0
[16:34]<rrd2uppnv>binding a datagridview in winforms to a custom object collection seems a little different than gridview in asp.net... in asp.net i was able to choose the method that returns the collection to bind, whereas the datagridview, it doesnt seem to be happening
[16:34]<rrd2uppnv>maybe im doing something wrong
[16:55]<cjmgrug>smellyhippy: you still around?
[17:05]<lxlwgnz>i am trying to RDA pull but i cant access the host computer by computer name, only by IP. :\\\\\\
[17:05]<sdnffdxdlld>ish
[17:05]<sdnffdxdlld>CodeRun
[17:08]<cjmgrug>smellyhippy: isnt it late there already? go sleep :p
[17:09]<awjzdd>CodeRun: late where? its getting decently late in australia..
[17:10]<cjmgrug>i'm just bored.. so i'm blabbering whatever i feel like ;)
[17:10]<awjzdd>lol
[17:12]<cjmgrug>http://startlogic.com/products_prologic.html << whats the catch (if, any)
[17:13]<sdnffdxdlld>CodeRun: it 3 in the afternoon :P
[17:13]<sdnffdxdlld>wtf you think i am? ;)
[17:13]<y-gz>yaya
[17:13]<y-gz>it's pray time now
[17:13]<y-gz>;P
[17:14]<awjzdd>pray time?
[17:14]<awjzdd>wtf
[17:14]<y-gz>i have compiled the complete implementation of DesignSurface for mono
[17:14]<y-gz>:P
[17:14]<y-gz>for the first time :P
[17:15]<y-gz>SpikeLite msdn2 DesignSurface
[17:15]<slycnlyvn>i-nZ, DesignSurface Class (System.ComponentModel.Design): http://msdn2.microsoft.com/en-us/library/system.componentmodel.design.designsurface.aspx
[17:16]<y-gz>now I am going to recompile sharpdevelop with it
[17:16]<y-gz>but before that something from MS and then start bugfixing :)
[17:17]<cjmgrug>ow.
[17:17]<awjzdd>smellyhippy sup fo-
[17:17]<awjzdd>fo0*
[17:17]<rwyfcygs>Wooo
[17:17]<rwyfcygs>You OSS contributor you
[17:21]<sdnffdxdlld>lo wormy
[17:21]<awjzdd>smellyhippy sup playa
[17:28]<sdnffdxdlld>not much :)
[17:28]<sdnffdxdlld>working on UI :(
[17:28]<sdnffdxdlld>but working on a simple DAL for SQLLite tongiht ^_^
[17:32]<rrd2uppnv>why wont this datagridview let me bind it to a method.. it is only allowing a class... is this different than the gridview in asp.net ?
[17:33]<azyfm>yes
[17:33]<rrd2uppnv>ok.. how so ?
[17:34]<rrd2uppnv>does the class have to implement certain methods to ne used as a bindingsource ?
[17:34]<azyfm>winforms databinding works differently from ASP.NET databinding
[17:34]<rrd2uppnv>ok
[17:34]<azyfm>as the .DataSource for a BindingSource object, you mean?
[17:35]<rrd2uppnv>yeah
[17:35]<azyfm>no, you can bind either single objects or collections with a BindingSource
[17:35]<azyfm>if you bind to something that implements IEnumerable, it will be treated as a collection
[17:35]<lxlwgnz>does TCP/ip networking have to be enabled for RDA pull and push?
[17:35]<azyfm>if you bind to anything else, it will create an internal list with the object as the only item
[17:36]<lxlwgnz>on teh sql server
[17:36]<rrd2uppnv>Arild: ok.. makes some sense
[17:38]<rrd2uppnv>is there a good tutorial on that
[17:38]<azyfm>I don't know of any
[17:39]<rrd2uppnv>ok.. i will google
[17:39]<svzz[wjzc]>it's pretty fun, the further i go in developing my software, the elss i use .NET 2.0 :-/... just dropped the BindingSource and the BindingNavigator for my own versions of those
[17:39]<svzz[wjzc]>s/elss/less
[17:40]<rrd2uppnv>what do you mean your own versions
[17:41]<sdnffdxdlld>yer staz ... I find I roll my own for almost everything
[17:41]<hzzmbyv>=\
[17:42]<svzz[wjzc]>most of the time they only need some "very stupid addons"... for example... a beforePositionChanged event and a Filtering by Predicates on bindingsources
[17:43]<rrd2uppnv>sounds complicated
[17:43]<svzz[wjzc]>you know what's a predicate?
[17:44]<rrd2uppnv>a method that returns a bool
[17:44]<rrd2uppnv>right smelly :-]
[17:45]<svzz[wjzc]>voila, there are Find() methods in a List<> that uses predicates, which doesn't require an IBindingList... i don't know why they didn't think about a predcate filtering to filter non-IbindingList Lists
[17:47]<rrd2uppnv>i did a .find method yesterday with an anonymous method until smelly convinced me to use a dictionary.. so i erased the code
[17:47]<rrd2uppnv>that was fun though
[17:48]<rrd2uppnv>but how would i go about creating a datasource for a datagridview? do you have any examples ?
[17:48]<svzz[wjzc]>for a datagrid? a List<> can do
[17:48]<rrd2uppnv>in winforms
[17:48]<svzz[wjzc]>yes
[17:49]<rrd2uppnv>but it asks for a class.. and classes dont return anything
[17:49]<rrd2uppnv>what am i missing
[17:49]<svzz[wjzc]>first you need an object... struct GridItem { private string m_Name; public string Name { get { return m_Name; } set { m_Name = value; } } } <--
[17:49]<svzz[wjzc]>you need a struct or class that has properties (get and set)
[17:50]<svzz[wjzc]>then you make a List<GridItem>
[17:50]<svzz[wjzc]>and Mygrid.datasource = mylist;
[17:50]<svzz[wjzc]>do you see what you're missing?
[17:50]<svzz[wjzc]>(oh by the way...)
[17:51]<svzz[wjzc]>if you need sorting, and filterring, use a BindingList<GridItem>
[17:51]<sdnffdxdlld>for simple binding the object must impliment IList <<< note NOT IList<>
[17:51]<rrd2uppnv>the keyword struct is throwing me off.. i need to google some
[17:51]<sdnffdxdlld>for more advanced binding you need other binding specific interfaces
[17:51]<azyfm>there's a lot of those...
[17:52]<sdnffdxdlld>yeah
[17:52]<sdnffdxdlld>edit support, undo support, make a cup of coffe support
[17:53]<svzz[wjzc]>jaybuffet a struct is a value type while a class is an object... value = heap, object = stack
[17:53]<svzz[wjzc]>as simple as that... int, float, DateTime = struct / value type string, List, textbox = class / object
[17:54]<rrd2uppnv>ok
[17:54]<azyfm>not just those, smellyhippy, to do something like BindingSource you need to implement a lot of propertydescriptor/typedescriptor-related interfaces as well
[17:54]<rrd2uppnv>makes sense
[17:57]<sdnffdxdlld>yeah I know ... i was just saying that theres alot of different ones ;)







