Click here to Skip to main content
16,006,442 members
Home / Discussions / C#
   

C#

 
GeneralRe: Question about how Sockets work [modified] Pin
Jordanwb24-Mar-08 6:49
Jordanwb24-Mar-08 6:49 
QuestionChange text of messageBox buttons Pin
pcaeiro22-Mar-08 7:19
pcaeiro22-Mar-08 7:19 
GeneralRe: Change text of messageBox buttons Pin
Gareth H22-Mar-08 9:15
Gareth H22-Mar-08 9:15 
GeneralRe: Change text of messageBox buttons Pin
Giorgi Dalakishvili22-Mar-08 9:53
mentorGiorgi Dalakishvili22-Mar-08 9:53 
GeneralRe: Change text of messageBox buttons Pin
Pete O'Hanlon22-Mar-08 9:59
mvePete O'Hanlon22-Mar-08 9:59 
GeneralRe: Change text of messageBox buttons Pin
CPallini23-Mar-08 0:41
mveCPallini23-Mar-08 0:41 
GeneralRe: Change text of messageBox buttons Pin
pcaeiro23-Mar-08 1:42
pcaeiro23-Mar-08 1:42 
Questioncombo box moving and adding items. Pin
steve_rm22-Mar-08 7:15
steve_rm22-Mar-08 7:15 
Hello,

VS 2008

I am using a binding source that is bound to a dataset with one table called AddressBook.

The binding source is bound to a combo box.

The address book table consists of 2 columns (number, name). There will be no duplicate phone numbers, as if it is already in the combo box it will
just set it to index zero.

This is just a simple table as I want to display the recent phone numbers.

When someone enters a phone number it will add it to the combo box, and position the number as index 0 (most recent).

However, if the phone number is already stored, then it should move it to index 0.

So this just a simple combo box that displays the most recent calls that are made. Just like any mobile phone.

This is my code so far. However, I am having a problem with moving the item to the top. is there some way this could be done better.

Many thanks for any advice,

Steve

<br />
      //Item doesn't exist so add it and display as the first item<br />
            if (!this.bsRedialedNumbers.Contains(this.txtDetails.Text))<br />
            {<br />
                DataRowView drv;<br />
                drv = (DataRowView)this.bsRedialedNumbers.AddNew();<br />
                drv["Name"] = this.txtDisplay.Text;<br />
                drv["Number"] = this.txtDisplay.Text;<br />
                <br />
                //drv.EndEdit();<br />
            }<br />
            else //Item already exists so just move it to the top of the list.<br />
            {<br />
                //Move the item to the top of the combo box.<br />
                DataRowView drv;<br />
                drv = (DataRowView)this.bsRedialedNumbers;<br />
                int index = this.bsRedialedNumbers.Find("Number", txtDetails.Text);       <br />
            }<br />

QuestionSearching System Drive for a file Pin
md.mostafiz22-Mar-08 4:08
md.mostafiz22-Mar-08 4:08 
GeneralRe: Searching System Drive for a file Pin
Colin Angus Mackay22-Mar-08 4:18
Colin Angus Mackay22-Mar-08 4:18 
GeneralRe: Searching System Drive for a file Pin
MNFlyer22-Mar-08 4:19
MNFlyer22-Mar-08 4:19 
Generalusing this as synchronization object Pin
George_George22-Mar-08 3:52
George_George22-Mar-08 3:52 
GeneralRe: using this as synchronization object [modified] Pin
girm22-Mar-08 4:01
girm22-Mar-08 4:01 
GeneralRe: using this as synchronization object Pin
George_George22-Mar-08 4:03
George_George22-Mar-08 4:03 
GeneralRe: using this as synchronization object Pin
Colin Angus Mackay22-Mar-08 4:09
Colin Angus Mackay22-Mar-08 4:09 
GeneralRe: using this as synchronization object Pin
George_George23-Mar-08 2:53
George_George23-Mar-08 2:53 
GeneralRe: using this as synchronization object Pin
girm22-Mar-08 4:09
girm22-Mar-08 4:09 
GeneralRe: using this as synchronization object Pin
George_George23-Mar-08 2:54
George_George23-Mar-08 2:54 
GeneralRe: using this as synchronization object Pin
girm24-Mar-08 8:19
girm24-Mar-08 8:19 
GeneralRe: using this as synchronization object Pin
George_George24-Mar-08 19:01
George_George24-Mar-08 19:01 
GeneralRe: using this as synchronization object Pin
Colin Angus Mackay22-Mar-08 4:06
Colin Angus Mackay22-Mar-08 4:06 
GeneralRe: using this as synchronization object Pin
George_George23-Mar-08 2:51
George_George23-Mar-08 2:51 
GeneralRe: using this as synchronization object Pin
Colin Angus Mackay23-Mar-08 4:06
Colin Angus Mackay23-Mar-08 4:06 
GeneralRe: using this as synchronization object Pin
George_George23-Mar-08 4:17
George_George23-Mar-08 4:17 
QuestionHow do I create a subclass dynamically from a base class? [modified] Pin
loderxp22-Mar-08 2:57
loderxp22-Mar-08 2: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.