Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
227 views
Hi,
i'm using two radcombobox inside a radgrid editform template
<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  --%>

and the sqldatasource is:
<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" />

and the codebehind is:
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


when i tried to change the company name it shows an error
"Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control."



Regards,
rafsan
Princy
Top achievements
Rank 2
 answered on 07 Jan 2014
1 answer
126 views
Hi, Telerik's team

I am with a problem on try perform updates in my radlistview filled by an objectdatasource.

I can put my radlistview in edit mode using "commands", but I cant update the data.

I used the template displayed in the radlistview page to create my page, but there are not example about how to make updates in radlistview using objectdatasource.

Please, give me a way to update data in control and after edition end, I wanna get the edited data and save in my database.



<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>

Radoslav
Telerik team
 answered on 07 Jan 2014
3 answers
464 views

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



Angel Petrov
Telerik team
 answered on 07 Jan 2014
2 answers
182 views

 

Hi,
Telerik 3Q 2013
New to telerik, have experience with other control suites.
I'm taking a dive into the Pivot Grid and running into some issues.
I would like to utilize a Configuration Panel with a pivot grid. I've set the appropriate properties and the configuration panel is not displaying.
I'm setting the data source at runtime via a DataTable.
I've opened the Demo project and noticed the configuration panel is built via the qsf namespace i.e. Telerik.QueckStart project.
Is there a two separate approaches to implementing the configuration panel?
The columns provided by the DataTable, have to be set to a column or a row?  I would like to give the user the ability drag and drop to and row or a column as they slice and dice data.

Antonio Stoilkov
Telerik team
 answered on 07 Jan 2014
6 answers
1.7K+ views

 I'm developing an ASP.NET Web Application in C#.

The user is selecting some listed values from radcombobox. Those values are being saved in Database. When the same user login and select the combo box, already selected values should be visible but shouldn't be get selected. I need to disable the values... Is there any options to do it.

Note : I'm populating the combo-box items from a database table.

Seda
Top achievements
Rank 1
 answered on 07 Jan 2014
12 answers
618 views
G Afternoon,
I am a newbie to AJAXing RadControls and having a hell of a time.
Just when i think i have finally got my RadGrid bound to a Web Service i get:
Sys.ArgumentNull Parameter id null
The error is thrown when i call 
var tableview = $find("<%= rdScreenings.ClientID %>").get_masterTableView();
I get the correct clientid if i call for that alone. as soon as I add get_ to attach a data source i get the error.

Here is the scripts i am running:
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script language="javascript" type="text/javascript" >

    function pageLoad() {
        proxy.GetScreeningsByZipCode44212(updateGrid);
    }
    function updateGrid(results) {
        alert("<%= rdScreenings.ClientID %>");
        var radgrid = $find("<%= rdScreenings.ClientID %>");
        alert('got radgrid');
        var tableview = $find("<%= rdScreenings.ClientID %>").get_masterTableView();
       
        alert('before datasource');
        tableview.set_dataSource(results);
        tableview.dataBind();
    }
    function refreshData() {

        proxy.GetScreeningsByZipCode44212(updateGrid);
    }
</script>
</telerik:RadScriptBlock>
// snippets of the html & controls
<asp:ScriptManager ID="scriptManager" runat="server">
    <Services>
        <asp:ServiceReference Path="~/proxy.asmx" />
    </Services>
</asp:ScriptManager>

I am using ASPNET AJAX Q1 2009

Igor
Top achievements
Rank 1
 answered on 07 Jan 2014
3 answers
226 views
Is it possible to export the grid content to pdf and automatically to scale the content down to fit one page (similar to Excel or "Pdf API and HTML to PDF Converter for .NET" http://www.essentialobjects.com/Products/EOPdf/Default.aspx) ?
Kostadin
Telerik team
 answered on 07 Jan 2014
8 answers
122 views
hi

Menu right Arrow image is not working in chrome , it is working fine IE. we are using 2010.1.519.35. we are using following CSS for Right Arrow

.rmVertical .rmExpandRight     
{      
    
    background: transparent url('../../images/MenuRightArrow.gif') no-repeat right right !important;                         
            
}

i tried url base 64 also it is not working , please suggest me the solution


nsrikanth 2009
Top achievements
Rank 1
 answered on 07 Jan 2014
3 answers
362 views
Hi,
    Is the grid support autoellipsis function ?
Thank you for your answer.

Don.,
Princy
Top achievements
Rank 2
 answered on 07 Jan 2014
5 answers
76 views
Dear;

i'm using RadinputManager with text boxes (not RadTxtbox) for validation purpose, every thing is working fine except the Yalow caution logo appear with the error message inside the textbox, the skin is working because the error message come with red color (this means the skin is registered) but still i don't know the reason and how i can remove this Yalow logo from the text box.


Best regards  

Sami
Top achievements
Rank 1
 answered on 07 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?