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
rajasekhar garikipati
NA
31
0
Grid Error
Aug 28 2015 6:36 AM
protected void btnSelect_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.Add("ItemRowId", typeof(int));
dt.Columns.Add("ItemCode", typeof(string));
dt.Columns.Add("ItemName", typeof(string));
dt.Columns.Add("MRP", typeof(float));
dt.Columns.Add("tur", typeof(float));
dt.Columns.Add("UPC", typeof(float));
foreach (GridViewRow row in xdata.Rows)
{
if (row.RowType == DataControlRowType.DataRow)
{
CheckBox chkSelect = (row.Cells[0].FindControl("chkSelect") as CheckBox);
if (chkSelect.Checked)
{
int ItemRowId = int.Parse(row.Cells[1].Text);
string ItemCode = row.Cells[2].Text;
string ItemName = row.Cells[3].Text;
float MRP = float.Parse(row.Cells[4].Text);
float tur = float.Parse(row.Cells[5].Text);
float UPC = float.Parse(row.Cells[6].Text);
dt.Rows.Add(ItemRowId, ItemCode, ItemName, MRP, tur, UPC);
}
}
}
Session.Add("dtgetselectedRecords", dt);
Server.Transfer("~/Grid2.aspx");
}
showing error input string was not correct format for null values
Reply
Answers (
2
)
Showing Error
i want paymentamount column in desc order