Store Data is not binding

  1. #1

    Store Data is not binding


    I am trying to refresh the grid panel after some say 1 minute. But the grid is not getting updated. After clicking on refresh icon the data gets visible. So can any one help me out of this.

    code :
        if (Cache["XYZ"] != null)
            taskRunList = (List<TaskRunDetails>)Cache["WorkflowStatus"];
            Store1.DataSource = taskRunList;
        if (Session["ABC"] != null || Cache["XYZ"] != null)
            goto Begin;
    Last edited by Daniil; Jul 20, 2011 at 4:53 PM. Reason: Please use [CODE] tags
  2. #2

    Please look at the example.


    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">
        protected void Store_RefreshData(object sender, StoreRefreshDataEventArgs e)
            Store store = (Store)sender;
            store.DataSource = new object[] 
                    new object[] { "test11", DateTime.Now.ToLongTimeString() },
                    new object[] { "test12", DateTime.Now.ToLongTimeString() },
                    new object[] { "test13", DateTime.Now.ToLongTimeString() }
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    <html xmlns="">
    <head runat="server">
        <title>Ext.Net Example</title>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:GridPanel ID="GridPanel1" runat="server" AutoHeight="true">
                    <ext:Store runat="server" AutoLoad="false" OnRefreshData="Store_RefreshData">
                                    <ext:RecordField Name="test1" />
                                    <ext:RecordField Name="test2" />
                <ColumnModel runat="server">
                        <ext:Column Header="Test1" DataIndex="test1" />
                        <ext:Column Header="Test2" DataIndex="test2" />
            <ext:TaskManager runat="server" AutoRunDelay="0">
                    <ext:Task AutoRun="true" Interval="5000">
                            <Update Handler="GridPanel1.getStore().reload();" />
  3. #3

    Store data is not refreshing

    Hello Danill,

    Thanks for your example. But in my grid panel store, the data is not refreshing. And also it is not calling the method "Store_RefreshData" after some interval.

    Is there any way to call explicitly the"Store_RefreshData" method from other method in code behind ?? or reload all grid panel including store.??

  4. #4
    I used
    to reload the store/grid.

    Please provide your test sample.
  5. #5

    Store data is not refreshing

    He Danill.

    I have spawn a thread for following method:

    List<TaskRunDetails> taskRunList = new BusinessLogicLayer.MonitorTaskExecutionTrans().FetchTaskStatusInfo(batchId, repositoryId);
    new BusinessLogicLayer.ExecuteWorkFlowTrans().SaveBatchWorkflowsStatus(taskRunList, batchId);
    Store2.DataSource = taskRunList;
    But the grid data is not changing. So, can you please help me out of this.

    Last edited by Daniil; Jul 27, 2011 at 9:23 AM. Reason: Please use [CODE] tags
  6. #6
    Well, I don't know how you use the "Method1".

    And why do you use .Sleep()?

    Also you should use only one of these method: .DataBind() and .LoadData().
  7. #7

    Store data is not refreshing

    Hello Daniil,

    I have created one thread and passed it to method1(). So that user can also navigate to other pages in meanwhile at the time of method1() executes. Because, method() is taking around 4-5 minutes for execution.

    I am using sleep(), so that, control will wait for some time and then again fetch the data from database(updated). And i want to show that updated data into the grid view.

  8. #8
    Please provide a full sample which we can run and test locally on our side.

Similar Threads

  1. [CLOSED] Data binding to NetTiers data entity objects
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Apr 09, 2012, 3:35 PM
  2. Data Binding
    By Deepak in forum 1.x Help
    Replies: 3
    Last Post: Nov 04, 2010, 10:27 AM
  3. Replies: 10
    Last Post: Apr 15, 2010, 5:39 AM
  4. Replies: 3
    Last Post: Feb 25, 2010, 10:25 AM
  5. Replies: 8
    Last Post: Sep 06, 2008, 7:02 PM

Posting Permissions