Click here to Skip to main content
16,004,882 members
Home / Discussions / C#
   

C#

 
GeneralRe: lock statements - backstage... Pin
Shy Agam19-Dec-06 19:49
Shy Agam19-Dec-06 19:49 
GeneralRe: lock statements - backstage... Pin
Tarakeshwar Reddy19-Dec-06 19:59
professionalTarakeshwar Reddy19-Dec-06 19:59 
GeneralRe: lock statements - backstage... Pin
Shy Agam19-Dec-06 20:23
Shy Agam19-Dec-06 20:23 
GeneralRe: lock statements - backstage... Pin
S. Senthil Kumar19-Dec-06 21:17
S. Senthil Kumar19-Dec-06 21:17 
GeneralRe: lock statements - backstage... Pin
Shy Agam19-Dec-06 21:25
Shy Agam19-Dec-06 21:25 
AnswerRe: lock statements - backstage... Pin
Mairaaj Khan19-Dec-06 21:09
professionalMairaaj Khan19-Dec-06 21:09 
AnswerRe: lock statements - backstage... Pin
Guffa19-Dec-06 23:22
Guffa19-Dec-06 23:22 
Questiondeletion in listview Pin
dsl/fahk19-Dec-06 18:55
dsl/fahk19-Dec-06 18:55 
i have created a list view and have ways to put in information, edit it, and delete one at a time. But i cannot get it to delete more than one at a time. My code is:
if (listView1.SelectedItems.Count > 1)
            {
                int SelectedItemCount = listView1.SelectedItems.Count;
                int usableSelectedItemCount = SelectedItemCount - 1;
                if (MessageBox.Show("Are you sure you want to delete these " + SelectedItemCount + " items?", "Confirm Delete",
 MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2, 0) == DialogResult.Yes)
                {
                    //string deletion = listView1.SelectedItems;
                    for (int Removed = 0; Removed < usableSelectedItemCount; Removed++)
                    {
                        listView1.Items.Remove(listView1.SelectedItems[Removed]);
                    }
                }
                else if (listView1.SelectedItems.Count == 1)
                {
                    if (MessageBox.Show("Are you sure you want to delete?", "Confirm Delete", MessageBoxButtons.YesNo,
 MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2, 0) == DialogResult.Yes) 
                    {
                        listView1.Items.Remove(listView1.SelectedItems[0]);
                    }
                }

Did i mess up by approaching the for loop incorrectly? What can i do to fix it?

Thanks for the help.
(and sorry about the long code)
AnswerRe: deletion in listview Pin
jdkulkarni19-Dec-06 19:21
jdkulkarni19-Dec-06 19:21 
QuestionGetting reference of calling Assembly. Pin
Syed Muhammad Kamran19-Dec-06 18:45
Syed Muhammad Kamran19-Dec-06 18:45 
GeneralRe: Getting reference of calling Assembly. Pin
Guffa19-Dec-06 19:17
Guffa19-Dec-06 19:17 
AnswerRe: Getting reference of calling Assembly. Pin
Nader Elshehabi19-Dec-06 20:43
Nader Elshehabi19-Dec-06 20:43 
GeneralRe: Getting reference of calling Assembly. [modified] Pin
Syed Muhammad Kamran19-Dec-06 20:53
Syed Muhammad Kamran19-Dec-06 20:53 
GeneralRe: Getting reference of calling Assembly. Pin
Nader Elshehabi21-Dec-06 0:06
Nader Elshehabi21-Dec-06 0:06 
QuestionPlz help me How client should identify Server ? Pin
Sanjib Raj19-Dec-06 17:43
Sanjib Raj19-Dec-06 17:43 
AnswerRe: Plz help me How client should identify Server ? Pin
Tarakeshwar Reddy19-Dec-06 18:19
professionalTarakeshwar Reddy19-Dec-06 18:19 
QuestionSharing data between remoting and app layers Pin
drinkingbird19-Dec-06 17:27
drinkingbird19-Dec-06 17:27 
AnswerRe: Sharing data between remoting and app layers Pin
Chris Buckett22-Dec-06 3:05
Chris Buckett22-Dec-06 3:05 
QuestionBIOS interrupt call from c# Pin
Niiiissssshhhhhuuuuu19-Dec-06 16:47
Niiiissssshhhhhuuuuu19-Dec-06 16:47 
AnswerRe: BIOS interrupt call from c# Pin
Nader Elshehabi19-Dec-06 19:51
Nader Elshehabi19-Dec-06 19:51 
GeneralRe: BIOS interrupt call from c# Pin
Niiiissssshhhhhuuuuu19-Dec-06 20:15
Niiiissssshhhhhuuuuu19-Dec-06 20:15 
GeneralRe: BIOS interrupt call from c# Pin
Nader Elshehabi19-Dec-06 20:37
Nader Elshehabi19-Dec-06 20:37 
GeneralRe: BIOS interrupt call from c# Pin
Niiiissssshhhhhuuuuu20-Dec-06 1:09
Niiiissssshhhhhuuuuu20-Dec-06 1:09 
GeneralRe: BIOS interrupt call from c# Pin
Nader Elshehabi20-Dec-06 23:52
Nader Elshehabi20-Dec-06 23:52 
Questiontransfering information from form to form Pin
dsl/fahk19-Dec-06 15:57
dsl/fahk19-Dec-06 15:57 

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.