or
<telerik:RadFilter ID="InventoriesRadFilter" runat="server" Skin="WebBlue" ShowApplyButton="true"
OnPreRender="InventoriesRadFilter_PreRender" OnApplyExpressions="InventoriesRadFilter_Apply"
ApplyButtonText="Filter Inventory" OnFieldEditorCreating="RadFilter_FieldEditorCreating" OnItemCommand="InventoriesRadFilter_ItemCommand">
<FieldEditors>
<goldcustom:RadFilterComboBoxEditor DataSourceID="GetCustInvODS" FieldName="OWNER_COMPANYNAME" DisplayName="Owner Name" ComboBoxSkin="WebBlue" ComboBoxWidth="350px"
DataType="System.String" />
</FieldEditors>
</telerik:RadFilter>
THE ODS [need somehow to get what's typed in the RadFilterComboBoxEditor above
public DataTable getCustForInventory()
{
DataTable dt = new DataTable();
int[] myLoc = DivisionIDArray;
using (InventoryBC ibc = new InventoryBC())
{
dt = ibc.GetCustomerForInventory(myLoc,
"" );
return dt;
}
}
public override void InitializeEditor(Control container)
{
comboBox =
new RadComboBox();
comboBox.ID =
"ComboBoxEditor" + FieldName;
comboBox.DataSourceID = DataSourceID;
comboBox.OnClientSelectedIndexChanged =
"clientSelectedIndexChanged";//changes focus to the default button of the page
comboBox.OnClientLoad =
"clientSelectedIndexChanged";//changes focus to the default button of the page so, 1st item in the list can be selected
comboBox.DataTextField = (
String.IsNullOrEmpty(DataTextField)) ? FieldName : DataTextField;
comboBox.DataValueField = (
String.IsNullOrEmpty(DataValueField)) ? FieldName : DataValueField;
comboBox.Skin = ComboBoxSkin;
comboBox.Width = ComboBoxWidth;
container.Controls.Add(comboBox);
}
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="SOMS.master.cs" Inherits="SOMS.SOMS" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <asp:ContentPlaceHolder ID="head" runat="server"> </asp:ContentPlaceHolder></head><body> <form id="form1" runat="server"> <div> <telerik:RadMenu ID="RadMenu1" runat="server"> <Items> <telerik:RadMenuItem Text="Main Menu" PostBack="false"> <Items> <telerik:RadMenuItem> <ItemTemplate> <img id="imgMainMenu" src="images/MainMenu.jpg" usemap="#mapMainMenu" border="0" width="950" height="510" alt="" /> <map id="_mapMainMenu" name="mapMainMenu"> <area shape="rect" coords="46,79,143,148" href="CSRRequestRefill.aspx" alt="Request Refill" title="Request Refill" /> <area shape="rect" coords="46,293,143,362" href="PHRSubmitRequst.aspx" alt="Submit Request" title="Submit Request" /> <area shape="rect" coords="233,79,330,148" href="CSRStatus.aspx" alt="CSR Status" title="CSR Status" /> <area shape="rect" coords="233,179,330,248" href="CSRIntake.aspx" alt="CSRIntake.aspx" title="CSRIntake.aspx" /> <area shape="rect" coords="233,291,330,360" href="CSRBillPrep.aspx" alt="CSRBillPrep.aspx" title="CSRBillPrep.aspx" /> <area shape="rect" coords="233,406,330,475" href="CSRApproval.aspx" alt="Approval" title="Approval" /> <area shape="rect" coords="419,291,516,360" href="PHRRequestHold.aspx" alt="Request Hold" title="Request Hold" /> <area shape="rect" coords="623,292,720,361" href="PHRFilling.aspx" alt="Filling" title="Filling" /> <area shape="rect" coords="623,404,720,473" href="PHRShipping.aspx" alt="Shipping" title="Shipping" /> <area shape="rect" coords="810,90,907,159" href="PHRStatus.aspx" alt="Status" title="Status" /> <area shape="rect" coords="808,291,905,360" href="PHRCompounding.aspx" alt="Compounding" title="Compounding" /> <area shape="rect" coords="808,405,905,474" href="PHRShipped.aspx" alt="Shipped" title="Shipped" /> </map> </ItemTemplate> </telerik:RadMenuItem> </Items> </telerik:RadMenuItem> </Items> </telerik:RadMenu> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </form></body></html>RadGrid grid = new RadGrid();grid.ID = "CustomViewGrid";grid.AllowFilteringByColumn = true;grid.AutoGenerateColumns = false;grid.AllowPaging = true;grid.AllowSorting = true;grid.PageSize = view.PageSize;grid.ClientSettings.Scrolling.AllowScroll = true;grid.ClientSettings.Scrolling.SaveScrollPosition = true;grid.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel( 500 );grid.ClientSettings.Scrolling.UseStaticHeaders = true;grid.ClientSettings.Selecting.AllowRowSelect = true;grid.ClientSettings.Selecting.UseClientSelectColumnOnly = true;grid.AllowMultiRowSelection = true;grid.GroupingSettings.CaseSensitive = false;grid.PagerStyle.Mode = GridPagerMode.NextPrevNumericAndAdvanced;grid.MasterTableView.AutoGenerateColumns = false;grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None;grid.MasterTableView.DataKeyNames = new string[] { view.TableKeyName };return grid;GridBoundColumn column = new GridBoundColumn();column.DataField = dataField;column.UniqueName = dataField;column.AllowFiltering = true;column.CurrentFilterFunction = GridKnownFunction.Contains;column.FilterControlWidth = Unit.Pixel(100);column.ItemStyle.Width = Unit.Pixel(120);column.HeaderStyle.Width = Unit.Pixel(120);column.AutoPostBackOnFilter = true;column.ShowFilterIcon = false;return column;EntityDataSource dataSource = new EntityDataSource();dataSource.ID = "CustomViewGridDataSource";dataSource.EntitySetName = view.TableName;dataSource.ContextCreating += dataSource_ContextCreating; // set the object context here since I am using code-first EF5.0dataSource.Where = view.Filter;grid.DataSource = dataSource;An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
|
resource.Attributes.Add("JobTitle", "Software engineer")jobTitle = args.Container.Resource.Attributes("JobTitle")