I am developing a Windows Mobile 6.5 application with C# using Visual Studio 2008 (I'm still a beginner), it's connected to an SQL CE database. However, I want to send the value of a selected cell in the dataGrid connected to my database to a textBox. It looks very possible, but I can't find a cell click event related to the dataGrid control, there is only one for the dataGridView that I think it's only available for the Windows Desktop applications.
C# – How to show selected Datagrid cell value in a textBox
cvisual-studio-2008windowswindows-mobile
Best Answer
First, wire up your click event, by selecting the GridView control and double clicking the
Click
field located under the Lightening Bolt:Next, expanding on an answer already posted:
I use
string.Format
because sometimes your data could be null orDBNull.Value
.