Load ext:XmlReader using datasource from code behind

  1. #1

    Load ext:XmlReader using datasource from code behind

    Does this code (below) work? I was reading a post from back in 2008 which suggested datasource binding was not possible unless the source was pure xml. The return from my sp is using a sql query with FOR XML which returns an xml element and my return type in LINQ is set to XElement. Which makes the source pure xml. The store is bound without error but the store appears to be without data.

    'Codebehind
    Dim ldxml As LINQDocumentDataDataContext = New LINQDocumentDataDataContext(MyConnectionString)
    Dim xmlResults = ldxml.ebs_GetDataAsXMLElement(ID)
    XMLStore.DataSource = xmlResults
    XMLStore.DataBind()

    'Page
    <ext:Store ID="XMLStore" runat="server">
    <Reader>
    <ext:XmlReader>
    </ext:XmlReader>
    </Reader>
    </ext:Store>
    Last edited by ctallos; Sep 13, 2011 at 3:27 PM. Reason: Missing some points
  2. #2
    It is possible via XmlDataSource only (if you bind data in the page)
    https://examples1.ext.net/#/GridPanel/DataSource_Controls/XmlDataSource/

    or if you get data from webservice
    https://examples1.ext.net/#/GridPane...ML_WebService/
  3. #3

    Proxy method?

    If I use the HttpProxy method when is the store bound during page events?
  4. #4
    If you rebind data during DirectEvent or use remote paging with PageProxy then page will be recreated for each data request. It is more heavy for the server if compare with webservice data retrieving

    In any case, it is better when UI and data are delimited
  5. #5
    Thank you, you can close this thread.
  6. #6

    Unable to bind Xmldata from database to grid panel

    Hello there, How can i create a new thread ? So thats why i m posting here my problem related to XML

    following my problem:
    I m able to display the records after specifying the path of XML file in Ajaxproxy url.
    i m trying to bind GridPanel with database in code-behind.
    so kindly let me know how can i display that data in gridpanel without using ajax proxy with url ?
    I dont to use XML file on XML data from database tables.

    Hope you can understand.


    following code with linq

    protected void Page_Load(object sender, EventArgs e)
    {
    dbUsersEntities _context = new dbUsersEntities();
    this.GridStore.DataSource = _context.UserLogins.ToList();
    this.GridStore.DataBind();
    }

    With regards
    vik

Similar Threads

  1. Replies: 0
    Last Post: May 08, 2012, 12:57 PM
  2. [CLOSED] DataSource for Combobox from code behind
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 11, 2012, 4:49 PM
  3. Replies: 1
    Last Post: Oct 12, 2010, 8:39 PM
  4. Replies: 0
    Last Post: Jun 26, 2009, 11:32 AM
  5. [CLOSED] GridPanel Datasource from Code Behind
    By amitpareek in forum 1.x Help
    Replies: 10
    Last Post: Nov 16, 2008, 2:53 PM

Tags for this Thread

Posting Permissions