Click here to Skip to main content
15,920,836 members
Home / Discussions / C#
   

C#

 
GeneralRe: XML Deserialization question Pin
S. Senthil Kumar7-Nov-06 5:30
S. Senthil Kumar7-Nov-06 5:30 
AnswerRe: XML Deserialization question Pin
Clive Pottinger8-Nov-06 15:10
Clive Pottinger8-Nov-06 15:10 
QuestionNearest neighbour algorithm Pin
Islam Khalil Saber6-Nov-06 4:35
Islam Khalil Saber6-Nov-06 4:35 
AnswerRe: Nearest neighbour algorithm Pin
J4amieC6-Nov-06 4:42
J4amieC6-Nov-06 4:42 
AnswerCross posting Pin
leckey6-Nov-06 6:41
leckey6-Nov-06 6:41 
Questiondatagridview help needed Pin
giddy_guitarist6-Nov-06 4:34
giddy_guitarist6-Nov-06 4:34 
AnswerRe: datagridview help needed Pin
Rey99997-Nov-06 6:36
Rey99997-Nov-06 6:36 
GeneralRe: datagridview help needed Pin
giddy_guitarist7-Nov-06 21:59
giddy_guitarist7-Nov-06 21:59 
hey , i got it!

i dont know much but it works perfect this way:
<br />
private void dataGridView1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)<br />
{<br />
   dataGridView1.CurrentCell = DataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex];<br />
   this.dataGridView1.ContextMenuStrip = this.contextMenuStrip1;<br />
}


works only on this event ... and yes the contextStrip shows up when i right click . not when i left click

thanks so much for your concern!Smile | :) Smile | :)

but i got another problem now.. .basically.. .the datagrid on my form shoud display the status of ALL the rooms... for a given date(i have a datepicker on the form) .. ok so now in my test app. when i hit 8th on the datepicker , the DGV shows one entry .. room 103A is booked on that date. Problem is , it only shows one entry .. i want the empty rooms to show up as empty rows. I know i have to add unbound data. I tried to add blank rows. but its says i cannot add anythign programmatically if i have it bound.

If its unbound this is how i add the rows ..
DataRow dt = dataSet.Tables["customers"].Rows[0];<br />
dataGridView2.Rows.Add(dt[0] , dt[1] , dt[2] ....... );

is the above correct or is there a better way...??

also if i add the blank rows .. and the user adds something in it what event do i have to handle? and how do i update/add the DB manually? Confused | :confused: i know SQL .. i'm using oledb . for an access database (.mdb)

now one of the colums inthe database is roomtype. but then when i load the values i want them in a combobox? how do i do that? how do i adda combobox to the DVG?Sigh | :sigh:

DataGridViewComboBoxColumn cboColumn = new DataGridViewComboBoxColumn();<br />
cboColumn.Items.Add("a");<br />
cboColumn.Items.Add("b");<br />
dataGridView2.Rows.Add("", cboColumn, "");


i get -> DataGridViewComboBoxColumn { Name=, Index=-1 } in the second column!D'Oh! | :doh:
D'Oh! | :doh:

plz help!Sigh | :sigh:
QuestionTesting the presence of a reference Pin
Maercu6-Nov-06 4:23
Maercu6-Nov-06 4:23 
AnswerRe: Testing the presence of a reference Pin
led mike6-Nov-06 5:08
led mike6-Nov-06 5:08 
AnswerRe: Testing the presence of a reference Pin
liRetro6-Nov-06 5:51
liRetro6-Nov-06 5:51 
AnswerRe: Testing the presence of a reference Pin
Maercu6-Nov-06 21:46
Maercu6-Nov-06 21:46 
QuestionWhich class I should use in communication? Pin
mertkan656-Nov-06 4:11
mertkan656-Nov-06 4:11 
QuestionWeird problem... [modified] Pin
Support1236-Nov-06 3:52
Support1236-Nov-06 3:52 
AnswerRe: Weird problem... Pin
ednrgc6-Nov-06 4:09
ednrgc6-Nov-06 4:09 
GeneralRe: Weird problem... Pin
Support1236-Nov-06 4:34
Support1236-Nov-06 4:34 
AnswerRe: Weird problem... Pin
Pete O'Hanlon6-Nov-06 4:25
mvePete O'Hanlon6-Nov-06 4:25 
GeneralRe: Weird problem... Pin
Support1236-Nov-06 4:38
Support1236-Nov-06 4:38 
GeneralRe: Weird problem... Pin
Pete O'Hanlon6-Nov-06 4:48
mvePete O'Hanlon6-Nov-06 4:48 
GeneralRe: Weird problem... Pin
Support1236-Nov-06 4:52
Support1236-Nov-06 4:52 
GeneralRe: Weird problem... Pin
eggsovereasy6-Nov-06 5:47
eggsovereasy6-Nov-06 5:47 
GeneralRe: Weird problem... Pin
Support1236-Nov-06 21:51
Support1236-Nov-06 21:51 
QuestionC# (Windows Forms) to HTML to PDF Pin
davehoonter6-Nov-06 3:49
davehoonter6-Nov-06 3:49 
AnswerRe: C# (Windows Forms) to HTML to PDF Pin
Christopher Duncan7-Nov-06 3:25
Christopher Duncan7-Nov-06 3:25 
Questionexcel .NET 2.0 Pin
fmardani6-Nov-06 3:30
fmardani6-Nov-06 3:30 

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.