Click here to Skip to main content
15,896,118 members
Home / Discussions / C#
   

C#

 
QuestionHow To Add Grid To mobil Application By Spesify Propert Pin
Thaer Hamael18-Jul-07 23:28
Thaer Hamael18-Jul-07 23:28 
QuestionCan some bright person solve this ? I am lost with this....so strange Pin
pierrecenti18-Jul-07 23:27
pierrecenti18-Jul-07 23:27 
AnswerRe: Can some bright person solve this ? I am lost with this....so strange Pin
gumi_r@msn.com19-Jul-07 1:37
gumi_r@msn.com19-Jul-07 1:37 
QuestionIndex error... Pin
Support12318-Jul-07 23:17
Support12318-Jul-07 23:17 
AnswerRe: Index error... Pin
Support12318-Jul-07 23:24
Support12318-Jul-07 23:24 
GeneralRe: Index error... Pin
Luc Pattyn18-Jul-07 23:30
sitebuilderLuc Pattyn18-Jul-07 23:30 
GeneralRe: Index error... Pin
Support12318-Jul-07 23:40
Support12318-Jul-07 23:40 
AnswerRe: Index error... Pin
Colin Angus Mackay18-Jul-07 23:30
Colin Angus Mackay18-Jul-07 23:30 
Support123 wrote:
Convert.ToString(lvTestA.SelectedItems[0].SubItems[0].Text.Trim())


See all that - I'd separate that out into lots of lines as it makes it much easier to debug. This is the only code that appears to use indexes so I'm guessing it is here that the problem lies.

selectedItems = lvTestA.SelectedItems;
firstItem = selectedItems[0];
subItems = firstItem.SubItems;
firstSubItem = subItems[0];
string theText = firstSubItem.Text;
string theTrimmedText = theText.Trim();
string convertedText = Convert.ToString(theTrimmedText);
TestD.LoadData(2,convertedText);

NOTE: I've left out the class names for most of the above - you'll have to fill that in.

The above code can now be much more easily debugged and stepped through. You can then see exactly which line has the problem - And you can watch the values so you can see exactly what it is doing.

This should help you narrow down your problem.


Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...

"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."


My website

AnswerRe: Index error... Pin
Thaer Hamael19-Jul-07 0:04
Thaer Hamael19-Jul-07 0:04 
GeneralRe: Index error... Pin
Martin#19-Jul-07 0:11
Martin#19-Jul-07 0:11 
GeneralRe: Index error... Pin
Luc Pattyn19-Jul-07 0:37
sitebuilderLuc Pattyn19-Jul-07 0:37 
GeneralRe: Index error... Pin
Martin#19-Jul-07 0:55
Martin#19-Jul-07 0:55 
Questionhow to copy database ? Pin
help as an alias18-Jul-07 22:55
help as an alias18-Jul-07 22:55 
AnswerRe: how to copy database ? Pin
Colin Angus Mackay18-Jul-07 23:21
Colin Angus Mackay18-Jul-07 23:21 
GeneralRe: how to copy database ? Pin
help as an alias18-Jul-07 23:35
help as an alias18-Jul-07 23:35 
GeneralRe: how to copy database ? Pin
Colin Angus Mackay18-Jul-07 23:49
Colin Angus Mackay18-Jul-07 23:49 
QuestionThreading concept.. Pin
Ron.S18-Jul-07 22:40
Ron.S18-Jul-07 22:40 
AnswerRe: Threading concept.. Pin
Eduard Keilholz18-Jul-07 22:47
Eduard Keilholz18-Jul-07 22:47 
GeneralRe: Threading concept.. Pin
Ron.S18-Jul-07 22:58
Ron.S18-Jul-07 22:58 
AnswerRe: Threading concept.. Pin
Eduard Keilholz19-Jul-07 0:57
Eduard Keilholz19-Jul-07 0:57 
GeneralRe: Threading concept.. Pin
Ron.S19-Jul-07 2:41
Ron.S19-Jul-07 2:41 
GeneralRe: Threading concept.. Pin
Eduard Keilholz19-Jul-07 3:16
Eduard Keilholz19-Jul-07 3:16 
GeneralRe: Threading concept.. Pin
Ron.S19-Jul-07 19:39
Ron.S19-Jul-07 19:39 
GeneralRe: Threading concept.. Pin
Ron.S19-Jul-07 20:30
Ron.S19-Jul-07 20:30 
QuestionCustom Tab Control Pin
T.EDY18-Jul-07 22:39
T.EDY18-Jul-07 22:39 

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.