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
Technical guru
NA
63
8.8k
use for loop with if else in C#
Oct 7 2018 4:46 AM
use for loop with if else in C#
this is my code
private void grid1_RowColChange(object Sender, FlexCell.Grid.RowColChangeEventArgs e)
{
if (e.Col >= 3 && e.Row >= 2)
{
if (e.Col % 2 != 0)
{
for (int i = 2; i <= 40; i = i + 2)
{
if (grid1.Cell(i, 1).Text == "BRECK")
{
frmTeacherList frmt = new frmTeacherList(this);
frmt.Visible = false;
break;
}
else
{
frmTeacherList frmt = new frmTeacherList(this);
frmt.Show();
}
}
}
else if (e.Col % 2 == 0)
{
for (int i = 2; i <= 40; i = i + 2)
{
if (grid1.Cell(i, 1).Text == "BRECK")
{
frmsubject frm = new frmsubject(this);
frm.Visible = false;
break;
}
else
{
frmsubject frm = new frmsubject(this);
frm.CmbClass.Text = cmbClass.Text;
frm.cmbSection.Text = cmbSection.Text;
frm.Show();
}
}
}
}
But there Executed (
open
)frmSubject and frmTeacher also through loop
Please Help
Reply
Answers (
2
)
how get data from datagri view when press enter key in vb.ne
how to use filters in webapi