I'm a beginner of C# users.
I'm using the DevExpress with C# Window Form Application.
I'm trying to move row from gridcontrol_1 to gridcontrol_2.
The gridcontrol_1 connected from sql server DB TableA. i using (LINQ)
If I clicked on items from gridcontrol_1 then move to gridcontrol_2 by and remove from gridcontrol_1
If I deselect items from gridcontrol_2 then move back to gridcontrol_1 by click event.
Finally, I want to save(insert) the gridcontrol_2 items to the SQL server TableB. using (LINQ)
I don't know how to code what I want.
I found a video clip from youtube similarly I want to do.
But, the clip shows only DataGridView Control, not GridControl.
and how i save gridControl2 to DB by LINQ
MohamedEidPosted Jul 12, 2024, 3:09 PM
DataRow row = gridView1.GetDataRow(rowHandle); => this row return null
this is datasource for gridControl1
var db = new DAL.DBDataContext();
gridControl1.DataSource = db.analysisPickTbls.ToList();
how i run this code please ?!!
Nikunj SatasiyaPosted Jul 11, 2024, 1:03 AM
Hi Mohamed,
I assumes that you have already set up your DevExpress GridControls (
gridControl_1andgridControl_2) and LINQ DataContext (dbContext):I writing a sample code for you, you can take refrence from it.
Please make sure that you have set up proper data bindings and column mappings in your GridControls as well as Replace "Column1" with actual column names from your database and adjust data types as necessary.