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
baskaran chellasamy
NA
114
150.2k
cannot read the data from gridview column
Oct 3 2013 6:16 AM
Hi friends the following is my code for read the cell value from gridview. when i read it return null for cell value. but gridview has the value for the particular cell.
public bool inserstumark(Commonpropertis comp, System.Web.UI.WebControls.GridView grid)
{
bool result = false;
if (comp.EXAMNAMES != "Annual Exam" || comp.EXAMNAMES!="Half yearly Exam"|| comp.EXAMNAMES!="Quartely Exam" )
{
int rows = grid.Rows.Count;
for (int i = 0; i < rows; i++)
{
// comp.ADMISSIONNUMBER = Convert.ToInt32(grid.Rows[i].Cells[0].Text);
System.Web.UI.WebControls.Label lbl = grid.Rows[i].FindControl("lblrollno") as System.Web.UI.WebControls.Label;
comp.ROLLNUMBER = lbl.Text;
// comp.NAME = grid.Rows[i].Cells[2].Text;
System.Web.UI.WebControls.TextBox txt = grid.Rows[i].FindControl("mark2txt") as System.Web.UI.WebControls.TextBox;
comp.EXTERNALMARK =Convert.ToInt32(txt.Text);
result= userdao.inserstumark1(comp);
}
return result;
}
Reply
Answers (
1
)
Server Error in '/SAI_Solution1' Application
how to get hidden value in javescript