We have been working hard on Ext.NET Mobile and are happy to announce a Beta release is now available. Ext.NET Mobile is an ASP.NET component framework for building Phone and Tablet specific mobile web applications. Read more here

how to get record from store?

  1. #1

    how to get record from store?

    When I was learning examples(Custom Window with Record Details ),it always pop-up errors.
    "Ext.net.Store" does not contain a definition of the "GetById".
    the error code is "var record = this.GridStore.GetById(id);",How can we get the correct record??
     protected void SaveEmployee(object sender, DirectEventArgs e)
        {
            NorthwindDataContext db = new NorthwindDataContext();
            int id = int.Parse(e.ExtraParams["id"]);
    
            Employee empl = Employee.GetEmployee(id, db);
    
            //Company
            empl.FirstName = this.FirstName.Text;
            empl.LastName = this.LastName.Text;
            empl.Title = this.Title.Text;
    
            if (!string.IsNullOrEmpty(this.ReportsTo.SelectedItem.Value))
            {
                empl.ReportsTo = int.Parse(this.ReportsTo.SelectedItem.Value);
            }
            else
            {
                empl.ReportsTo = null;
            }
    
            empl.HireDate = this.HireDate.SelectedDate;
            empl.Extension = this.Extension.Text;
    
            //Personal
            empl.Address = this.Address.Text;
            empl.City = this.City.Text;
            empl.PostalCode = this.PostCode.Text;
            empl.HomePhone = this.HomePhone.Text;
            empl.TitleOfCourtesy = this.TitleCourt.Text;
            empl.BirthDate = this.BirthDate.SelectedDate;
            empl.Region = this.Region.Text;
            empl.Country = this.Country.Text;
            empl.Notes = this.Note.Text;
    
            db.SubmitChanges();
    
            var record = this.GridStore.GetById(id);        
    
            this.EmployeeDetailsWindow.Hide();
            CompanyInfoTab.UpdateRecord(record);
            PersonalInfoTab.UpdateRecord(record);
            record.Commit();
        }
  2. #2
    Hi,

    I guess you use Ext.NET v1, but see the examples for Ext.NET v2.

    Ext.NET v1 examples are here:
    http://examples1.ext.net
    Daniil Veriga
    Developer & Support Expert
  3. #3
    thank you!
    but Where can I download V2.0?
  4. #4
    It's available to install via NuGet:
    Instal-Package Ext.NET Pre
    Daniil Veriga
    Developer & Support Expert
  5. #5
    thanks a lot!

Similar Threads

  1. Replies: 1
    Last Post: Dec 22, 2011, 6:17 AM
  2. Replies: 16
    Last Post: May 26, 2011, 10:23 PM
  3. [CLOSED] Store.remove(record) and Store.reload()
    By capecod in forum 1.x Premium Help
    Replies: 2
    Last Post: Nov 08, 2010, 10:03 AM
  4. Add record to store
    By Argons in forum 1.x Help
    Replies: 4
    Last Post: Aug 05, 2009, 12:40 AM
  5. Replies: 5
    Last Post: May 15, 2009, 7:40 AM

Posting Permissions

Subscribe now to get the latest Ext.NET happenings in our newsletter.