I know some of you use this control.
I'm testing out C1's grid. I want to take a database and add an unbound column. Simple right?
No. It seems all of their tutorials use the drag and drop version to set up the dataset. Winms. LOL
I want to do it in code which does not work.
Can someone please take a look for me?
Now I read:
The UnboundColumnFetch event is raised when a bound needs to display the value of a cell in an unbound column as specified by the Row and Col arguments. For a bound grid, any column with an empty DataField property and a non-empty Caption property is considered an unbound column.
So I added a column in the visual property editor.
Nothing. In fact the column does not even show up. I think the unbound column conflits with the columns coming off the database, since I did not have to set them up.
Is this right?
Thanks
(So far Infragistics grid is much easer to use and program).
I'm testing out C1's grid. I want to take a database and add an unbound column. Simple right?
No. It seems all of their tutorials use the drag and drop version to set up the dataset. Winms. LOL
I want to do it in code which does not work.
Can someone please take a look for me?
Code:
Open the connection...
sSQL = "select a,b,c from Agency"
Dim myDataAdapter As New SqlDataAdapter(sSQL, myConnection)
Dim myDataSet = New DataSet
myDataAdapter.Fill(myDataSet, "agency")
C1TrueDBGrid1.DataSource = myDataSet
C1TrueDBGrid1.DataMember = "agency"
'This all works by itself
Now I read:
The UnboundColumnFetch event is raised when a bound needs to display the value of a cell in an unbound column as specified by the Row and Col arguments. For a bound grid, any column with an empty DataField property and a non-empty Caption property is considered an unbound column.
So I added a column in the visual property editor.
Code:
Private Sub C1TrueDBGrid1_UnboundColumnFetch(ByVal sender As System.Object, ByVal e As C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs) Handles C1TrueDBGrid1.UnboundColumnFetch
e.value = "gary"
End Sub
Nothing. In fact the column does not even show up. I think the unbound column conflits with the columns coming off the database, since I did not have to set them up.
Is this right?
Thanks
(So far Infragistics grid is much easer to use and program).