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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Gridcontrol to GGC or GDBG?

Thread ID:

Created:

Updated:

Platform:

Replies:

128543 Jan 27,2017 09:44 AM UTC Jan 30,2017 12:30 PM UTC Windows Forms 1
loading
Tags: GridControl
Spiro Bad
Asked On January 27, 2017 09:44 AM UTC

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

Amal Raj Umapathy Selvam [Syncfusion]
Replied On 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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;