Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hai i'm newbie in .net.
i use gridcontrol from devexpress 11.1
my code can display row but when i try to edit value in gridview, it make error..
i don't understand, why in my visual studio 2010, i can't get error..but when i create to setup.exe (deployment project). i get this error?? :(

http://s17.postimage.org/pay89wyan/griderror.png[^]

this my code to set gridview
VB
GridControl2.DataSource = GetDataSource()
        With GridView2
            .Columns("ItemPrice").DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric
            .Columns("ItemPrice").DisplayFormat.FormatString = "c0"
            .Columns("ItemDisc").DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric
            .Columns("ItemDisc").DisplayFormat.FormatString = "c0"
            .RefreshData()
        End With



need help...thx :)
Posted
Updated 9-May-12 8:53am
v2

1 solution

Isn't this obvious? Of course, a starting index larger than the length could not possibly make sense.

Now, about fixing it… This is not in the code you show. Look for the call to String.Substring. However, the approach is wrong. Run it under debugger; it will show you exact point where the exception was thrown.

—SA
 
Share this answer
 
Comments
fjdiewornncalwe 9-May-12 15:00pm    
+5. Of course...
Anindya6023 9-May-12 15:07pm    
but i get this error, when i deploy this form. i don't understand why? can you tell more detail?

thx
fjdiewornncalwe 9-May-12 15:13pm    
Your error will have nothing to do with your deployment. Use your debugger (F5) and you will encounter the error. Visual Studio will then show you where the error has occured.
Anindya6023 9-May-12 15:21pm    
i didn't get error from my debbuger.it make me confused..:(
Sergey Alexandrovich Kryukov 9-May-12 15:51pm    
Check up all the debugger's settings under [Main Menu] -> Debug -> Exceptions. Something might be disabled.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900