Click here to Skip to main content
15,899,679 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How do we program Live chat? Pin
Syed Wayez Ahmed6-Aug-10 23:48
Syed Wayez Ahmed6-Aug-10 23:48 
GeneralRe: How do we program Live chat? Pin
Richard MacCutchan6-Aug-10 23:53
mveRichard MacCutchan6-Aug-10 23:53 
GeneralRe: How do we program Live chat? Pin
Syed Wayez Ahmed7-Aug-10 1:17
Syed Wayez Ahmed7-Aug-10 1:17 
QuestionTreeNode Add/Remove/Disable issue in vb.net 2005 Pin
Andraw Tang5-Aug-10 11:12
Andraw Tang5-Aug-10 11:12 
AnswerRe: TreeNode Add/Remove/Disable issue in vb.net 2005 Pin
Andraw Tang5-Aug-10 12:08
Andraw Tang5-Aug-10 12:08 
GeneralRe: TreeNode Add/Remove/Disable issue in vb.net 2005 Pin
Tom Deketelaere5-Aug-10 22:25
professionalTom Deketelaere5-Aug-10 22:25 
GeneralRe: TreeNode Add/Remove/Disable issue in vb.net 2005 Pin
Andraw Tang6-Aug-10 3:33
Andraw Tang6-Aug-10 3:33 
QuestionDataGridView and combobox issue Pin
mecca15-Aug-10 9:37
mecca15-Aug-10 9:37 
I have an urgent question about the datagridview and combobox column in VB2005



I am unable to show the first item in the award code field by default without selecting an item first. How can this be done?

For example CX should be shown in the blank area for the first 2 items, which shows up as blank. The 2nd issue is how can I take the data from my hidden field, which has an award code of either cd,cn,mr, etc, which is brought back in the dataset below and is on the grid but the column is just hidden. I actually need this data shown as the default in the “blank space” of the combobox. I am at a loss. So basically when I load the grid I need the award code for a specific row placed into the combo box as if it were selected for that specific row by default. So row 1 would show the following:



Row 1 would show Transfer =blank Rfa number CX08-004 Award Code=CD

Row 2 would show Transfer =blank Rfa number CX08-003 Award Code=RP

etc

etc





Below code is what I use to bind the datasource to the combo box

With grdBatchBudgetProjection ‘Dataviewgrid

With chk ‘CheckboxColumn

.DataPropertyName = "AwardCD"

.HeaderText = "Award Code"

.Width = 100

' Bind Column

.DataSource = ds3.Tables(0)

.ValueMember = "AwardID" ‘also tried AwardCD here

.DisplayMember = "AwardCD"

.DisplayStyle = DataGridViewComboBoxDisplayStyle.ComboBox

'dd or cbo, doesn't really matter for this field.

End With

.Columns.Add(chk)

End With

-----------------
I also tried the below code with no success. i just cannot see what I am doing incorrectly.

<pre>'Kludge loop to have combo box index= value returned from sql
'For iRowCount = 0 To ds2.Tables(0).Rows.Count - 1
Dim j As Integer = 0

For Each row As DataGridViewRow In grdBatchBudgetProjection.Rows
'' Dim Cell As DataGridViewComboBoxCell = DirectCast(grdBatchBudgetProjection.Item(5,j),
DataGridViewComboBoxCell)
Dim cell As DataGridViewComboBoxCell = DirectCast(grdBatchBudgetProjection.Item(5, j),
DataGridViewComboBoxCell)
cell.Value = ds2.Tables(0).Rows(j)(4).ToString
'Debug.Print(ds2.Tables(0).Rows(j)("AwardCD").ToString)
'grdBatchBudgetProjection.Rows(j).Cells(5).Value = ds2.Tables(0).Rows(j)
("AwardCD").ToString
j = j + 1
Next</pre>

Thank You for your time
Question[VB6] Problem with search data in Access database (windows form application) Pin
_ASPAle_5-Aug-10 1:22
_ASPAle_5-Aug-10 1:22 
AnswerRe: [VB6] Problem with search data in Access database (windows form application) Pin
AnnieMacD5-Aug-10 5:19
AnnieMacD5-Aug-10 5:19 
QuestionGet table field size Pin
cyberexel4-Aug-10 8:14
cyberexel4-Aug-10 8:14 
AnswerRe: Get table field size Pin
Eddy Vluggen4-Aug-10 9:52
professionalEddy Vluggen4-Aug-10 9:52 
GeneralRe: Get table field size Pin
cyberexel4-Aug-10 23:13
cyberexel4-Aug-10 23:13 
GeneralRe: Get table field size Pin
Eddy Vluggen5-Aug-10 0:28
professionalEddy Vluggen5-Aug-10 0:28 
QuestionCannot find ContextMenu control in vb.net Pin
Andraw Tang4-Aug-10 6:30
Andraw Tang4-Aug-10 6:30 
AnswerRe: Cannot find ContextMenu control in vb.net Pin
cyberexel4-Aug-10 8:05
cyberexel4-Aug-10 8:05 
GeneralRe: Cannot find ContextMenu control in vb.net Pin
Andraw Tang4-Aug-10 10:25
Andraw Tang4-Aug-10 10:25 
GeneralRe: Cannot find ContextMenu control in vb.net Pin
cyberexel4-Aug-10 23:11
cyberexel4-Aug-10 23:11 
QuestionGet Primary Field and Foreign Fields from Access Table Pin
cyberexel4-Aug-10 4:49
cyberexel4-Aug-10 4:49 
AnswerRe: Get Primary Field and Foreign Fields from Access Table Pin
cyberexel5-Aug-10 6:39
cyberexel5-Aug-10 6:39 
QuestionRemote TCP file Transferring Pin
rezafathi3-Aug-10 14:15
rezafathi3-Aug-10 14:15 
AnswerRe: Remote TCP file Transferring Pin
Garth J Lancaster3-Aug-10 17:25
professionalGarth J Lancaster3-Aug-10 17:25 
Question[VB10] Check which ListBox items are selected and which are not Pin
The Mighty Atom3-Aug-10 9:43
The Mighty Atom3-Aug-10 9:43 
AnswerRe: [VB10] Check which ListBox items are selected and which are not Pin
Eddy Vluggen3-Aug-10 10:51
professionalEddy Vluggen3-Aug-10 10:51 
GeneralRe: [VB10] Check which ListBox items are selected and which are not Pin
The Mighty Atom3-Aug-10 11:53
The Mighty Atom3-Aug-10 11:53 

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.