difficulties with AdvancedDatagridView
-
i have already a good Programm which shows my database in a Datagridview, everything is Ok with it, now i would like to add Filter Option to my Datagridview like Excel Filter i used : AdvanceDatagridview it's an advanced Datagridview with a lot of filter Option, the problem here, i can not use this datagridview unless i bind it with a Datatable and i also when i did that t found a big problem because in my old code there is Datagridviewrow and now so i tried to convert Datagridviewrow to datarow to import it in datatable and to use it but it did not work my Old Code :
sSQL = "SELECT " &
"ItemID, " &
"PSC_tdItems.OrderID, " &
"ArtikelID, " &
"Menge, " &
"Art, "
"CodeID, " &MyCommand = New SqlCommand(sSQL, conFF)
drW2P = MyCommand.ExecuteReader If drW2P.HasRows Then While drW2P.Read() nField\_ItemID = 0 nField\_OrderID = 0 nField\_Quantity = 0.0 sField\_Art = "" sField\_pscArticleID = "" sField\_CodeID = ""
If Not DBNull.Value.Equals(drW2P("ItemID")) Then
nField_ItemID = Convert.ToInt32(drW2P("ItemID"))
End If
If Not DBNull.Value.Equals(drW2P("OrderID")) Then
nField_OrderID = Convert.ToInt32(drW2P("OrderID"))
End If
If Not DBNull.Value.Equals(drW2P("Menge")) Then
nField_Quantity = Convert.ToDouble(drW2P("Menge").ToString.Replace(".", ""))
End If
If Not DBNull.Value.Equals(drW2P("Art")) Then
sField_Art = drW2P("Art").ToString
End If
If Not DBNull.Value.Equals(drW2P("ArticelNumber")) Then
sField_mspArticleNumber = drW2P("ArticelNumber").ToString
End If
If Not DBNull.Value.Equals(drW2P("CodeID")) Then
sField_CodeID = drW2P("CodeID").ToString
End If
Try
MyRow = New DataGridViewRow
MyRow.CreateCells(dgvW2P)
MyRow.SetValues("0",
imgNotOK.ToBitmap,
nField_ItemID,
nField_OrderID,
nField_Quantity
sField_Art, -
i have already a good Programm which shows my database in a Datagridview, everything is Ok with it, now i would like to add Filter Option to my Datagridview like Excel Filter i used : AdvanceDatagridview it's an advanced Datagridview with a lot of filter Option, the problem here, i can not use this datagridview unless i bind it with a Datatable and i also when i did that t found a big problem because in my old code there is Datagridviewrow and now so i tried to convert Datagridviewrow to datarow to import it in datatable and to use it but it did not work my Old Code :
sSQL = "SELECT " &
"ItemID, " &
"PSC_tdItems.OrderID, " &
"ArtikelID, " &
"Menge, " &
"Art, "
"CodeID, " &MyCommand = New SqlCommand(sSQL, conFF)
drW2P = MyCommand.ExecuteReader If drW2P.HasRows Then While drW2P.Read() nField\_ItemID = 0 nField\_OrderID = 0 nField\_Quantity = 0.0 sField\_Art = "" sField\_pscArticleID = "" sField\_CodeID = ""
If Not DBNull.Value.Equals(drW2P("ItemID")) Then
nField_ItemID = Convert.ToInt32(drW2P("ItemID"))
End If
If Not DBNull.Value.Equals(drW2P("OrderID")) Then
nField_OrderID = Convert.ToInt32(drW2P("OrderID"))
End If
If Not DBNull.Value.Equals(drW2P("Menge")) Then
nField_Quantity = Convert.ToDouble(drW2P("Menge").ToString.Replace(".", ""))
End If
If Not DBNull.Value.Equals(drW2P("Art")) Then
sField_Art = drW2P("Art").ToString
End If
If Not DBNull.Value.Equals(drW2P("ArticelNumber")) Then
sField_mspArticleNumber = drW2P("ArticelNumber").ToString
End If
If Not DBNull.Value.Equals(drW2P("CodeID")) Then
sField_CodeID = drW2P("CodeID").ToString
End If
Try
MyRow = New DataGridViewRow
MyRow.CreateCells(dgvW2P)
MyRow.SetValues("0",
imgNotOK.ToBitmap,
nField_ItemID,
nField_OrderID,
nField_Quantity
sField_Art, -
sorry, but i am looking for a solution , if i could do that i will not post here my question
-
sorry, but i am looking for a solution , if i could do that i will not post here my question
-
a solution for my problem , how to use this code with the new Datagridview, the probleme is with property hasrow, i add the data to the DataTable and use that as the binding source for the DataGridView.
-
a solution for my problem , how to use this code with the new Datagridview, the probleme is with property hasrow, i add the data to the DataTable and use that as the binding source for the DataGridView.
There's multiple gridviews out there with the same name; not even sure which one to look at. For the normal GridView, we have documentation. Not so much for the unknown advanced version.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
-
There's multiple gridviews out there with the same name; not even sure which one to look at. For the normal GridView, we have documentation. Not so much for the unknown advanced version.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
-