Click here to Skip to main content
15,886,199 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: how to display the numbers like 1,2,3,4...? Pin
Tom Deketelaere11-Jun-08 21:14
professionalTom Deketelaere11-Jun-08 21:14 
AnswerRe: how to display the numbers like 1,2,3,4...? Pin
ChandraRam11-Jun-08 23:09
ChandraRam11-Jun-08 23:09 
AnswerRe: how to display the numbers like 1,2,3,4...? Pin
Rupesh Kumar Swami11-Jun-08 23:39
Rupesh Kumar Swami11-Jun-08 23:39 
Questionhow to do gridview edit and delete option? Pin
gandhi194711-Jun-08 17:13
gandhi194711-Jun-08 17:13 
AnswerRe: how to do gridview edit and delete option? Pin
Christian Graus11-Jun-08 17:25
protectorChristian Graus11-Jun-08 17:25 
QuestionMulti Column List box Pin
New_Coder11-Jun-08 12:30
New_Coder11-Jun-08 12:30 
AnswerRe: Multi Column List box Pin
Christian Graus11-Jun-08 12:36
protectorChristian Graus11-Jun-08 12:36 
AnswerRe: Multi Column List box Pin
Rupesh Kumar Swami12-Jun-08 2:39
Rupesh Kumar Swami12-Jun-08 2:39 
hi,
try something like

first of all make a structure
this is the code for the structure.

Private Structure ComboMultipleData<br />
    Dim FILED_NAME As String<br />
    Dim TABLE_NAME As String<br />
      Public Sub New( ByVal FieldVal As String, ByVal TableVal As String)<br />
     <br />
        FILED_NAME = FieldVal <br />
        TABLE_NAME = TableVal <br />
    End Sub<br />
<br />
    Public Overrides Function ToString() As String<br />
        Return Me.FILED_NAM<br />
    End Function<br />
End Structure



And the code to put this in the combobox and translate it when the user selects an item from the list.

Private Sub frmDemo_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
    'for the purposes of this demo I am hard coding the entries<br />
    With REPORT_CHOICE<br />
       .Items.Add(New ComboMultipleData( "FieldVal1", "Table 1"))<br />
       .Items.Add(New ComboMultipleData( "FieldVal2", "Table 2"))<br />
    .Items.Add(New ComboMultipleData( "FieldVal3", "Table 3"))<br />
    End With<br />
  <br />
End Sub<br />
<br />
Private Sub REPORT_CHOICE_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles REPORT_CHOICE.SelectedIndexChanged<br />
    'in this case simply put the data up into the available fields<br />
    Dim acc As ComboMultipleData= CType(cboAccounts.SelectedItem, ComboMultipleData)<br />
    <br />
    txtFieldName.Text = acc.FILED_NAME<br />
    txtTableName.Text = acc.TABLE_NAME<br />
End Sub


hope this helps

Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)

My Company

QuestionIgnoring Text Entered into a ComboBox Pin
td298511-Jun-08 12:25
td298511-Jun-08 12:25 
AnswerRe: Ignoring Text Entered into a ComboBox Pin
BDEz (Member 3919223)12-Jun-08 10:18
BDEz (Member 3919223)12-Jun-08 10:18 
QuestionOT: remove write protection of a file via vbs Pin
stephan_00711-Jun-08 10:41
stephan_00711-Jun-08 10:41 
AnswerRe: OT: remove write protection of a file via vbs Pin
jzonthemtn11-Jun-08 10:56
jzonthemtn11-Jun-08 10:56 
GeneralRe: OT: remove write protection of a file via vbs Pin
stephan_00711-Jun-08 11:17
stephan_00711-Jun-08 11:17 
QuestionVbscript Class Problem Pin
SteveS83200111-Jun-08 5:25
SteveS83200111-Jun-08 5:25 
AnswerRe: Vbscript Class Problem Pin
SteveS83200111-Jun-08 5:52
SteveS83200111-Jun-08 5:52 
QuestionDraw a Rhombus Pin
Mohammad Al Hoss11-Jun-08 5:11
Mohammad Al Hoss11-Jun-08 5:11 
AnswerRe: Draw a Rhombus PinPopular
Christian Graus11-Jun-08 5:23
protectorChristian Graus11-Jun-08 5:23 
AnswerRe: Draw a Rhombus PinPopular
Christian Graus11-Jun-08 6:01
protectorChristian Graus11-Jun-08 6:01 
Questionform question Pin
sa_runner11-Jun-08 4:59
sa_runner11-Jun-08 4:59 
AnswerRe: form question Pin
Mohammad Al Hoss11-Jun-08 5:09
Mohammad Al Hoss11-Jun-08 5:09 
AnswerRe: form question Pin
John_Adams11-Jun-08 5:12
John_Adams11-Jun-08 5:12 
AnswerRe: form question Pin
sa_runner11-Jun-08 5:46
sa_runner11-Jun-08 5:46 
Questionchatting in lan Pin
pekhaleyogesh11-Jun-08 3:59
pekhaleyogesh11-Jun-08 3:59 
AnswerRe: chatting in lan Pin
John Ad11-Jun-08 4:16
John Ad11-Jun-08 4:16 
AnswerRe: chatting in lan Pin
~Khatri Mitesh~11-Jun-08 4:26
~Khatri Mitesh~11-Jun-08 4: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.