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
Zakir Ahamed
NA
1.4k
630.7k
i have loop problem
Aug 30 2017 3:05 AM
hi this is my code i have selected values prblem:
else if (btncategory.Text == "Update")
{
string ChkSelectedValue = string.Empty;
//object chBoxListTables = null;
for (int i = 0; i < clbbrand.Items.Count; i++)
{
if (clbbrand.Items[i].
Selected
) -->> prblm Selected**
{
ChkSelectedValue = clbbrand.Items[i].Value + ','; -->> Value** Passing Prblm
}
}
//int Items = 0;
//for (int i = 0; i < clbbrand.Items.Count; i++)
//{
// if (clbbrand.Items[i].Selected)
// //if(clbbrand.SelectedIndex > 0)
// {
// ChkSelectedValue = chBoxListTables.Items[i].Value+ ',';
// }
//}
Hashtable hstbl = new Hashtable();
DataGridViewRow row = GvCategory.Rows[indexRow];
hstbl.Add("@status", "update");
hstbl.Add("@CategoryId", Convert.ToInt32(row.Cells[0].Value));
hstbl.Add("@updatedby", Global.UserID);
hstbl.Add("@BrandId",ChkSelectedValue);
Int64 dt = DataAccessLayer.ExecuteCommand_RowsAffected("Category_Mst_sp", hstbl);
if (dt >= 0)
{
MessageBox.Show("Category Details Updated Sucessfully", "Category Alert");
txtcategory.Text = string.Empty;
LoadCategory();
btncategory.Text = "SAVE";
}
else
{
MessageBox.Show("Already Entered the Category");
}
}
}
else
{
string title = "Category";
MessageBox.Show("Please Enter the Category", title);
}
}
catch (Exception exceptionObj)
{
MessageBox.Show(exceptionObj.Message.ToString());
}
}
Reply
Answers (
8
)
i have Updaton in Chekedlist box list items
How to bring the he document to front while open.