We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Gridcontrol to GGC or GDBG?

Hello and sorry for my poor English.
I have a C# Form with a gridcontrol that gets data from a serial machine with a tool made by me.
I have another Form with a GridData constructor that gets data from the first form on GridControl and I have another GridControl that gets data from an SD (from serial machine).
Trying to filter data on Gridcontrols to compare them but I saw that filtering on GridControl not supported as well.
I read this article https://www.syncfusion.com/kb/4409/how-to-add-filter-in-grid-control but not helped me.
Tried to convert data from GridControl to GGC or GDBG but was unsuccessful.
Please give me a solution how to do this.
Thank you.
Spiros

1 Reply

AR Amal Raj U Syncfusion Team January 30, 2017 12:30 PM UTC

Hi Spiro, 

Thanks for using Syncfusion products. 

Trying to filter data on Gridcontrols to compare them but I saw that filtering on GridControl not supported as well. 
I read this article  
4409/how-to-add-filter-in-grid-control but not helped me. 

By default, there is no support for filtering in GridControl and the provided KB uses default filtering technique of DataView.  
 
We suggest you to use GridGroupingControl which supports filtering, grouping, paging, zooming and summaries. Please refer to the below documentation link to choose the best grid, 
 
UG Link 
 
 
 
 
 
 
 
 
 
 
 
 
 
Tried to convert data from GridControl to GGC or GDBG but was unsuccessful. 
In order to convert the data from GridControl to GridGroupingControl, please make use of the below code, 

Code Example 

1)In form which contains GridGroupingControl. 
//To convert the data of GridControl for GridGroupingControl. 
public void PassData(GridControl grid1) 
{ 
    DataTable dataTable = new DataTable(); 
    int columnCount = grid1.ColCount; 
    for (int i= 1; i <= grid1.ColCount;i++) 
    { 
        dataTable.Columns.Add(string.Format("Column {0}", Convert.ToChar(64 + i))); 
    } 
    for (int i = 1; i <= grid1.RowCount; i++) 
    { 
        DataRow row = dataTable.NewRow(); 
        for (int j = 0; j < grid1.ColCount; j++) 
        { 
            row[j] = grid1[i, j+1].CellValue; 
        } 
        dataTable.Rows.Add(row); 
    } 
    this.gridGroupingControl1.DataSource = dataTable; 
} 
 
 
2)From form which contains GridControl 
 
private void button1_Click(object sender, EventArgs e) 
{ 
    Form2 form2 = new Form2(); 
    //Passes the GridControl to convert data. 
    form2.PassData(this.gridControl1); 
    form2.Show(); 
} 


Sample Link 

Regards, 
Amal Raj U. 


Loader.
Live Chat Icon For mobile
Up arrow icon