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
close icon

adding OpenFiledialog to a specific cell of GridGroupingControl

Hello,
I am using GridGroupingControl of Syncfusion version 6.3.1.8.The datasource is DataTable.I want only one cell(not the entire column) of the GridGroupingControl to host a button for OpenFileDialog(or any custom control).Please provide me a sample application/code snippet for the same.

Hope to see a reply from you soon.



1 Reply

SR SubhaSheela R Syncfusion Team September 18, 2008 05:26 AM UTC


Hi Keshav,

Thanks for your interest in Syncfusion products.

You can have push button in a cell and open a dialog by clicking that by handling QueryCellStyleInfo and PushButtonClick events of the GridGrouping Control.

Here is the code:


void TableControl_PushButtonClick(object sender, Syncfusion.Windows.Forms.Grid.GridCellPushButtonClickEventArgs e)
{
string filename;
if(e.ColIndex == 2 && e.RowIndex == 7)
{
openFileDialog1.ShowDialog();
if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
filename = this.openFileDialog1.FileName;
}
}


Here is the sample:

GGCPushButtonANDForm.zip

Please let me know if this does not serve your need.

Regards,
Subhasheela R



Loader.
Live Chat Icon For mobile
Up arrow icon