Click here to Skip to main content
15,919,132 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to unblock..... Pin
obelisk2925-Nov-03 6:05
obelisk2925-Nov-03 6:05 
GeneralRe: How to unblock..... Pin
Søren Christensen25-Nov-03 10:59
Søren Christensen25-Nov-03 10:59 
GeneralSerialization\Remoting problem Pin
rumickyd25-Nov-03 3:45
rumickyd25-Nov-03 3:45 
GeneralRe: Serialization\Remoting problem Pin
obelisk2925-Nov-03 6:08
obelisk2925-Nov-03 6:08 
GeneralRe: Serialization\Remoting problem Pin
rumickyd25-Nov-03 6:26
rumickyd25-Nov-03 6:26 
GeneralRe: Serialization\Remoting problem Pin
obelisk2925-Nov-03 6:34
obelisk2925-Nov-03 6:34 
GeneralDataGrid & Relations Pin
mgaerber25-Nov-03 2:36
mgaerber25-Nov-03 2:36 
GeneralRe: DataGrid & Relations Pin
Heath Stewart25-Nov-03 3:35
protectorHeath Stewart25-Nov-03 3:35 
First, never concatenate strings like that - you incur serious performance penalties. In actuality, the CLR is creating a string to hold the first part, then creates a second string long enough to hold the first part and the second part, then copies each character from the first and second parts into the new string. Then it repeats this process with a third string. Those other two strings hang around until the GC picks them up. Instead, use String.Concat (string.Concat("VERNR = '", drv["VERNR"] as string, "'") or String.Format (string.Format("VERNR = '{0}'", drv["VERNR"])), which uses the StringBuilder internally.

Second, if you're using the code we talked about earlier, then the problem would seem to be in your call to get the CurrencyManager. If you are passing the Relation to the child's DataGrid.DataSource for the parent-child view, then you must pass that (and no DataMember) when using the BindingContext property. See the docs for the BindingContext, which also mentions this constraint.

Also, you should debug your code and see if you're getting a value for drv["VERNR"], which you should also cast to a string to be safe, or use the as keyword as I did above to be even more safe (it casts but doesn't throw an exception if the cast fails, it just returns null).

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: DataGrid & Relations Pin
mgaerber25-Nov-03 20:34
mgaerber25-Nov-03 20:34 
GeneralRe: DataGrid & Relations Pin
Heath Stewart26-Nov-03 2:23
protectorHeath Stewart26-Nov-03 2:23 
GeneralRe: DataGrid & Relations Pin
Anonymous26-Nov-03 22:15
Anonymous26-Nov-03 22:15 
GeneralThe csc.exe compiler - member variables Pin
tom7624-Nov-03 23:54
tom7624-Nov-03 23:54 
GeneralRe: I've changed my code and it works - this is awful! Pin
tom7625-Nov-03 0:33
tom7625-Nov-03 0:33 
GeneralAh, Properties! Pin
tom7625-Nov-03 0:54
tom7625-Nov-03 0:54 
GeneralRe: Ah, Properties! Pin
Heath Stewart25-Nov-03 3:16
protectorHeath Stewart25-Nov-03 3:16 
GeneralRe: Ah, Properties! Pin
tom7625-Nov-03 4:13
tom7625-Nov-03 4:13 
GeneralRe: Ah, Properties! Pin
leppie25-Nov-03 7:23
leppie25-Nov-03 7:23 
GeneralC# hook API Pin
Anonymous24-Nov-03 22:00
Anonymous24-Nov-03 22:00 
GeneralRe: C# hook API Pin
AJ12324-Nov-03 23:29
AJ12324-Nov-03 23:29 
GeneralWindows XP Icons Pin
David M. Kean24-Nov-03 18:42
David M. Kean24-Nov-03 18:42 
GeneralRe: Windows XP Icons Pin
John R. Shaw24-Nov-03 19:39
John R. Shaw24-Nov-03 19:39 
GeneralRe: Windows XP Icons Pin
Heath Stewart25-Nov-03 3:05
protectorHeath Stewart25-Nov-03 3:05 
QuestionProperty as an array? Pin
LenHodder24-Nov-03 15:37
LenHodder24-Nov-03 15:37 
AnswerRe: Property as an array? Pin
Heath Stewart24-Nov-03 15:56
protectorHeath Stewart24-Nov-03 15:56 
GeneralRe: Property as an array? Pin
LenHodder24-Nov-03 16:10
LenHodder24-Nov-03 16:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.