Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146837 | Aug 22,2019 08:56 AM UTC | Sep 23,2019 10:02 AM UTC | WinForms | 4 |
![]() |
Tags: SfDataGrid |
sfDataGrid.CellButtonClick += SfDataGrid_CellButtonClick;
private void SfDataGrid_CellButtonClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellButtonClickEventArgs e)
{
var fileContent = string.Empty;
var filePath = string.Empty;
using (OpenFileDialog openFileDialog = new OpenFileDialog())
{
openFileDialog.InitialDirectory = "c:\\";
openFileDialog.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
openFileDialog.FilterIndex = 2;
openFileDialog.RestoreDirectory = true;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
filePath = openFileDialog.FileName;
sfDataGrid.View.GetPropertyAccessProvider().SetValue((e.Record as Syncfusion.WinForms.DataGrid.DataRow).RowData, "FilePath", filePath);
}
}
|
Why the display text of the Button is empty after click on "Click here to add new row" |
The cell values for the AddNewRow will be initialized only when the AddNewRow is initialized. AddNewRow initialization will be triggered only when any of the cell in AddNewRow starts editing. |
Display text appears after edit or double click PathFile Cell? |
Here, the AddNewRow will be initialized and the display text for button is appeared properly. |
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.
This page will automatically be redirected to the sign-in page in 10 seconds.