Click here to Skip to main content
15,921,203 members
Home / Discussions / C#
   

C#

 
GeneralRe: Testing whether class 1 implements an interface found in class 2 Pin
Colin Angus Mackay29-Mar-07 21:07
Colin Angus Mackay29-Mar-07 21:07 
GeneralRe: Testing whether class 1 implements an interface found in class 2 Pin
Pete O'Hanlon29-Mar-07 22:27
mvePete O'Hanlon29-Mar-07 22:27 
Question[Message Deleted] Pin
R_L_H29-Mar-07 8:32
R_L_H29-Mar-07 8:32 
AnswerRe: How can I check to see if a file is being accessed by another process? Pin
Vasudevan Deepak Kumar29-Mar-07 9:03
Vasudevan Deepak Kumar29-Mar-07 9:03 
GeneralRe: How can I check to see if a file is being accessed by another process? Pin
Not Active29-Mar-07 9:25
mentorNot Active29-Mar-07 9:25 
GeneralRe: How can I check to see if a file is being accessed by another process? Pin
Vasudevan Deepak Kumar29-Mar-07 12:13
Vasudevan Deepak Kumar29-Mar-07 12:13 
QuestionHELP NEEDED - DCOM Server in C#? Pin
r6yamaha29-Mar-07 8:16
r6yamaha29-Mar-07 8:16 
QuestionProblem using ListView control? Pin
Khoramdin29-Mar-07 8:10
Khoramdin29-Mar-07 8:10 
Hello everyone,

I have a ListView control which is populated with a large number of data (Many rows). As the result of large number of rows I have to use the scrollbar to see the entire rows. I am searching and selecting row of the ListView programmatically. The following code temonstrate this:

// Call FindItemWithText and Items.IndexOf to search for the item.<br />
ListViewItem foundItem = listView4.FindItemWithText(boxSearch.Text);<br />
int foundItemIndex = listView4.Items.IndexOf(foundItem);<br />
<br />
if (foundItem != null)<br />
{<br />
MessageBox.Show("The Item has already been registered.");<br />
listView4.Focus();<br />
listView4.Items[foundItemIndex].Selected = true;<br />
// Focuse to the selected Item. "This line is doing NOTHING?!!!"<br />
listView4.Items[foundItemIndex].Focused = true;<br />
}<br />
else<br />
{<br />
MessageBox.Show("The Item has NOT been registered.");<br />
// Register the item.<br />
}<br />


Unfortunitly, if the selected row is not in the user's ListView, it can go without notice. Therefore, I would like to move the rows which are visiable in the ListView in order for the user to see the programmatically selected Item. I have been under impression that the following code do the job:

listView4.Items[foundItemIndex].Focused = true;

but unfortunatly, when I add it to the above code it practically does NOTHING.

Can anyone be kind enough to tell me how this can be achieved?

Thank you very much and have a great day.

Khoramdin
AnswerRe: Problem using ListView control? Pin
kubben29-Mar-07 8:19
kubben29-Mar-07 8:19 
QuestionHow to install the IE plugin from DLL Pin
Nadia Monalisa29-Mar-07 7:59
Nadia Monalisa29-Mar-07 7:59 
QuestionCan I create an array or List&amp;lt;&amp;gt; of class properties? [modified] Pin
Member 9629-Mar-07 7:38
Member 9629-Mar-07 7:38 
AnswerRe: Can I create an array or List of class properties? Pin
Not Active29-Mar-07 7:58
mentorNot Active29-Mar-07 7:58 
GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 8:09
Member 9629-Mar-07 8:09 
GeneralRe: Can I create an array or List of class properties? Pin
Not Active29-Mar-07 8:28
mentorNot Active29-Mar-07 8:28 
GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 8:58
Member 9629-Mar-07 8:58 
GeneralRe: Can I create an array or List of class properties? Pin
Not Active29-Mar-07 9:22
mentorNot Active29-Mar-07 9:22 
GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 10:02
Member 9629-Mar-07 10:02 
AnswerRe: Can I create an array or List of class properties? Pin
led mike29-Mar-07 8:13
led mike29-Mar-07 8:13 
GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 8:19
Member 9629-Mar-07 8:19 
GeneralRe: Can I create an array or List of class properties? Pin
led mike29-Mar-07 8:30
led mike29-Mar-07 8:30 
GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 8:59
Member 9629-Mar-07 8:59 
AnswerRe: Can I create an array or List of class properties? Pin
Leslie Sanford29-Mar-07 10:41
Leslie Sanford29-Mar-07 10:41 
GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 10:51
Member 9629-Mar-07 10:51 
QuestionQuick Question Pin
Ennis Ray Lynch, Jr.29-Mar-07 7:14
Ennis Ray Lynch, Jr.29-Mar-07 7:14 
AnswerRe: Quick Question Pin
kubben29-Mar-07 7:26
kubben29-Mar-07 7:26 

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.