or
protected void ddlCategory_SelectedIndexChanged(object sender, EventArgs e) { ProductRepository productRP = new ProductRepository(); Filters filters = new Filters(); filters.Add(new Filter("Supplier.Id", SupplierId)); if (ddlCategory.SelectedValue != "All") filters.Add(new Filter("Product.ProductCategory.Id", ddlCategory.SelectedValue.ToString())); IList<SupplierProduct> supplierProducts = productRP.LoadList<SupplierProduct>(filters); RadGrid1.DataSource = supplierProducts; // System.Threading.Thread.Sleep(3000); RadGrid1.Rebind(); }
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { ProductRepository productRP = new ProductRepository(); Filters filters = new Filters(); filters.Add(new Filter("Supplier.Id", SupplierId)); if(ddlCategory.SelectedValue != "All") filters.Add(new Filter("Product.ProductCategory.Id", ddlCategory.SelectedValue.ToString())); // filters.Add(new Filter("Active","true")); // filters.Add(new Filter("Product.Active", "true")); IList<SupplierProduct> supProducts = productRP.LoadList<SupplierProduct>(filters); RadGrid1.DataSource = supProducts; }protected void Page_Load(object sender, EventArgs e) { SupplierId = Session["SupplierId"].ToString(); if (String.IsNullOrEmpty(SupplierId)) { Response.Redirect("login.aspx"); } if (!Page.IsPostBack){ ProductRepository productRP = new ProductRepository(); Filters filters = new Filters(); filters.Add(new Filter("Supplier.Id", SupplierId)); IList<SupplierProductCategory> SupplierProductCategories = productRP.LoadList<SupplierProductCategory>(filters, "ProductCategory.Description"); IList<ProductCategory> ProductCategories = new List<ProductCategory>(); foreach (SupplierProductCategory supplierProductCategory in SupplierProductCategories) { ProductCategories.Add(supplierProductCategory.ProductCategory); } ddlCategory.DataSource = ProductCategories; ddlCategory.DataBind(); } } <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
ClientEvents-OnRequestStart="mngRequestStarted"
meta:resourcekey="RadAjaxManager1Resource1">
<AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="RadInputManager1" /> <telerik:AjaxUpdatedControl ControlID="Label1" /> <telerik:AjaxUpdatedControl ControlID="RadMenu1" /> <telerik:AjaxUpdatedControl ControlID="ddlCategory" /> <telerik:AjaxUpdatedControl ControlID="ddlLanguage" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="RadInputManager1" /> <telerik:AjaxUpdatedControl ControlID="Label1" /> <telerik:AjaxUpdatedControl ControlID="RadMenu1" /> <telerik:AjaxUpdatedControl ControlID="ddlCategory" /> <telerik:AjaxUpdatedControl ControlID="ddlLanguage" /> </UpdatedControls> </telerik:AjaxSetting> <%-- ----excel export----------%> <telerik:AjaxSetting AjaxControlID="mngBtnExcel"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> <telerik:AjaxUpdatedControl ControlID="mngBtnExcel" /> </UpdatedControls> </telerik:AjaxSetting> <%-- ----context menu----------%> <telerik:AjaxSetting AjaxControlID="RadMenu1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="RadMenu1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="ddlCategory"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="ddlCategory" /> </UpdatedControls> </telerik:AjaxSetting>
...chartSeries1.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Arial", 10, System.Drawing.FontStyle.Bold