Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
121 views
Hi i am looking for the functionality on the client side for the Editor from which i can get the exact character count of the Characters if its in HTML mode (i.e mode = 2).
i have used

var

oValue = Editor.get_html(true).trim();    ----(a)
-In this case oValue.length is showing the result which is a count of text entered by user as well as the html tags included.
also i have tried var oValue = Editor.get_text(true).trim();     ----(b)
-In this case we are getting the plain text count text count    

eg: if i enter: B
                b
(text is bolded just to distinguish)I shud get count = 3 as we get in MS word if we check. but from (a) and (b) we get diffrent result. This is creating trouble with our QA as we are not getting things approved due to this :(. Can anybody help me on this.
  
Thanks.

 

Rumen
Telerik team
 answered on 05 Apr 2012
3 answers
96 views
Hi,
I have a RadGrid which has NestedHierarchy set up. I also have edit functionality associated to grid rows.

<Columns>
    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" EditText="Rename Favourite" HeaderStyle-Width="15px">
        <ItemStyle CssClass="edit-grid-controls" />
    </telerik:GridEditCommandColumn>
    <telerik:GridTemplateColumn HeaderText="Name" UniqueName="Name">
        <ItemTemplate> 
<%# Eval("Name") %> </ItemTemplate>
        <EditItemTemplate><asp:TextBox ID="txtFavouriteName" runat="server" Text='<%# Eval("Name") %>' Width="100%" MaxLength="256" />
        </EditItemTemplate>
    </telerik:GridTemplateColumn>
    ... more columns ...
</Columns>

1. Since the time this grid was converted to a nested self referencing hierarchy table, the Name is displayed twice!
2. If I remove UniqueName attribute, the data wont show up.
3. If I remove ItemTemplate, things are fine until I attempt for an edit thru "GridEditCommandColumn".
4. Please have a look at the attached images. Image ending with right is for "normal" radgrid. Image ending with "wrong" is for nested hierarchy grid. When in edit mode, I don't want to display values twice.
Andrey
Telerik team
 answered on 05 Apr 2012
1 answer
84 views
So I'm trying to use a RadWindowManager in conjuction with an appointment insert. So far I have the following:

VB Code-Behind:
Protected Sub RadScheduler1_AppointmentInsert(sender As Object, e As Telerik.Web.UI.AppointmentInsertEventArgs) Handles RadScheduler1.AppointmentInsert
            RadWindowManager1.RadConfirm("Server radconfirm: Are you sure?", "confirmCallBackFn", 330, 100, Nothing, "Server RadConfirm", Nothing)
End Sub

Javascript functions:
<script type="text/javascript">
    function schedulerFormCreated() {
            $telerik.$(".rsRecurrenceOptionList li:eq(4)").hide(); 
    }
      
        function confirmCallBackFn(arg)
    {
         return arg;
    }
      
    function OnClientAppointmentInserting(sender, eventArgs)
  {
    if(confirmCallBackFn())
        {
         eventArgs.set_cancel(false);
        }       
            else { eventArgs.set_cancel(true);
        }
  }
  
</script>

The problem I seem to be having is that the radconfirmation window isn't even being called upon appointment insert, therefore the javascript function is returning a null or undefined value. If the radconfirm is not even being displayed, I can't pass the true or false value on to the inserting client event in order to go ahead and insert or cancel the insert. Anybody have any insight or have a working version of this? Any help would be greatly appreciated!
Plamen
Telerik team
 answered on 05 Apr 2012
6 answers
188 views
Hi,

We have noticed the following behaviour:
Scenario:
1) Set the new line mode to paragraph
2) Enter some line, for example "First Line", and press Enter
3) Go to HTML view
Perform this actions in IE and Chrome.
HTML view in IE:
<p>New Line</p>
<p>&nbsp;</p>
HTML view in Chrome:
<p>New Line</p>
<p><br />
</p>

Why is the mark-up different in this browsers? Is this the expected behaviour or such kind of a bug?

Best regards,
Roman
Rumen
Telerik team
 answered on 05 Apr 2012
2 answers
1.4K+ views
Hi guys, I was hoping you could provide some advice on setting the value of a RadNumericTextBox.

I have another control (dropdown) that when changed needs to update the RadNumericTextBox.

The javascript is firing and returning the current value as per below.

var txtTypeSelected = window["<%=txtOffsetPeriod2.ClientID %>"];
alert(txtTypeSelected.value);

However when I then try to set a new value this doesn't appear on screen as the control has had its id set as txtOffsetPeriod2_text.

txtTypeSelected.value = 1;

Is there another way I can set the RadNumericTextBox value when the function is called by another controls change event?

Thanks for the help.
Jibber4568
Top achievements
Rank 1
 answered on 05 Apr 2012
1 answer
56 views
This is my first time trying out RadChart. I have a very simple chart (that followed the example in the documentation section):

<telerik:RadChart ID="RadChart1" runat="server" DefaultType="Line" />

The code behind does a simple database query:

SqlDataSource sqlDataSource = new SqlDataSource();
sqlDataSource.ID = "myDataSource";
sqlDataSource.ConnectionString = "<snip>";
sqlDataSource.SelectCommand = "select convert(varchar(10),SearchDate,101) as SearchDate, AverageSoldPrice from SearchResult where SearchId = 1 order by SearchDate";
this.Page.Controls.Add(sqlDataSource);
RadChart1.DataSourceID = "myDataSource";
RadChart1.Series[0].DataYColumn = "AverageSoldPrice";
RadChart1.PlotArea.XAxis.DataLabelsColumn = "SearchDate";
RadChart1.DataBind();

If I execute that line in the database, I get 30 rows back. However, when the chart is created, I only have the first 8 items shown, labeled 0 through 7. Why are the others missing, and how can I get the actually dates to be displayed?
Evgenia
Telerik team
 answered on 05 Apr 2012
4 answers
345 views
Hi!

I am able to modify the background image of the combobox using this css (images attached). However, we loose the hover and focus image (see results.png for the focus problem.)
 
How do I change the images for the various states? Thanks!

Michael
.radComboBox td.rcbInputCell
{
    background-image: url('/Images/ComboBoxSprite.png') !important;
}
.radComboBox table td.rcbArrowCell
{
    background: #ffffff url('/Images/ComboBoxDropDown.png') no-repeat -1px 50%;
}

Michael O'Flaherty
Top achievements
Rank 2
 answered on 05 Apr 2012
1 answer
140 views
Hi i am using the MaxHtmlLength and get the pop up telling me the content is over the limit, but the user can still submit the page. Is there a way i can check and stop them doing this?

Thanks,
Michael
Rumen
Telerik team
 answered on 05 Apr 2012
3 answers
192 views
Hi,

When I click the 'export to excel' icon, the grid flickers, and nothing happens. My code is like this:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="1000">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadGrid ID="RadGrid2" runat="server" AllowPaging="True" OnItemDataBound="RadGrid2_ItemDataBound"
        Width="100%" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="True"
        OnInsertCommand="RadGrid2_InsertCommand" OnItemCommand="RadGrid2_ItemCommand"
        OnUpdateCommand="RadGrid2_UpdateCommand" GridLines="None" PageSize="100" AllowFilteringByColumn="True"
        DataSourceID="EntityConference" CellSpacing="0" OnDeleteCommand="RadGrid2_DeleteCommand">
        <ExportSettings FileName="ConferenceRegistrationApplications" 
            IgnorePaging="True">
            <Excel Format="ExcelML" />
        </ExportSettings>
        <MasterTableView EditMode="PopUp" CommandItemDisplay="Top" ItemStyle-VerticalAlign="Top"
            DataKeyNames="RegistrationId" CommandItemSettings-ShowExportToExcelButton="true" com >
            <ItemStyle VerticalAlign="Top" />
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton">
                    <HeaderStyle Width="3%" />
                </telerik:GridEditCommandColumn>               
               
                <telerik:GridBoundColumn HeaderText="Title" DataField="Title">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="FirstName" DataField="FirstName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="Surname" DataField="Surname">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="Organisation" DataField="Organisation">
                </telerik:GridBoundColumn>  
                  <telerik:GridTemplateColumn HeaderText="File">
                    <ItemTemplate>
                        <a href="" runat="server" id="AbstractLink">Open</a>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>            
                <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="ImageButton"
                    ConfirmDialogType="RadWindow" ConfirmText="Are you sure to delete" ConfirmTitle="Notification">
                    <HeaderStyle Width="2%" />
                </telerik:GridButtonColumn>
            </Columns>
            <EditFormSettings InsertCaption="New Conference" CaptionFormatString="Edit - {0}" CaptionDataField="RegistrationId"
                EditFormType="Template">
                <EditColumn ButtonType="ImageButton" />
                <PopUpSettings Height="1200px" Width="700px" Modal="true" />
                <FormTemplate>
                    <table width="100%">                     
                        <tr>
                            <td>
                                <b>Title:</b>
                            </td>
                            <td>
                                <asp:DropDownList runat="server" DataSourceID="EntityTitles" DataValueField="TitleText"
                                    DataTextField="TitleText" ID="ddlTitles" AppendDataBoundItems="true">
                                    <asp:ListItem Text="-select-" Selected="True" Value="0"></asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>FirstName:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"   ID="TextBoxFirstName" Text='<%#Bind("FirstName") %>'></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Surname:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"   ID="tLastName" Text='<%#Bind("Surname") %>'></asp:TextBox>
                            </td>
                        </tr>
                          <tr>
                            <td>
                                <b>PreferedName:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox1" Text='<%#Bind("PreferedName") %>'></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Organisation:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="tOrganisation" Text='<%#Bind("OrganisationName") %>'></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Telephone:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="ttelephone" Text='<%#Bind("Telephone") %>'></asp:TextBox>
                            </td>
                        </tr>
                         <tr>
                            <td>
                                <b>Fax:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox2" Text='<%#Bind("Fax") %>'></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Mobile:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="tmobile" Text='<%#Bind("Mobile") %>'></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>EmailAddress:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="temail" Text='<%#Bind("EmailAddress") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>Profession:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox3" Text='<%#Bind("Profession") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>HPCSANumber:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox4" Text='<%#Bind("HPCSANumber") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>PostalAddress:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox5" Text='<%#Bind("PostalAddress") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>City:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox6" Text='<%#Bind("City") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>Province:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox7" Text='<%#Bind("Province") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>Country:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox8" Text='<%#Bind("Country") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>PostalCode:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox9" Text='<%#Bind("PostalCode") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>SpecialInstructions:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox10" Text='<%#Bind("SpecialInstructions") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>Accompany_Title:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox11" Text='<%#Bind("Accompany_Title") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>Accompany_FirstName:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox12" Text='<%#Bind("Accompany_FirstName") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>Accompany_Surname:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox13" Text='<%#Bind("Accompany_Surname") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>Accompany_SpecialInstructions:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox14" Text='<%#Bind("Accompany_SpecialInstructions") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>RegistrationType:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="TextBox15" Text='<%#Bind("RegistrationType") %>'></asp:TextBox>
                            </td>
                        </tr>      
                          <tr>
                            <td>
                                <b>RegistrationFee:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox16" Text='<%#Bind("RegistrationFee") %>'></asp:TextBox>
                            </td>
                        </tr>           
                          <tr>
                            <td>
                                <b>PaymentMethod:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox17" Text='<%#Bind("PaymentMethod") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>TotalPaymentDue:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox18" Text='<%#Bind("TotalPaymentDue") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>Comments:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox19" Text='<%#Bind("Comments") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>AttendWelcomeFunction:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="TextBox20" Text='<%#Bind("AttendWelcomeFunction") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>AttendCelebrationDinner:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="TextBox21" Text='<%#Bind("AttendCelebrationDinner") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>Accompany_AttendWelcomeFunction:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox22" Text='<%#Bind("Accompany_AttendWelcomeFunction") %>'></asp:TextBox>
                            </td>
                        </tr>         
                          <tr>
                            <td>
                                <b>Accompany_AttendCelebrationDinner:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox23" Text='<%#Bind("Accompany_AttendCelebrationDinner") %>'></asp:TextBox>
                            </td>
                        </tr>                
                          <tr>
                            <td>
                                <b>DaysRegistered:</b>
                            </td>
                            <td>
                                <asp:TextBox runat="server"  ID="TextBox24" Text='<%#Bind("DaysRegistered") %>'></asp:TextBox>
                            </td>
                        </tr>              
                       
                    </table>
                    <table style="width100%">
                        <tr>
                            <td align="right">
                                <asp:Button ID="Button1" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </asp:Button>&nbsp;
                                <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
                                </asp:Button>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
        </MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
 
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 05 Apr 2012
3 answers
93 views
How come I can't hit enter on the description field and be able to type in a new line? Is there a property that i need to set?
Plamen
Telerik team
 answered on 05 Apr 2012
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?