Click here to Skip to main content
15,901,205 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created a datagrid for my application . When i click a view button . It should display chopped data which is read from temp sensor(serial port) ANd display in one coloumn(temperature coloumn) . On another coloumn (time) It should display the current time in system. How can we do it?? any ideas??
Posted

1 solution

Create your DataGridView, and give it two columns in the Design view.
In your button Click event handler method, read the data from the sensor (I assume you know how to do that), and then:

C#
double temperature = 42.6;
myDataGridView.Rows.Add( temperature, DateTime.Now );
 
Share this answer
 

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