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
avijit chatterjee
NA
16
0
SelectedValue which is invalid because it does not exist in the list of items.
Aug 22 2010 7:08 AM
dear please help me to solve below problem....
getting error in fillgird()..
'cmbcontractor_name' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
dear i am sending class file.....
public DataTable gridviewfetch()
{
library lib = new library();
DataTable dtdetailview = new DataTable();
dtdetailview = lib.GetconDetail();
return dtdetailview;
}
and aspx page fillgrid()...
private void fillgrid()
{
DataTable dttab = cons.gridviewfetch();
{
if (dttab.Rows.Count > 0)
{
GridView1.DataSource = dttab;
GridView1.DataBind();
}
else
{
dttab.Rows.Add(dttab.NewRow());
GridView1.DataSource = dttab;
GridView1.DataBind();
int TotalColumns = GridView1.Rows[0].Cells.Count;
GridView1.Rows[0].Cells.Clear();
GridView1.Rows[0].Cells.Add(new TableCell());
GridView1.Rows[0].Cells[0].ColumnSpan = TotalColumns;
GridView1.Rows[0].Cells[0].Text = "No Record Found";
}
}
thanksyou.....
Reply
Answers (
1
)
question about Response.Write/Redirect
Create a class as property