Can't set value of datagridview cell
The documentation claims you can set the cell value thusly:
Private Sub SetCellValue(ByVal myGrid As DataGrid)
Dim myCell As New DataGridCell()
' Use an arbitrary cell.
myCell.RowNumber = 1
myCell.ColumnNumber = 1
' Change the cell's value using the CurrentCell.
myGrid(myCell)= "New Value"
End Sub
MsgBox("new row index " & Me.DataGridView1.NewRowIndex.ToString)
MsgBox("rowcount " & Me.DataGridView1.RowCount.ToString())
gives me the respective messages 0 and 1 respectively. I might add that the datagridview is unbound and without a datasource.
Dim aCell As New DataGridView1cell gives me the message datagridview1cell is not defined.
Further in the documentation are examples. I adapted the examples
Dim rowArray As String()
'Dim row1() As String = {"Meatloaf", "Main Dish", "ground beef", "**"}
to
Dim row1 As String = {Me.WATopicID.ToString(), Me.KeywordSetTextBox.Text, " "}
The questionmark is because the example is for all columns as textboxes. Nowhere did I find documentation on how to fill a row with other controls as columns, particularly a checkbox.
Dim rowArray As String()
For Each rowArray In rows
dataGridView1.Rows.Add(rowArray)
Next rowArray
However, rows is undeclared. It seems the documentation is behind the current implementation of the beta framework.
Can somebody help me
You might ask why I don't add a datasource for the keywords grid Because I have thousands of keywords. It's easier to just execute an insertquery to the tableadapter and not have to drain a large amount of resources and slow the user experience considerably.
dennist

Can't set value of datagridview cell
AlucardJC
Javier_Uy
You should ask on the compact framework forum: http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=33&SiteID=1
-mark
DataGridView Program Manager
Microsoft
This post is provided "as-is"
Mike Hackett
The following code works for me in build 50215:
dataGrid1.Rows(1).Cells(1).Value = "New Value"
If you have further questions on using the DataGrid or other Windows Forms controls, your best bet would be to submit them to one of the Windows Forms forums at:
http://forums.microsoft.com/msdn/default.aspx ForumGroupID=2
I hope this information proves helpful.
David Sceppa
ADO.NET Program Manager
Microsoft