TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Goran Bibic
455
2.9k
197.9k
Selection changed dont work
Mar 16 2018 3:42 AM
Selection changed not work when put inside cod && vrijemeodjaveDateTimePicker == null
Complete code down
without && vrijemeodjaveDateTimePicker == null working fine
private
void
prijava_radnikaDataGridView_SelectionChanged(object sender, EventArgs e)
{
if
(prijava_radnikaDataGridView.SelectedRows.Count > 0 && vrijemeodjaveDateTimePicker == null)
// make sure user select at least 1 row
{
string id = prijava_radnikaDataGridView.CurrentRow.Cells[
"dataGridViewTextBoxColumn1"
].FormattedValue.ToString();
string radnik = prijava_radnikaDataGridView.CurrentRow.Cells[
"dataGridViewTextBoxColumn9"
].FormattedValue.ToString();
string redni_broj = prijava_radnikaDataGridView.CurrentRow.Cells[
"redni_broj"
].FormattedValue.ToString();
radnikComboBox.Text = radnik;
vrijemeprijaveDateTimePicker.Value = Convert.ToDateTime(prijava_radnikaDataGridView.SelectedRows[0].Cells[
"dataGridViewTextBoxColumn2"
].Value);
vrijemeodjaveDateTimePicker.Value = Convert.ToDateTime(prijava_radnikaDataGridView.SelectedRows[0].Cells[
"dataGridViewTextBoxColumn3"
].Value);
redni_brojTextBox.Text = redni_broj;
idPrijavaTextBox.Text = id;
}
}
Reply
Answers (
1
)
Eliminate duplicate values from the datagrid WPF
asp.net mvc Can i have one view for multiple action methods