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

C#

 
QuestionXML and Generic List Pin
satyaki mishra12-Sep-07 19:25
satyaki mishra12-Sep-07 19:25 
AnswerRe: XML and Generic List Pin
Pete O'Hanlon12-Sep-07 21:59
mvePete O'Hanlon12-Sep-07 21:59 
Question[C#] PageBreak in Excel Pin
kurisutofuJP12-Sep-07 19:22
kurisutofuJP12-Sep-07 19:22 
QuestionGet Value of Arbitrary ListBox Item Pin
Sukhjinder_K12-Sep-07 18:55
Sukhjinder_K12-Sep-07 18:55 
AnswerRe: Get Value of Arbitrary ListBox Item Pin
Pete O'Hanlon12-Sep-07 22:12
mvePete O'Hanlon12-Sep-07 22:12 
GeneralRe: Get Value of Arbitrary ListBox Item Pin
Sukhjinder_K12-Sep-07 22:29
Sukhjinder_K12-Sep-07 22:29 
GeneralRe: Get Value of Arbitrary ListBox Item Pin
Pete O'Hanlon12-Sep-07 22:39
mvePete O'Hanlon12-Sep-07 22:39 
GeneralSET Value of Arbitrary ListBox Item Pin
Sukhjinder_K12-Sep-07 23:33
Sukhjinder_K12-Sep-07 23:33 
Sorry about confusing anybody. Here is what I want

My Playlist is displayed in ListBox named list
with contents
1. SongABc
2. Song Dev
3. Vid34
4. Clip5
5. ABC and so on

I need to delete an item from that
for that I'm doing

this.list.Items.RemoveAt(index);

Now I need to update the IndexNumber of each entry in the Playlist so that after deleting "Vid34"

My list shows

1. SongABc
2. Song Dev
3. Clip5
4. ABC and so on

I can READ ALL items of list as
IEnumerator enm = this.list.Items.GetEnumerator();

int i = 0;
for(i = 0; i < index; i ++ )
enm.MoveNext();

//Now I'm at the place where I Delete the Entry
//all the Following Items need to update their Numerical Index Decremented by one
for(i = index; i < list.Items.Count; i ++)
{
String entry = enm.Current.ToString();
String newVal = getNewVal(entry); // Strip Index Value so that "4. Clip5 becomes just Clip5"

//Here I need to set the Current Entry with new Val something like

this.list.itemAt(i) = newVal; // But no such method exists
neither can I do
enm.Current = newVal; // Because it is a readonly property
}

I can clear my playlist and readd everything but that would be waste of resources
GeneralRe: SET Value of Arbitrary ListBox Item Pin
Pete O'Hanlon12-Sep-07 23:55
mvePete O'Hanlon12-Sep-07 23:55 
GeneralRe: SET Value of Arbitrary ListBox Item Pin
Sukhjinder_K13-Sep-07 0:13
Sukhjinder_K13-Sep-07 0:13 
GeneralRe: SET Value of Arbitrary ListBox Item Pin
Pete O'Hanlon13-Sep-07 0:33
mvePete O'Hanlon13-Sep-07 0:33 
GeneralRe: SET Value of Arbitrary ListBox Item Pin
Sukhjinder_K13-Sep-07 1:59
Sukhjinder_K13-Sep-07 1:59 
AnswerRe: Get Value of Arbitrary ListBox Item Pin
pmarfleet12-Sep-07 22:15
pmarfleet12-Sep-07 22:15 
AnswerRe: Get Value of Arbitrary ListBox Item Pin
Luc Pattyn13-Sep-07 1:19
sitebuilderLuc Pattyn13-Sep-07 1:19 
QuestionPlz help me to go to a particular node in xml file Pin
P_Elza12-Sep-07 17:15
P_Elza12-Sep-07 17:15 
AnswerRe: Plz help me to go to a particular node in xml file Pin
Christian Graus12-Sep-07 18:39
protectorChristian Graus12-Sep-07 18:39 
AnswerRe: Plz help me to go to a particular node in xml file Pin
Jintal Patel12-Sep-07 19:15
Jintal Patel12-Sep-07 19:15 
AnswerRe: Plz help me to go to a particular node in xml file Pin
Nouman Bhatti12-Sep-07 19:27
Nouman Bhatti12-Sep-07 19:27 
AnswerRe: Plz help me to go to a particular node in xml file Pin
P_Elza12-Sep-07 21:52
P_Elza12-Sep-07 21:52 
QuestionSaving username and password Pin
C#Coudou12-Sep-07 15:33
C#Coudou12-Sep-07 15:33 
AnswerRe: Saving username and password Pin
Christian Graus12-Sep-07 15:50
protectorChristian Graus12-Sep-07 15:50 
QuestionReading data from a dataset with a checkedlistbox Pin
falles0112-Sep-07 15:28
falles0112-Sep-07 15:28 
AnswerRe: Reading data from a dataset with a checkedlistbox Pin
Christian Graus12-Sep-07 18:52
protectorChristian Graus12-Sep-07 18:52 
GeneralRe: Reading data from a dataset with a checkedlistbox Pin
falles0112-Sep-07 19:00
falles0112-Sep-07 19:00 
GeneralRe: Reading data from a dataset with a checkedlistbox Pin
Christian Graus13-Sep-07 3:10
protectorChristian Graus13-Sep-07 3: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.