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: 1825.50 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-08-03
[10:12]<lyzxvxzddnz>morn
[10:13]<zgzzcygnv>hi
[10:54]<lyzxvxzddnz>echo --->
[10:54]<lyzxvxzddnz> echo --->
[10:54]<lyzxvxzddnz> echo --->
[10:54]<lyzxvxzddnz> <---echo
[10:54]<lyzxvxzddnz> <---echo
[10:54]<lyzxvxzddnz> <---echo
[10:55]<zgzzcygnv>that didn't work
[11:05]<gunzyffrvravycs>Hi, I have a databound datagridview, one field is connected to a numeric column, I type "a" in there and try and change row, and a massive error comes, something to do with parsing, how can I catch / avoid this?
[11:16]<gunzyffrvravycs>Does anyone actually answer questions here?
[11:18]<zyccus>yes
[11:18]<zyccus>when they know the answer, or are awake
[11:18]<zyccus>did you look at the stack trace when you got your exception, to see which parts of your code it passes through?
[11:18]<zyccus>if none, did you think of perhaps implementing an event handler?
[11:20]<gunzyffrvravycs>Yes I looked at the trace
[11:20]<gunzyffrvravycs>Its a long message
[11:20]<gunzyffrvravycs>Too long to paste
[11:20]<gunzyffrvravycs>And it wont let me c&p anyway
[11:21]<gunzyffrvravycs>Would a screenshot help?
[11:21]<zyccus>go ahead
[11:21]<lyzxvxzddnz>o_O
[11:22]<zyccus>http://rafb.net/paste/ <- good place to paste stuff for here
[11:24]<gunzyffrvravycs>okay here it is : http://img155.imageshack.us/img155/9808/untitledib8.jpg
[11:24]<jcynsdjcyn>if you hit ctrl+c on Windows message boxes, it will copy the contents of it to the clipboard
[11:25]<zyccus>sometimes
[11:25]<gunzyffrvravycs>I would catch the event, but this is occuring even before the validating event, so I dont know which event to catch
[11:25]<gunzyffrvravycs>Okay ... should I do that (the copy of dialog)?
[11:25]<gunzyffrvravycs>U have the screenshot now
[11:25]<gunzyffrvravycs>So no need
[11:25]<zyccus>GuerillaTactiks: so it looks like the exception doesn't pass through your code
[11:25]<zyccus>GuerillaTactiks: which means you probably need to catch the change to the cell yourself
[11:26]<gunzyffrvravycs>Its stumped me
[11:27]<jcynsdjcyn>try { .. } catch(System.FormatException) { .. } ?
[11:27]<zyccus>Okiesmokie: well, yes - but where?
[11:27]<gunzyffrvravycs>exactly
[11:27]<jcynsdjcyn>ah, good point x_x
[11:27]<jcynsdjcyn>There is no delegate for before the change is made to the cell?
[11:28]<zyccus>there probably is, yes
[11:28]<zyccus>we just don't know what it is
[11:29]<zyccus>something like CellValidating
[11:29]<gunzyffrvravycs>Well I have that
[11:29]<gunzyffrvravycs>But it doesnt prevent it
[11:29]<jcynsdjcyn> CellBeginEdit Occurs when edit mode starts for the selected cell.
[11:29]<jcynsdjcyn>?
[11:30]<zyccus>GuerillaTactiks: can you paste your CellValidating implementation?
[11:30]<gunzyffrvravycs>Okay
[11:30]<jcynsdjcyn>oh, CellBeginEdit is called before they actually make any changes :\
[11:31]<gunzyffrvravycs>No wait, I have commented outthe cell validating
[11:31]<gunzyffrvravycs>Im using the row validating
[11:31]<zyccus>8)
[11:31]<gunzyffrvravycs>Here (row validating) - http://rafb.net/paste/results/YtL2d459.html
[11:32]<jcynsdjcyn>VB.Net? xP
[11:32]<gunzyffrvravycs>2005
[11:33]<gunzyffrvravycs>The .net channels are dead :(
[11:33]<zyccus>GuerillaTactiks: which cell number is the problem in?
[11:33]<gunzyffrvravycs>4
[11:33]<gunzyffrvravycs>Because 0,1 are hidden
[11:33]<zyccus>hmm
[11:33]<zyccus>well, your RowValidating thing doesn't seem to be called - going by that stack trace
[11:34]<gunzyffrvravycs>Yep true, its only called when the value is over 0
[11:34]<gunzyffrvravycs>-1,a bc etc launches the error
[11:35]<zyccus>is your rowvalidating method called when you edit other cells?
[11:35]<gunzyffrvravycs>Its called for every cell, even for the one in question (but only if u type 0 or more)
[11:36]<zyccus>I see, so it's later..
[11:36]<zyccus>what if you re-enable cellvalidating? does that get called?
[11:36]<gunzyffrvravycs>Yep something launches the error before it get to that code
[11:37]<gunzyffrvravycs>Cell validating messes everything up but Ill try and enable it and write something useless to see if it happens AFTER cell validating
[11:37]<gunzyffrvravycs>And before row
[11:38]<zyccus>ok
[11:39]<zyccus>when moving from cell to cell...
[11:39]<gunzyffrvravycs>Yep sure enough, cell validating comes BEFORE error
[11:39]<gunzyffrvravycs>So I wonder what this means
[11:40]<gunzyffrvravycs>I think I have an idea
[11:40]<gunzyffrvravycs>There is a rows collection right
[11:41]<gunzyffrvravycs>When u add a new row, it creates a new row that is type safe
[11:41]<gunzyffrvravycs>But doesnt add that row to the datasource yet
[11:42]<gunzyffrvravycs>So when I edit a cell, and type "a" it must try and push this into the temp row (even tho its not added to datasource yet - will be after row validation)
[11:42]<zgzzcygnv>wow
[11:42]<zgzzcygnv>kog
[11:42]<zgzzcygnv>you there?
[11:42]<zgzzcygnv>we just had an earthquake
[11:42]<kjr>I noticed
[11:42]<zgzzcygnv>dunno if you felt
[11:43]<zgzzcygnv>my building is still kind of quivering
[11:43]<kjr>I did
[11:43]<gunzyffrvravycs>And it shows error as the type of cell doesnt match with what I typed
[11:43]<kjr>I was just wondering if my chair was being weird, or if that was an EQ
[11:43]<zgzzcygnv>my monitors started shaking back and forth
[11:43]<kjr>sure as hell felt like an earthquake
[11:43]<zyccus>GuerillaTactiks: Moving from cell to cell: Cell Leave, Cell Validating, Cell EndEdit, Cell Enter, Cell BeginEdit
[11:43]<gunzyffrvravycs>Off the topic -- where is this quake?
[11:43]<zyccus>GuerillaTactiks: so you could try implementing Cell Leave
[11:43]<zgzzcygnv>portland oregon
[11:43]<zgzzcygnv>in the USA
[11:43]<jcynsdjcyn>It's a formatting error, isn't it?
[11:44]<kjr>GuerillaTactiks: topic? pfft, who cares about topic
[11:44]<gunzyffrvravycs>No my topic
[11:44]<gunzyffrvravycs>I was talking about the prog problem







