

<div class="art-layout-cell layout-item-1" style="width: 100%;"> <div class="art-layout-cell layout-item-4" style="width: 30%;"> <asp:Label ID="label_SelectCompany" AssociatedControlID="cmb_company" runat="server" Text="Company Name:" /> </div> <div class="art-layout-cell layout-item-4" style="width: 60%;"> <telerik:RadComboBox runat="server" ID="cmb_company" Height="250" AppendDataBoundItems="True" CausesValidation="False" CollapseDelay="10" SelectedValue='<%# Bind("CompanyID") %>' DataMember="DefaultView" AutoPostBack="true" ExpandDelay="0" ItemRequestTimeout="0" Width="80%" MarkFirstMatch="True" EmptyMessage="- Select Company -" DataSourceID="SqlDataSource_Company" DataTextField="CompanyName" DataValueField="ID" OnSelectedIndexChanged="cmb_company_SelectedIndexChanged" /> <asp:RequiredFieldValidator ID="CompanyRequired" runat="server" ControlToValidate="cmb_company" ErrorMessage="*" ForeColor="Red" ValidationGroup="CompanyGroup" /> </div></div> <%-- cmb_company --%><div class="art-layout-cell layout-item-1" style="width: 100%;"> <div class="art-layout-cell layout-item-4" style="width: 30%;"> <asp:Label ID="label_CommercialActivity" AssociatedControlID="cmb_commercialActivity" runat="server" Text="Commercail Activity:" /> </div> <div class="art-layout-cell layout-item-4" style="width: 60%;"> <telerik:RadComboBox runat="server" ID="cmb_commercialActivity" AppendDataBoundItems="True" CausesValidation="False" CollapseDelay="10" DataMember="DefaultView" ExpandDelay="0" ItemRequestTimeout="0" Width="80%" MarkFirstMatch="True" EmptyMessage="- Select Commercial Activity -" SelectedValue='<%# Bind("EmployeeCommercialActivityID") %>' DataSourceID="SqlDataSource_CommercialActivity" DataTextField="CommercialActivityEnglishName" DataValueField="ID" /> <%--<asp:RequiredFieldValidator ID="CommercialActivityRequired" runat="server" ControlToValidate="cmb_commercialActivity" ErrorMessage="*" ForeColor="Red" ValidationGroup="CompanyGroup" />--%> </div></div> <%-- cmb_commercialActivity --%><asp:SqlDataSource ID="SqlDataSource_CommercialActivity" runat="server" ConnectionString="<%$ ConnectionStrings:HRSystemDataBaseConnection %>" SelectCommand="SELECT APP_CompaniesCommercialActivities.ID, APP_CommercialActivities.CommercialActivityEnglishName FROM APP_CompaniesCommercialActivities INNER JOIN APP_CommercialActivities ON APP_CompaniesCommercialActivities.CommercialActivityID = APP_CommercialActivities.ID WHERE (APP_CompaniesCommercialActivities.CompanyID = @CompanyID) ORDER BY APP_CommercialActivities.CommercialActivityEnglishName"> <SelectParameters> <asp:SessionParameter Name="CompanyID" SessionField="CompanyID" /> </SelectParameters></asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource_Company" runat="server" ConnectionString="<%$ ConnectionStrings:HRSystemDataBaseConnection %>" SelectCommand="SELECT ID, CompanyName FROM APP_Companies ORDER BY CompanyName" />Protected Sub cmb_company_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs) Session("CompanyID") = e.Value Dim _EditForm As GridEditFormItem = DirectCast(DirectCast(sender, RadComboBox).NamingContainer, GridEditFormItem) Dim _CommercialActivity As RadComboBox = DirectCast(_EditForm.FindControl("cmb_commercialActivity"), RadComboBox) _CommercialActivity.ClearSelection()End Sub<telerik:RadListView ID="radListView" ItemPlaceholderID="CustomersContainer"
runat="server" OnItemCommand="radListView_ItemCommand"
DataKeyNames="ID" AllowPaging="True" PageSize="1" Width="90%">
<LayoutTemplate>
<fieldset id="fsRadListView" style="width: 1000px !important;"> <legend style="margin:0px 0px 0px 15px !important">Empréstimos</legend> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td> <telerik:RadDataPager ID="RadDataPager1"
runat="server" PagedControlID="radListView" PageSize="1"> <Fields> <telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField> <telerik:RadDataPagerButtonField FieldType="Numeric" ></telerik:RadDataPagerButtonField> <telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField> <telerik:RadDataPagerGoToPageField SubmitButtonText="Go" TextBoxWidth="15" /> <telerik:RadDataPagerTemplatePageField> <PagerTemplate> <div style="float: right"> <b>Items <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" /> to <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.StartRowIndex+Container.Owner.PageSize %>" /> of <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" /> <br /> </b> </div> </PagerTemplate> </telerik:RadDataPagerTemplatePageField> </Fields> </telerik:RadDataPager> </td> </tr> </table> </fieldset><asp:PlaceHolder ID="PlaceHolder" runat="server"></asp:PlaceHolder><br > </LayoutTemplate>
<ItemTemplate>
<fieldset class="fieldSetBackgroud"> <div class="divForm" style="text-align: left"> <label class="labelForm">Product :</label> <asp:Label ID="lblProduto" runat="server" Text='<%# Eval("ProductName")%>'></asp:Label> </div> <div class="divForm" style="text-align: left"> <label class="labelFormulario">Factory :</label> <asp:Label ID="Label10" runat="server" Text='<%# Eval("Factory")%>'></asp:Label> </div> <div class="divForm" style="text-align: left"> <label class="labelForm">Amount :</label> <asp:Label ID="Label11" runat="server" Text='<%# Eval("Amount")%>'></asp:Label> </div> <div class="divForm" style="text-align: left"> <label class="labelForm">Total Price :</label> <asp:Label ID="Label15" runat="server" Text='<%# Eval("TotalPrice")%>'></asp:Label> </div> <asp:Button ID="btnEdit" runat="server" Text="Edit" CommandName="Edit" class="edit button"></asp:Button> </fieldset>
</ItemTemplate>
<EditItemTemplate> <fieldset class="fieldSetBackgroud"> <div class="divForm" style="text-align: left"> <label class="labelForm">Product:</label> <asp:Label runat="server" Text='<%# Eval("ProductName")%>'></asp:Label> </div> <div class="divForm" style="text-align: left"> <label class="labelForm">Factory:</label> <telerik:RadTextBox ID="txtFactory" runat="server" Text='<%# Eval("Factory")%>'></telerik:RadTextBox> </div> <div class="divForm" style="text-align: left"> <label class="labelForm">Quantidade :</label> <telerik:RadNumericTextBox ID="txtAmount" runat="server" Value='<%#Eval("Amount")%>' ></telerik:RadNumericTextBox> </div> <div class="divForm" style="text-align: left"> <label class="labelFormulario">Total Price :</label> <telerik:RadNumericTextBox ID="txtTotalPrice" runat="server" Value='<%#Eval("TotalPrice")%>'></telerik:RadNumericTextBox> </div> <asp:Button ID="btnUpdate" runat="server" Text="Update Item" CommandName="Update" ToolTip="Apply changes."></asp:Button> <asp:Button ID="btnCancel" runat="server" Text="Cancel" CommandName="Cancel" ></asp:Button> </fieldset>
</EditItemTemplate>
</telerik:RadListView>
<asp:ObjectDataSource ID="objectdatasource" runat="server" SelectMethod="ListItems"
TypeName="...my namespace..."></asp:ObjectDataSource>
Hello,
I have issue with RadGrid1.MasterTableView.FilterExpression. I have to use parametrized stored procedures in my project. In the RadGrid, there are some numeric columns which I want to have CurrentFilterFunction="Contains". Because of that EnableLinqExpressions has to be set to true.
The result is, that value in the FilterExpression is shown in the Linq syntax instead of SQL syntax:
Linq: "(it[\"SAP_sklad\"].ToString().ToUpper().Contains(\"01\".ToUpper()))"
SQL: "([SAP_sklad] LIKE '%01%')";
Does somebody know, how can I easily convert a FilterExpression value from linq format to standard SQL format ?
I've found this link, where are exactly described all differences between Linq and SQL.
http://www.telerik.com/help/aspnet-ajax/grid-operate-with-filter-expression-manually.html
Please, help me to solve this issue.
Thank you
Best regards
Vasssek