Thursday, November 28, 2013

Add GridView Row Without PostBack And Get value using Jquery AutoComplete

  
    
    
    
    
    
Add Html Code
  

    
AutoComplete Demo With Editable Html Grid
Yor Product Name :
       
  
 [System.Web.Services.WebMethod]
        public static string CalledPageMethod(string jsonString, string total)
        {
            JsonSerializer json = new JsonSerializer();

            List sdf = JsonConvert.DeserializeObject>(jsonString);
            string subTotal = total;
            return "success";
        }

        [WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
        public static List GetAllProduct()
        {
            List product = null;

            using (ManishTempEntities obj = new ManishTempEntities())
            {
                product = obj.Products
                    .OrderBy(p => p.Category.Name)
                    .Select(p => new Entity.Product
                    {
                        Id = p.Id,
                        CatId = p.CatId,
                        Name = p.Name,
                        CategoryName = p.Category.Name,
                    }).ToList();
            }

            return product;
        }

        internal class MyClass
        {
            public Guid Id { get; set; }

            public string Name { get; set; }

            private int _Qnty;

            public int Qnty
            {
                get { return _Qnty = 1; }
                set { _Qnty = value; }
            }

            public decimal Price { get; set; }

            public decimal Total { get; set; }
        }

No comments:

Post a Comment