Telerik Forums
UI for ASP.NET AJAX Forum
15 answers
820 views
Team,

Scenario
 : I have to assign the Mask property dynamically in Code Behind. 
Issue : Not able to type anything on the textbox field and nothing to display

IN ASPX:
<telerik:RadMaskedTextBox ID="tbHours" runat="server" SelectionOnFocus="SelectAll"                                                                                     CssClass="RadMaskedTextBox80" Height="20px"></telerik:RadMaskedTextBox>

IN C#
If (true)
{
tbHours.Text = "00.0";
tbHours.Mask = "<0..99>.<0..9>";
}
else
{
tbHours.Text = "00:00";
tbHours.Mask = "<00..23>:<00..59>"; 
}

Vasil
Telerik team
 answered on 07 Jan 2014
1 answer
97 views
Hi, this is Tom

I have been struggling with raising issues with the demo on your website, which is My Portal dock panel.
http://demos.telerik.com/aspnet-ajax/dock/examples/myportal/defaultcs.aspx

I used the example code as provided from the page and I found a issue that it dose not let me add new dock after closing one of docks on the zones. I even tested the given example on the website.
You can test that: add two any docks and close those two docks. After that, add new a dock. then you will see the issue.
I do not know how to fix this problem, it takes me so long time to figure it out. Please let me know how to deal with it!!!!!!
Slav
Telerik team
 answered on 07 Jan 2014
1 answer
600 views
Hi,
     I need a toggle box with two buttons inside it, on clicking a button in each row of the Radgrid..once I clicked one of the buttons inside the toggle box , it must be set as readonly..Is it possible ..? pls help me with a code..
Shinu
Top achievements
Rank 2
 answered on 07 Jan 2014
1 answer
180 views
Hi,

I want some solution that would handle all the three scenarios mentioned below.
Scenario 1:
I am using Content property of RadEditor to get values entered by the user in the RadEditor control. However, I see that every space in the value entered by user is getting converted to &nbsp;. For example, if user has entered the value as - 'Hi Hello' in the editor, the value we get from RadEditor1.Content is  - 'Hi&nbsp;Hello'. I don't want this to happen.

Scenario 2:
Also, my requirement is that in the same editor the user should be able to insert nonbreaking space by Ctrl+Shift+Space. For example, if the user types 'Hi(Ctrl+Shift+Space)Hello' we must get the value as 'Hi&nbsp;Hello'.

Scenario 3:
Also, if user manually types &nbsp; in the editor, it should be retained as it is and should not get replaced with space.

I tried using Text property of RadEditor. But it handles only first scenario mentioned and considers Ctrl+Shift+Space as normal space and not as &nbsp;

Answer through sample code would be helpful.

Thanks,
Prajna
Ianko
Telerik team
 answered on 07 Jan 2014
3 answers
1.0K+ views
Hi,

How can Apply the Own Custome Css on RadTextBox and RadTextArea with examples.

Kind Regards,
Rahul
Shinu
Top achievements
Rank 2
 answered on 07 Jan 2014
3 answers
165 views
Hi,
how apply the hight to Radtexbox in percentage not a pixcel. Please explain it with example.

Kind Regards,
Rahul
Princy
Top achievements
Rank 2
 answered on 07 Jan 2014
1 answer
300 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
148 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
528 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
248 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?