Hi,
I am displaying information in a GridView .
The data is in a static class called Data (will be replaced by a database in future).
To upload the information to the GridView , I am using a DataTable like so:
public partial class WebForm1 : System.Web.UI.Page
{
private DataTable dt;
...
private void BindGrid()
{
dt = new DataTable();
// Here we populate the DataTable with information from the "Data" class
...
dt.AcceptChanges();
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
When a cell in the GridView is clicked, a user gets a popup form , edits the content and the cell is updated (there is text, background color, tooltip, and other information).
A row in the Data structure is represented by a cell in the GridView, not a row.
After the user edits the information, a form (invisible to the user in the main page) is submitted by clicking the form button. It has an "Onclick" which calls a function,that updates the data in the Data class and invokes BindGrid() above.
Functionally this works fine, but the whole page is refreshed on each edit which is inefficient and takes a second or two to load which is undesired from the usability perspective.
Is there another approach I should be taking for the specific cell to be updated without the whole page being refreshed ?
Thanks,
Rinat
I am displaying information in a GridView .
The data is in a static class called Data (will be replaced by a database in future).
To upload the information to the GridView , I am using a DataTable like so:
public partial class WebForm1 : System.Web.UI.Page
{
private DataTable dt;
...
private void BindGrid()
{
dt = new DataTable();
// Here we populate the DataTable with information from the "Data" class
...
dt.AcceptChanges();
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
When a cell in the GridView is clicked, a user gets a popup form , edits the content and the cell is updated (there is text, background color, tooltip, and other information).
A row in the Data structure is represented by a cell in the GridView, not a row.
After the user edits the information, a form (invisible to the user in the main page) is submitted by clicking the form button. It has an "Onclick" which calls a function,that updates the data in the Data class and invokes BindGrid() above.
Functionally this works fine, but the whole page is refreshed on each edit which is inefficient and takes a second or two to load which is undesired from the usability perspective.
Is there another approach I should be taking for the specific cell to be updated without the whole page being refreshed ?
Thanks,
Rinat