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
Abraham Olatubosun
NA
471
114.6k
How to retain Checkbox when GridView Next button is clicked
May 27 2016 8:22 AM
Hello all,
we have gridview with allow paging set to true and well porpulate with checkbox in gridview template. when the checkbox checked and the next button is clicked we notice that the previous checked checkbox turns unchecked, below is a picture of it.
normally we write the code as follows :
protected void LoaDGrid()
{
try
{
string mFile1 = drpProgramArea.SelectedItem.Text.Trim();
string mFile = string.Empty;
DataTable dt = new DataTable();
GetThematic(mFile1, out mFile);
string SQL = " SELECT * FROM tbl_defn where grouptype ='" + mFile.Trim() + "'";
SqlConnection cn = new SqlConnection(ConnectAll.ConnectMe());
cn.Open();
SqlCommand cmd = new SqlCommand(SQL, cn);
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
catch (Exception ex)
{
webMessage.Show("ERROR :" + ex.Message);
return;
}
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
LoaDGrid();
}
Please kindly assist us in resolving the pending challenge.
thank you
Reply
Answers (
1
)
is it possible to convert whole xsd to xml ?
Google Image Search Using API?