15,915,750 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 3864348 (Top 8 by date)
Member 3864348
23-Sep-16 4:01am
View
I have fixed the issue,it was the cache problem.
Thanks for you help anyways.
Member 3864348
22-Sep-16 8:07am
View
I guess the older data are cached somewhere and then when the paged is re-loaded the older data get displayed.
Member 3864348
22-Sep-16 8:04am
View
protected void MyGridView_RowUpdating(object sender,GridViewUpdateEventArgs e)
{
TextBox tbProcessName =(TextBox)MyGridView.Rows[e.RowIndex].FindControl("txtProcessName");
TextBox tbStatus = (TextBox)MyGridView.Rows[e.RowIndex].FindControl("txtStatus");
string ModifiedProcessName = tbProcessName.Text;
string ModifiedStatus = tbStatus.Text;
// Then code to write the changed data back to the xml file.
MyGridView.EditIndex = -1;
LoadData();
}
Member 3864348
22-Sep-16 7:55am
View
There is no database involved in it,the data being shown in the gridview are from an XML file.
Member 3864348
22-Sep-16 7:51am
View
This is how the LoadData() looks
protected void LoadData()
{
// Creates a data table and populate it from data from xml file.have just removed the data table population code to keep this post short.
DataTable dt = new DataTable()
MyGridView.DataSource = dt;
MyGridView.DataBind();
}
Member 3864348
22-Sep-16 7:49am
View
ata();
}
}
And LoadData() has been defined as below:-
protected void LoadData()
{
// Creates a data table and populate it from data from xml file.Have just removed the data table population code to keep this post short.
DataTable dt = new DataTable()
MyGridView.DataSource = dt;
MyGridView.DataBind();
}
So,DatBind() is already called but no luck.
When I click on the link(menu item on the home page) again after I modify the data in the gridview,it still shows the older data (however the data in the backend xml file is being updated)
Member 3864348
22-Sep-16 7:48am
View
Hi,
My Page_load() method is as below:-
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadData();
}
}
And LoadData() has been defined as below:-
protected void LoadData()
{
// Creates a data table and populate it from data from xml file.Have just removed the data table population code to keep this post short.
DataTable dt = new DataTable()
MyGridView.DataSource = dt;
MyGridView.DataBind();
}
So,DatBind() is already called but no luck.
When I click on the link(menu item on the home page) again after I modify the data in the gridview,it still shows the older data (however the data in the backend xml file is being updated)
Could you plz help me out.
Member 3864348
22-Sep-16 7:25am
View
Hi,
Thanks for you reply.
I already have a method named LoadData() which is getting called as
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadData();
}
}
and inside LoadData() method the MyGridView.DataBind() is called.But this has not helped me.
Show More