2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
Save the changes to the databaseIn order to save the changes in database for datetimepicker cell type, GridControl has support to save the cell values using SaveCellInfo event. Using e.ModifyType you can check the status of the cell value like whether it is modified or newly added. C# //MonthCalendar celltype this.gridControl1[1, 2].Text = "MonthCalendar"; this.gridControl1.ColWidths[2] = 100; this.gridControl1[2, 2].CellType = GridCellTypeName.MonthCalendar; //Event Handler Me.gridControl1.SaveCellInfo += gridControl1_SaveCellInfo void gridControl1_SaveCellInfo(object sender, GridSaveCellInfoEventArgs e) { //Saves the modified value in a temp variable. string temp = e.Style.CellValue.ToString(); }
VB 'MonthCalendar celltype Me.gridControl1(1, 2).Text = "MonthCalendar" Me.gridControl1.ColWidths(2) = 100 Me.gridControl1(2, 2).CellType = GridCellTypeName.MonthCalendar 'Event Handler Me.gridControl1.SaveCellInfo += gridControl1_SaveCellInfo Private Sub gridControl1_SaveCellInfo(ByVal sender As Object, ByVal e As GridSaveCellInfoEventArgs) 'Saves the modified value in a temp variable. Dim temp As String = e.Style.CellValue.ToString() End Sub
Screenshot Samples: C#: SaveCellValue_CS VB: SaveCellValue_VB
|
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.