Click here to Skip to main content
15,896,278 members
Home / Discussions / C#
   

C#

 
AnswerRe: Urgent Pin
rfjeld8-Jun-06 0:52
rfjeld8-Jun-06 0:52 
AnswerRe: Urgent Pin
J4amieC8-Jun-06 1:08
J4amieC8-Jun-06 1:08 
GeneralRe: Urgent Pin
BoneSoft8-Jun-06 4:54
BoneSoft8-Jun-06 4:54 
JokeRe: Urgent Pin
Koushik Biswas8-Jun-06 8:16
Koushik Biswas8-Jun-06 8:16 
QuestionSetting default document in IIS 6.0 from commandline [modified] Pin
BhaskarJha7-Jun-06 23:30
BhaskarJha7-Jun-06 23:30 
QuestionListBox [modified] Pin
Nafiseh Salmani7-Jun-06 22:58
Nafiseh Salmani7-Jun-06 22:58 
AnswerRe: ListBox [modified] Pin
rfjeld7-Jun-06 23:23
rfjeld7-Jun-06 23:23 
QuestionProblem in getting value from Un-bounded DataGridViw. Pin
Mairaaj Khan7-Jun-06 22:13
professionalMairaaj Khan7-Jun-06 22:13 
Hi,
Need Help Please!

Appearing Error Message: "Object reference not set to an instance of an object", while pointing to dgvInventoryItems.
Problem 1)
Despite of Checks, this message come when i click on the empty (last) row of the DataGridView which is binded with the DataTable.
if (this.dgvInventoryItems.CurrentRow != null )<br />
//if (this.dgvInventoryItems.CurrentRow.Cells[0].Value != null )<br />
{<br />
this.tbItemNrEdit.Text = this.dgvInventoryItems.Rows[index].Cells["ItemNr"].Value.ToString();<br />
....... }


Problem 2)
The same message again appear when trying to get value from the cell of a non-binded DataGridView. This time it has a string value, but again its generating the above mentioned error message.
Trying to get value from the cell in CellLeave event of the grid.
here is the code.

private void dgvNewInventory_CellLeave(object sender, DataGridViewCellEventArgs e)<br />
{<br />
long id=333; string strval;<br />
strval = this.dgvNewInventory.Rows[e.RowIndex].Cells[0].Value.ToString(); //PROBLEM IS IN THIS LINE<br />
dgvNewInventory.Rows[e.RowIndex].Cells[1].Value = id; // IT WORKS PEFECTLY<br />
}


Where i'm making mistak.

Thanks.

_____________________________
Success is not something to wait for, its something to work for.
QuestionPlease HELP!!!!!!! Pin
DampaZGB7-Jun-06 21:59
DampaZGB7-Jun-06 21:59 
AnswerRe: Please HELP!!!!!!! Pin
NaNg152417-Jun-06 22:10
NaNg152417-Jun-06 22:10 
AnswerRe: Please HELP!!!!!!! Pin
Colin Angus Mackay7-Jun-06 22:16
Colin Angus Mackay7-Jun-06 22:16 
GeneralRe: Please HELP!!!!!!! Pin
NaNg152417-Jun-06 22:36
NaNg152417-Jun-06 22:36 
GeneralRe: Please HELP!!!!!!! Pin
Colin Angus Mackay8-Jun-06 0:45
Colin Angus Mackay8-Jun-06 0:45 
GeneralRe: Please HELP!!!!!!! Pin
DampaZGB8-Jun-06 1:37
DampaZGB8-Jun-06 1:37 
AnswerRe: Please HELP!!!!!!! Pin
DampaZGB8-Jun-06 1:40
DampaZGB8-Jun-06 1:40 
GeneralRe: Please HELP!!!!!!! Pin
Robert Rohde8-Jun-06 2:02
Robert Rohde8-Jun-06 2:02 
AnswerRe: Please HELP!!!!!!! Pin
Eric Dahlvang8-Jun-06 4:30
Eric Dahlvang8-Jun-06 4:30 
GeneralRe: Please HELP!!!!!!! Pin
Colin Angus Mackay8-Jun-06 4:46
Colin Angus Mackay8-Jun-06 4:46 
GeneralRe: Please HELP!!!!!!! Pin
Ret Orrick8-Jun-06 7:42
Ret Orrick8-Jun-06 7:42 
GeneralRe: Please HELP!!!!!!! Pin
Colin Angus Mackay8-Jun-06 8:25
Colin Angus Mackay8-Jun-06 8:25 
GeneralRe: Please HELP!!!!!!! Pin
Ret Orrick8-Jun-06 8:40
Ret Orrick8-Jun-06 8:40 
GeneralRe: Please HELP!!!!!!! Pin
DampaZGB8-Jun-06 22:03
DampaZGB8-Jun-06 22:03 
Questionhow to send recived sms using smpp Pin
foysal mamun7-Jun-06 20:57
foysal mamun7-Jun-06 20:57 
QuestionCreating webpage using C# Pin
Vijju7-Jun-06 20:57
Vijju7-Jun-06 20:57 
AnswerRe: Creating webpage using C# [modified] Pin
rfjeld7-Jun-06 21:48
rfjeld7-Jun-06 21:48 

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.