<WebMethod()> _Public Function GetLuogoNome(ByVal context As RadComboBoxContext) As RadComboBoxData Dim data As DataTable = GetCittadinanza(context.Text) Dim comboData As New RadComboBoxData() Dim itemOffset As Integer = context.NumberOfItems Dim endOffset As Integer = Math.Min(itemOffset + ItemsTipoGruppoPerRequest, data.Rows.Count) comboData.EndOfItems = endOffset = data.Rows.Count Dim result As New List(Of RadComboBoxItemData)(endOffset - itemOffset) For i As Integer = itemOffset To endOffset - 1 Dim itemData As New RadComboBoxItemData() itemData.Text = data.Rows(i)("descrizione").ToString() itemData.Value = data.Rows(i)("idrecord").ToString() result.Add(itemData) Next REM ottengo il messaggio dei record selezionati comboData.Message = GetStatusMessage(endOffset, data.Rows.Count) comboData.Items = result.ToArray() Return comboDataEnd FunctionPrivate Function GetLuogo(ByVal text As String) As DataTable REM SELECT * FROM Tab_categorie WHERE CONTAINS(descrizione, @text) REM per indici full text Dim conString = ConfigurationManager.ConnectionStrings("Receptionstring") Dim strConnString As String = conString.ConnectionString Using scope As New Transactions.TransactionScope Using db As New SqlConnection(strConnString) db.Open() Using sqlcmd As New SqlCommand("get_cittadinanza", db) sqlcmd.CommandType = CommandType.StoredProcedure sqlcmd.Parameters.AddWithValue("@textsearch", SqlDbType.VarChar).Value = text Dim adapter As New SqlDataAdapter(sqlcmd) Dim data As New DataTable() adapter.Fill(data) Return data End Using End Using scope.Complete() End Using
<telerik:RadFilter ID="VolSummaryRadFilter" runat="server" Skin="WebBlue" ShowApplyButton="true" OnFieldEditorCreating="VolSummaryRadFilter_FieldEditorCreating"
OnPreRender="VolSummaryRadFilter_PreRender" OnApplyExpressions="VolSummaryRadFilter_Apply" Visible="false" OnItemCommand="VolSummaryRadFilter_ItemCommand">
<FieldEditors>
<telerik:RadFilterDateFieldEditor FieldName="INVOICEDATE" DisplayName="Invoice Date"
DataType="System.DateTime" MinDate="1/1/1900" />
<
telerik:RadFilterTextFieldEditor FieldName="PROFITCENTERCODE" DisplayName="Profit Ctr Code"
DataType="System.String" />
<
telerik:RadFilterTextFieldEditor FieldName="WORKORDERNUMBER" DisplayName="WorkOrder #" DataType="System.String" />
</FieldEditors>
</telerik:RadFilter>
When using radfilter in radwindow like the following example, This radwindow/radfilter is shared my all the gird filter through my site.
http://demos.telerik.com/aspnet-ajax/filter/examples/filterinradwindow/defaultcs.aspx
If I have GridDateTimeColumn on the grid and have TimePicker and DatePicker as PickerType for separate column, On the filter, how can I check the GridDateTimeColumn PickerType to show date only (no time icon) when PickerType is DatePicker and show time only ( no date icon) when PickerType is TimePicker ?
Thanks
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<WeBOC.DAL.Vessel>" %><%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %><script runat="server"> protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { RadGrid1.DataSource = ViewData["Vessels"]; }</script><asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> Index</asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <form id="form2"> <h2>Vessels<telerik:RadScriptManager ID="RadScriptManager1" Runat="server"> </telerik:RadScriptManager> </h2> <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" Skin="WebBlue" onneeddatasource="RadGrid1_NeedDataSource" AllowPaging="True" PagerStyle-Mode="NextPrevNumericAndAdvanced"> <MasterTableView><CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings><RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn><ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="VIR_NO" HeaderText="VIR No." /> <telerik:GridBoundColumn DataField="INBOUND_VOY_NO" HeaderText="I/B Voyage" /> <telerik:GridBoundColumn DataField="OUTBOUND_VOY_NO" HeaderText="O/B Voyage" /> <telerik:GridBoundColumn DataField="VESSEL_NAME" HeaderText="Vessel Name" /> <telerik:GridBoundColumn DataField="ARRIVAL_DATE" HeaderText="Arrived" /> <telerik:GridBoundColumn DataField="STATE" HeaderText="Phase" /> <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" UniqueName="TemplateColumn"> <ItemTemplate> <asp:HyperLink ID="HyperLink1" runat="server" Text="View" NavigateUrl='<%#Url.Action("Inspector","Vessel",new{id=Modal.VSSL_CALL_ID}) %>'></asp:HyperLink> </ItemTemplate> </telerik:GridTemplateColumn> </Columns><EditFormSettings><EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn></EditFormSettings><PagerStyle PageSizeControlType="RadComboBox"></PagerStyle> </MasterTableView><PagerStyle PageSizeControlType="RadComboBox"></PagerStyle><FilterMenu EnableImageSprites="False"></FilterMenu> </telerik:RadGrid> </form></asp:Content>NavigateUrl='<%#Url.Action("Inspector","Vessel",new{id=Modal.VSSL_CALL_ID}) %>'>
<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);
}