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
soumya shanbhag
NA
25
0
Gridview Using c#.net
Aug 14 2009 2:48 AM
Hello,
I am implementing one aplication using c#.net.In that am using gridview containing checkbox and dropdownlist as template field.When i click on check box ,want to save selected value from dropdownlist to datatbase.But dropdown value is taking null.please help me anyone.
Here is my code:
for (int i = 0; i < gv_DisplayTasks.Rows.Count; i++)
{
GridViewRow row = gv_DisplayTasks.Rows[i];
int rowindex = row.RowIndex;
bool isChecked = ((CheckBox)row.FindControl("chk")).Checked;
if (isChecked)
{
sendforfeedbackbl = new tsk_SendForFeedBackBL();
sendforfeedback = new tsk_SendForFeeback();
DropDownList ddl = (DropDownList)row.FindControl("ddl_rating");
string rating = ddl.SelectedItem.Value.ToString();
}
}
Thanks
Soumya
Reply
Answers (
2
)
conversion from ASP to ASP.NET
System.IndexOutOfRangeException: Index was outside the bounds of the array