Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want convert this code to wpf please help me.

int id = Convert.ToInt32(datagrid.CurrentRow.Cells[0].Value);

What I have tried:

i tried this but it shows error

int id = Convert.ToInt32((dgvQuotation.SelectedValue as DataRowView).Row["ItemId"]);
Posted
Comments
VR Karthikeyan 26-Dec-16 23:10pm    
What type of error you got? post error details.
krish.krish 27-Dec-16 1:41am    
i got this error
Object reference not set to an instance of an object.
krish.krish 27-Dec-16 1:44am    
can you say whats the wpf c# code for this windows c# code

int id = Convert.ToInt32(datagrid.CurrentRow.Cells[0].Value);
krish.krish 27-Dec-16 1:45am    
what i wrote code for wpf is correct or not

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900