the best techneque to decrease the data base loading While Binding Data To Your Controlls.......
private void WorkSchedualDataGrid_RowEnter(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == WorkSchedualDataGrid.Rows.Count - 1)
{
ClearAll();
}
else
{
//WorkSchedualDataGrid
NameTextBox.Text = WorkSchedualDataGrid.Rows[e.RowIndex].Cells[0].Value.ToString();
LocalDateTime =(DateTime )WorkSchedualDataGrid.Rows[e.RowIndex].Cells[1].Value;
DatePicker.Value = LocalDateTime;
TimePicker.Value = LocalDateTime;
WorkNameTextBox.Text = WorkSchedualDataGrid.Rows[e.RowIndex].Cells[2].Value.ToString();
DescriptionTextBox.Text = WorkSchedualDataGrid.Rows[e.RowIndex].Cells[3].Value.ToString();
}
}
!--removed tag-->
Enter your message below
Sign in or Join us (it's free).