EXT.NET v3.0 BETA RELEASED!
Now with Tablet Support!
Ext.NET v3.0 Beta is here with lots of new cool features and now with tablet support! Check Examples Explorer now to see it in action or download and test it yourself for free!
Results 1 to 5 of 5

Thread: how to get record from store?

  1. #1
    Member
    Join Date
    Mar 2012
    Posts
    20

    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??
    Code:
     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
    Ext.NET - Support Team Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    28,033
    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
    Ext.NET, Inc.
    Support Team

    Ext.NET Examples | Ext.NET API Docs | ExtJS API Docs | Twitter | Jobs

  3. #3
    Member
    Join Date
    Mar 2012
    Posts
    20
    thank you!
    but Where can I download V2.0?

  4. #4
    Ext.NET - Support Team Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    28,033
    It's available to install via NuGet:
    Code:
    Instal-Package Ext.NET Pre
    Daniil
    Ext.NET, Inc.
    Support Team

    Ext.NET Examples | Ext.NET API Docs | ExtJS API Docs | Twitter | Jobs

  5. #5
    Member
    Join Date
    Mar 2012
    Posts
    20
    thanks a lot!

Similar Threads

  1. Replies: 1
    Last Post: Dec 22, 2011, 7:17 AM
  2. Replies: 16
    Last Post: May 26, 2011, 11: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, 11:03 AM
  4. Add record to store
    By Argons in forum 1.x Help
    Replies: 4
    Last Post: Aug 05, 2009, 1:40 AM
  5. Replies: 5
    Last Post: May 15, 2009, 8:40 AM

Posting Permissions