Posted 21 November 2023, 12:20 pm EST
- Updated 21 November 2023, 12:25 pm EST
Hi Kartik,
Thank you for help.
I have followed your code, so my code as following:
[code]using System.Windows.Forms;
using DALC4NET;
using warehousecontrol.BusinessLayer;
using C1.Win.C1InputPanel;
namespace warehousecontrol
{
#region Tham khảo
//http://www.codeproject.com/Articles/15013/Windows-Forms-User-Settings-in-C
//Save setting: lưu các biến vào setting của chương trình
#endregion
#region Khai báo các biến dùng chung/Common varianct
//private frmMain frmParent;
//private DBHelper _dbHelper = new DBHelper();
#endregion
#region Các hàm hỗ trợ/Support functions
#endregion
#region Methods and functions; Add, Edit, Delete, Exist
#endregion
public partial class frmTest : Form
{
static BindingSource bs;
public frmTest()
{
InitializeComponent();
Boms oBom= new Boms();
DataTable dtResult = oBom.GetMattGroupInfo();
if(dtResult != null)
{
bs = new BindingSource(dtResult, string.Empty);
//Set the Binding for the InputPanel components
SetInputComponentBinding(inputTextBox1, bs, "prefixMattCode");
SetInputComponentBinding(inputTextBox2, bs, "mattGroupName01");
SetInputComponentBinding(inputDataNavigator1, bs, string.Empty);
}
}
private void SetInputComponentBinding(InputComponent inputTextBox, object dataSource, string dataField)
{
//Set DataSource and DataField properties for the InputPanel components
inputTextBox.DataSource = dataSource;
inputTextBox.DataField = dataField;
}
}
}[/code]
So now I could move next, backward.
I have tried to add/edit/save change by the button on the c1inputpanel.
When I close it, open again, it does not change any things.
So, how can I make a change to table.

Sorry, as I am new on this.
Thank you.
Duyet Le