views:

23

answers:

1

I need to refresh data in GridView after I call static method (Asp.Net, C#).

Is it possible to accomplish it?

A: 

well, you can rebind the dataset/datatable you got to the gridview like this,

myGridViewId.DataSource = myDataTable;
myGridViewId.DataBind();

EDIT: After seeing the comment:You mean with out submitting the form manually ,you can trigger it with the following javascript code..

<script type="text/javascript">
setTimeout(function(){window.location.reload(true);},timeoutPeriod);
//timeoutPeriod in milli seconds..
</script>
Srinivas Reddy Thatiparthy
how can i do that without refreshing the page? I need to call non static method from static. but it is not working the usual way.
George
You didn't get the question. I need to execute non static method which will bind GridView but I need to do it after executing static method with Ajax
George
then show me the code ,at least psuedo code..
Srinivas Reddy Thatiparthy