Click here to Skip to main content
15,903,844 members
Home / Discussions / C#
   

C#

 
GeneralRe: How should I design my project to support future plug-ins? Pin
Artmansoft11-Jan-09 18:19
Artmansoft11-Jan-09 18:19 
AnswerRe: How should I design my project to support future plug-ins? Pin
Luis Alonso Ramos11-Jan-09 9:33
Luis Alonso Ramos11-Jan-09 9:33 
GeneralRe: How should I design my project to support future plug-ins? Pin
Artmansoft11-Jan-09 18:19
Artmansoft11-Jan-09 18:19 
QuestionList view in C# .net 2003 Pin
ananthvivek10-Jan-09 18:20
ananthvivek10-Jan-09 18:20 
AnswerRe: List view in C# .net 2003 Pin
ananthvivek10-Jan-09 19:57
ananthvivek10-Jan-09 19:57 
GeneralRe: List view in C# .net 2003 Pin
Wendelius10-Jan-09 21:13
mentorWendelius10-Jan-09 21:13 
GeneralRe: List view in C# .net 2003 Pin
Luis Alonso Ramos11-Jan-09 9:28
Luis Alonso Ramos11-Jan-09 9:28 
GeneralRe: List view in C# .net 2003 Pin
ananthvivek12-Jan-09 21:01
ananthvivek12-Jan-09 21:01 
I have written this code in the list view keypress and its now selecting based on the second column


private void listview1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)

{

for(int i= 0; i < listview1.Items.Count; i++)
{
if(listview1.Items[i].SubItems[1].Text.StartsWith(e.KeyChar.ToString().ToUpper()))
{
RemoveBackColor(listview1); /* Removing back color of previous selecion */
listview1.Items[i].Selected = true;
listview1.Items[i].Focused = true;
listview1.Items[i].EnsureVisible();
listview1.Items[i].BackColor = SystemColors.Highlight;
listview1.Items[i].ForeColor = SystemColors.HighlightText;
break;
}
}
e.handled = true;
}

/*Remove Back Color*/

private void RemoveBackColor(ListView LlistView)

{


int lintSelIndex = LlistView.SelectedItems.Count;

for(int lintCountIndex =0;lintCountIndex<lintSelIndex;)

{

try



{

LlistView.SelectedItems[lintCountIndex].BackColor = Color.White;

LlistView.SelectedItems[lintCountIndex].ForeColor = Color.Black;

LlistView.SelectedItems[lintCountIndex].Selected = false;


}

catch(Exception lobjException)

{

return;

}

}

}



its works and suppressed the selection based on the first column at all. But the problem now is that When I moved to the new item (based on the typing in the listview) and press Shift and Down key together,all the items from the first item are getting highlighted.

May be dotnet still thinks that the control is in the first item(so it selects from the first item).

how to overcome this one?
GeneralRe: List view in C# .net 2003 Pin
Luis Alonso Ramos13-Jan-09 4:21
Luis Alonso Ramos13-Jan-09 4:21 
QuestionI need webservice check user from other Database for login Pin
haibec10-Jan-09 17:02
haibec10-Jan-09 17:02 
AnswerRe: I need webservice check user from other Database for login Pin
Reza Raad10-Jan-09 17:48
Reza Raad10-Jan-09 17:48 
GeneralRe: I need webservice check user from other Database for login Pin
haibec10-Jan-09 18:00
haibec10-Jan-09 18:00 
AnswerRe: I need webservice check user from other Database for login Pin
Reza Raad10-Jan-09 18:06
Reza Raad10-Jan-09 18:06 
GeneralRe: I need webservice check user from other Database for login Pin
haibec11-Jan-09 4:44
haibec11-Jan-09 4:44 
QuestionStarting programming at age 28 Pin
CrimeanTurtle200810-Jan-09 11:52
CrimeanTurtle200810-Jan-09 11:52 
AnswerRe: Starting programming at age 28 Pin
Judah Gabriel Himango10-Jan-09 11:59
sponsorJudah Gabriel Himango10-Jan-09 11:59 
AnswerRe: Starting programming at age 28 Pin
Colin Angus Mackay10-Jan-09 12:14
Colin Angus Mackay10-Jan-09 12:14 
GeneralRe: Starting programming at age 28 Pin
CrimeanTurtle200810-Jan-09 13:00
CrimeanTurtle200810-Jan-09 13:00 
GeneralRe: Starting programming at age 28 Pin
Not Active10-Jan-09 13:09
mentorNot Active10-Jan-09 13:09 
GeneralRe: Starting programming at age 28 Pin
Colin Angus Mackay10-Jan-09 13:35
Colin Angus Mackay10-Jan-09 13:35 
GeneralRe: Starting programming at age 28 Pin
CrimeanTurtle200810-Jan-09 13:44
CrimeanTurtle200810-Jan-09 13:44 
GeneralRe: Starting programming at age 28 Pin
Colin Angus Mackay10-Jan-09 13:56
Colin Angus Mackay10-Jan-09 13:56 
GeneralRe: Starting programming at age 28 Pin
Eddy Vluggen11-Jan-09 0:21
professionalEddy Vluggen11-Jan-09 0:21 
AnswerRe: Starting programming at age 28 Pin
Not Active10-Jan-09 12:26
mentorNot Active10-Jan-09 12:26 
GeneralRe: Starting programming at age 28 Pin
CrimeanTurtle200810-Jan-09 13:01
CrimeanTurtle200810-Jan-09 13:01 

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.