Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
169 views
Hello,

We are currently in the process of upgrading the RadControls from a (very) old version (6.1) to the current version.  The upgrade is complete and working with no problems, however, I'd like to cleanly remove any remnants of the old version.

Is there any list or resource available to let me know what is safe to remove and what needs to stay.

Thanks in advance,


Glenn
Sebastian
Telerik team
 answered on 11 Dec 2010
5 answers
272 views
When I clicked an appointment in RADScheduler, the AppointmentClick() event was fired.

I was trying to execute a javascript inside as described by the function below.


protected
void rsRadScheduler_AppointmentClick(object sender, Telerik.Web.UI.SchedulerEventArgs e)
{
    _EventID = Convert.ToInt32(e.Appointment.ID);

    String strJScript = "<script type=\"text/javascript\">alert('hello');</script>";
    this.Page.RegisterClientScriptBlock("EditEvent",strJScript);
}

But then the AppointmentCreated() event was also fired where I added some code to customize the event tooltip.

protected void rsRadScheduler_AppointmentCreated(object sender, Telerik.Web.UI.AppointmentCreatedEventArgs e)
{
    e.Appointment.ToolTip = GetTooltip(
Convert.ToInt32(e.Appointment.ID));
    _EventID =
Convert.ToInt32(e.Appointment.ID);
}

Thing is the javascript was registered without errors but it did not execute. It was as good as nothing happened when I clicked on the appointment. Only that the tooltip was displayed...

In place of the alert method, I was originally trying to open a RADWindow (javascript) inside the AppointmentClick method. But since that didn't work when I tried it, I wanted to test if any javascript will be executed inside the method. Unfortunately, nothing happened.

How will I be able to open a RADWindow on AppointmentClick()? Do you have other suggestions or approach that could help me do this?

Thank you...

Neerav
Top achievements
Rank 1
 answered on 11 Dec 2010
1 answer
76 views
I'm having a problem with the alignment of the add record button in my Listview.  For some reason it is cut off on the bottom and is not lineing up properly.  Please see image attached. I'm using the default skin.  Could anyone help me with this?

Paula
Radoslav
Telerik team
 answered on 11 Dec 2010
8 answers
378 views
I'm having problems altering the z-index for my tooltip. IE is shoving the tooltip below our header. I tried adding a cssclass to the tooltip control, but using the ie web developer toolbar, its getting a z-index and other css values from I dont know where.

<span id="spnPers" class="mouse-pointer learn-more">learn more</span>
<rad:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="spnPers" IsClientID="true" Sticky="false" AutoCloseDelay="10000" Animation="none" Position="TopLeft" RelativeTo="Element" OffsetY="2" Height="100px" Width="300px" Skin="Default" Title="Personalize" CssClass="ontop">
<p>
Jazz up your folder presentation by personalizing your folders with a stock graphic and/or text. Choose from 4 different foil colors, 28 stock graphics and 11 font styles that are sure to add impact.
</p>
<br />
<p>
Additional $50 setup and $0.50 per folder foil fees apply. Personalized folders require a minimum purchase of 100 and then increments of 25.
</p>
<br />
<p>
Check on the Personalize box and click on the "Personalize and Add to Cart" button
to get started building your personalized folders.
</p>
</rad:RadToolTip>

.ontop
{
    z-index:10000;
}
Svetlina Anati
Telerik team
 answered on 11 Dec 2010
2 answers
215 views
I have a RadWindow that has a custom button that performs a save and close. This works fine. Now, what I am trying to do is display a javascript close confirm dialog when the user selects the top right close X button. I saw the article about the radConfirm method and adding add_beforeClose(onBeforeClose) techniques. In my case I have had no luck with either. Can you recommend a way to do this?

Thanks,


Steve Holdorf
Georgi Tunev
Telerik team
 answered on 11 Dec 2010
1 answer
77 views
I'm migrating a RadGrid from server-side row deleted handling to client-side, but my client events aren't firing. Instead, when I click it, I get the confirmation and when I click 'OK', I get a postback which then fires the NeedDataSource event. The created events work fine.

function rowCreating(sender, e) {
    console.log('creating');
}
function rowCreated(sender, e) {
    console.log('created');
}
function rowDeleting(sender, e) {
    alert('deleting');
}
function rowDeleted(sender, e) {
    alert('deleted');
}


<telerik:RadGrid ID="uxGrid" runat="server" CssClass="timesheet" AutoGenerateColumns="false"
    AllowPaging="false" AllowSorting="false" AllowMultiRowSelection="true" Skin="Windows7"
    ShowStatusBar="false" OnNeedDataSource="uxGrid_NeedDataSource" OnItemDataBound="uxGrid_ItemDataBound">
    <ClientSettings>
        <Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true" />
        <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="250" />
        <ClientEvents OnRowCreating="rowCreating" OnRowCreated="rowCreated" OnRowDeleting="rowDeleting" OnRowDeleted="rowDeleted" />
    </ClientSettings>
    <MasterTableView TableLayout="Fixed" ClientDataKeyNames="WeekEnding,CompanyId,ContactId,ProjectId,ProjectPhaseId,ServiceId,IsBillable,Comments"
        DataKeyNames="WeekEnding,CompanyId,ContactId,ProjectId,ProjectPhaseId,ServiceId,IsBillable,Comments"
        HeaderStyle-CssClass="timeEntryHeader" ItemStyle-CssClass="timeEntryRow" AlternatingItemStyle-CssClass="timeEntryAlternateRow"
        FooterStyle-CssClass="timeEntryFooter" ShowFooter="true" ShowHeader="true">
        <Columns>
            <telerik:GridClientSelectColumn HeaderStyle-Width="25px" HeaderStyle-HorizontalAlign="Center"
                ItemStyle-CssClass="skinnyAsPossible nowrap" ItemStyle-HorizontalAlign="Center"
                UniqueName="Select" Display="false" />
            <%-- COPY PREVIOUS ENTRY --%>
            <telerik:GridTemplateColumn HeaderStyle-Width="25px" HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center" UniqueName="Duplicate">
                <%--<HeaderTemplate>
                    <asp:ImageButton ID="uxCopyFromLastWeek" runat="server" SkinID="Copy" CausesValidation="false"
                        ToolTip="copy from last week" Visible='<%# !WeekIsClosed %>'
                        OnClientClick="RadConfirm(this, 'Are you sure?', 'This will copy all rows from the previous week into this week. Are you sure you want to do this?', 250, 100)"
                        OnClick="uxCopyFromLastWeek_Click" />
                </HeaderTemplate>--%>
                <ItemTemplate>
                    <asp:HiddenField ID="uxRowIndex" runat="server" EnableViewState="false" Value='<%# ((GridItem)Container).ItemIndex %>' />
                    <asp:ImageButton ID="uxDuplicateCurrent" runat="server" SkinID="Copy" CausesValidation="false"
                        CommandArgument='<%# Container.ItemIndex %>' ToolTip="duplicate this entry" Visible='<%# !(bool)DataBinder.Eval(Container.DataItem, "IsClosed") %>'
                        OnClientClick="duplicateRow(this);return false;" TabIndex="-1" />
                    <telerik:RadToolTip ID="uxDuplicateCurrentToolTip" runat="server" SkinID="Default"
                        TargetControlID="uxDuplicateCurrent" Position="TopRight" />
                </ItemTemplate>
                <FooterTemplate>
                    <asp:ImageButton ID="uxNewRecord" runat="server" SkinID="Add" CausesValidation="false"
                        ToolTip="add new row" OnClientClick="addNewRow(this);return false;" />
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <%-- PROJECT ID --%>
            <telerik:GridTemplateColumn HeaderText="Project" HeaderStyle-Font-Bold="true" HeaderStyle-Width="90px"
                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="ProjectEnter">
                <ItemTemplate>
                    <blueSky:ProjectList ID="uxProjectList" runat="server" EmptyMessage="Project:" ErrorCssClass="errorInput"
                        SelectionRequired="true" ShowHeader="false" Enabled='<%# !(bool)DataBinder.Eval(Container.DataItem, "IsClosed") %>'
                        SelectedProjectAndPhase='<%# DataBinder.Eval(Container.DataItem, "MRC") %>' OnClientBlur="projectBlur" />
                    <asp:HiddenField ID="uxSavedProjectList" runat="server" EnableViewState="false" Value='<%# DataBinder.Eval(Container.DataItem, "MRC") %>' />
                </ItemTemplate>
                <FooterTemplate>
                    <asp:LinkButton ID="uxNewRecordText" runat="server" CausesValidation="false" Text="add new record"
                        OnClientClick="addNewRow(this);return false;" />
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Project (Floor)" HeaderStyle-HorizontalAlign="Center"
                Display="false" UniqueName="ProjectSubmit">
                <ItemTemplate>
                    <div style="padding: 0 2px;">
                        <asp:Label ID="uxProject" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ProjectDescription") %>' />
                    </div>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <%-- IS BILLABLE --%>
            <telerik:GridTemplateColumn HeaderStyle-Width="25px" HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center" UniqueName="IsBillableEnter">
                <HeaderTemplate>
                    <asp:ImageButton ID="uxIsBillableImage" runat="server" SkinID="Money" OnClientClick="toggleIsBillable();"
                        ToolTip="is the item billable?" /></HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="uxIsBillableCheckBox" runat="server" TextAlign="Left" Checked='<%# DataBinder.Eval(Container.DataItem, "IsBillable") %>'
                        Enabled='<%# !(bool)DataBinder.Eval(Container.DataItem, "IsClosed") %>' ToolTip="is the item billable?"
                        onblur="isBillableBlur" onclick="isBillableClick" />
                    <asp:HiddenField ID="uxSavedIsBillableCheckBox" runat="server" EnableViewState="false"
                        Value='<%# DataBinder.Eval(Container.DataItem, "IsBillable") %>' />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Billable" HeaderStyle-Width="45px" HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center" Display="false" UniqueName="IsBillableSubmit">
                <ItemTemplate>
                    <asp:Image ID="uxIsBillable" runat="server" SkinID="Money" Visible='<%# DataBinder.Eval(Container.DataItem, "IsBillable") %>' />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <%-- SERVICE --%>
            <telerik:GridTemplateColumn HeaderText="Service" HeaderStyle-Font-Bold="true" HeaderStyle-Width="110px"
                HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center"
                UniqueName="ServiceEnter">
                <ItemTemplate>
                    <blueSky:ServiceList ID="uxServiceList" runat="server" EmptyMessage="Service:" ErrorCssClass="errorInput"
                        SelectionRequired="true" Text='<%# DataBinder.Eval(Container.DataItem, "ServiceFriendlyName") %>'
                        ShowHeader="false" Enabled='<%# !(bool)DataBinder.Eval(Container.DataItem, "IsClosed") %>'
                        SelectedValue='<%# DataBinder.Eval(Container.DataItem, "ServiceId") %>' OnClientBlur="serviceBlur" />
                    <asp:HiddenField ID="uxSavedServiceList" runat="server" EnableViewState="false" Value='<%# DataBinder.Eval(Container.DataItem, "ServiceId") %>' />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn HeaderText="Service" DataField="ServiceFriendlyName" HeaderStyle-HorizontalAlign="Center"
                Display="false" UniqueName="ServiceSubmit" />
            <%-- COMMENTS --%>
            <telerik:GridTemplateColumn HeaderText="Comments" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false" UniqueName="CommentsEnter">
                <ItemTemplate>
                    <telerik:RadTextBox ID="uxComments" runat="server" name="CheckSpelling" MaxLength="250"
                        Width="95%" Text='<%# DataBinder.Eval(Container.DataItem, "Comments") %>' Enabled='<%# !(bool)DataBinder.Eval(Container.DataItem, "IsClosed") %>'
                        ClientEvents-OnBlur='commentsBlur' />
                    <asp:HiddenField ID="uxSavedComments" runat="server" EnableViewState="false" Value='<%# DataBinder.Eval(Container.DataItem, "Comments") %>' />
                    <asp:RequiredFieldValidator ID="uxCommentsRequired" runat="server" ControlToValidate="uxComments"
                        CssClass="errorMessage" Text="!" ErrorMessage="comments are required" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn HeaderText="Comment" DataField="Comments" HeaderStyle-HorizontalAlign="Center"
                Display="false" UniqueName="CommentsSubmit" />
            <%-- DAYS --%>
            <telerik:GridTemplateColumn HeaderStyle-Width="450px">
                <HeaderTemplate>
                    <table cellpadding="0" cellspacing="0" width="100%" class="timeEntry">
                        <tr>
                            <td align="center" valign="middle" class="<%# IsToday1 %> <%# Day1Type %> <%# Day1("ddd") %> dayHeaderName">
                                <asp:Label ID="uxDay1" runat="server" Text='<%# Day1(DayHeaderNameFormatString) %>' />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday2 %> <%# Day2Type %> <%# Day2("ddd") %> dayHeaderName">
                                <asp:Label ID="uxDay2" runat="server" Text='<%# Day2(DayHeaderNameFormatString) %>' />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday3 %> <%# Day3Type %> <%# Day3("ddd") %> dayHeaderName">
                                <asp:Label ID="uxDay3" runat="server" Text='<%# Day3(DayHeaderNameFormatString) %>' />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday4 %> <%# Day4Type %> <%# Day4("ddd") %> dayHeaderName">
                                <asp:Label ID="uxDay4" runat="server" Text='<%# Day4(DayHeaderNameFormatString) %>' />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday5 %> <%# Day5Type %> <%# Day5("ddd") %> dayHeaderName">
                                <asp:Label ID="uxDay5" runat="server" Text='<%# Day5(DayHeaderNameFormatString) %>' />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday6 %> <%# Day6Type %> <%# Day6("ddd") %> dayHeaderName">
                                <asp:Label ID="uxDay6" runat="server" Text='<%# Day6(DayHeaderNameFormatString) %>' />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday7 %> <%# Day7Type %> <%# Day7("ddd") %> dayHeaderName">
                                <asp:Label ID="uxDay7" runat="server" Text='<%# Day7(DayHeaderNameFormatString) %>' />
                            </td>
                            <td align="center" valign="middle" rowspan="2" class="rowHourSummaryHeader">
                                <img src="../Images/spacer.gif" width="15" />∑
                            </td>
                        </tr>
                        <tr>
                            <td align="center" valign="middle" class="<%# IsToday1 %> <%# Day1Type %> <%# Day1("ddd") %> dayHeaderDate">
                                <asp:Label ID="uxDate1" runat="server" Text='<%# Day1(DayHeaderDateFormatString) %>' />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday2 %> <%# Day2Type %> <%# Day2("ddd") %> dayHeaderDate">
                                <asp:Label ID="uxDate2" runat="server" Text='<%# Day2(DayHeaderDateFormatString) %>' />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday3 %> <%# Day3Type %> <%# Day3("ddd") %> dayHeaderDate">
                                <asp:Label ID="uxDate3" runat="server" Text='<%# Day3(DayHeaderDateFormatString) %>' />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday4 %> <%# Day4Type %> <%# Day4("ddd") %> dayHeaderDate">
                                <asp:Label ID="uxDate4" runat="server" Text='<%# Day4(DayHeaderDateFormatString) %>' />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday5 %> <%# Day5Type %> <%# Day5("ddd") %> dayHeaderDate">
                                <asp:Label ID="uxDate5" runat="server" Text='<%# Day5(DayHeaderDateFormatString) %>' />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday6 %> <%# Day6Type %> <%# Day6("ddd") %> dayHeaderDate">
                                <asp:Label ID="uxDate6" runat="server" Text='<%# Day6(DayHeaderDateFormatString) %>' />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday7 %> <%# Day7Type %> <%# Day7("ddd") %> dayHeaderDate">
                                <asp:Label ID="uxDate7" runat="server" Text='<%# Day7(DayHeaderDateFormatString) %>' />
                            </td>
                        </tr>
                    </table>
                </HeaderTemplate>
                <ItemTemplate>
                    <table cellpadding="0" cellspacing="0" width="100%" class="timeEntry">
                        <tr>
                            <td align="center" valign="middle" class="<%# IsToday1 %> <%# Day1Type %> <%# Day1("ddd") %> hours">
                                <telerik:RadAjaxPanel ID="uxHours1UpdatePanel" runat="server">
                                    <telerik:RadNumericTextBox ID="uxHours1" runat="server" AllowOutOfRangeAutoCorrect="false"
                                        EmptyMessage="0.00" EmptyMessageStyle-CssClass="timeEntryEmpty" EnabledStyle-CssClass="textRight"
                                        FocusedStyle-CssClass="timeEntryFocus" HoveredStyle-CssClass="timeEntryHover"
                                        IncrementSettings-Step=".25" MaxValue="<%# MaximumHoursPerDay %>" MinValue="0"
                                        NumberFormat-DecimalDigits="2" NumberFormat-KeepTrailingZerosOnFocus="true" ReadOnly='<%# DataBinder.Eval(Container.DataItem, "IsClosed") %>'
                                        ReadOnlyStyle-CssClass="timeEntryReadOnly" Width="100%" LabelCssClass="hide"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "Hours1") %>' ClientEvents-OnBlur="hoursBlur"
                                        ClientEvents-OnFocus="hoursFocus" />
                                    <asp:HiddenField ID="uxSavedHours1" runat="server" EnableViewState="false" Value='<%# DataBinder.Eval(Container.DataItem, "Hours1") %>' />
                                </telerik:RadAjaxPanel>
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday2 %> <%# Day2Type %> <%# Day2("ddd") %> hours">
                                <telerik:RadAjaxPanel ID="uxHours2UpdatePanel" runat="server">
                                    <telerik:RadNumericTextBox ID="uxHours2" runat="server" AllowOutOfRangeAutoCorrect="false"
                                        EmptyMessage="0.00" EmptyMessageStyle-CssClass="timeEntryEmpty" EnabledStyle-CssClass="textRight"
                                        FocusedStyle-CssClass="timeEntryFocus" HoveredStyle-CssClass="timeEntryHover"
                                        IncrementSettings-Step=".25" MaxValue="<%# MaximumHoursPerDay %>" MinValue="0"
                                        NumberFormat-DecimalDigits="2" NumberFormat-KeepTrailingZerosOnFocus="true" ReadOnly='<%# DataBinder.Eval(Container.DataItem, "IsClosed") %>'
                                        ReadOnlyStyle-CssClass="timeEntryReadOnly" Width="100%" LabelCssClass="hide"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "Hours2") %>' ClientEvents-OnBlur="hoursBlur"
                                        ClientEvents-OnFocus="hoursFocus" />
                                    <asp:HiddenField ID="uxSavedHours2" runat="server" EnableViewState="false" Value='<%# DataBinder.Eval(Container.DataItem, "Hours2") %>' />
                                </telerik:RadAjaxPanel>
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday3 %> <%# Day3Type %> <%# Day3("ddd") %> hours">
                                <telerik:RadAjaxPanel ID="uxHours3UpdatePanel" runat="server">
                                    <telerik:RadNumericTextBox ID="uxHours3" runat="server" AllowOutOfRangeAutoCorrect="false"
                                        EmptyMessage="0.00" EmptyMessageStyle-CssClass="timeEntryEmpty" EnabledStyle-CssClass="textRight"
                                        FocusedStyle-CssClass="timeEntryFocus" HoveredStyle-CssClass="timeEntryHover"
                                        IncrementSettings-Step=".25" MaxValue="<%# MaximumHoursPerDay %>" MinValue="0"
                                        NumberFormat-DecimalDigits="2" NumberFormat-KeepTrailingZerosOnFocus="true" ReadOnly='<%# DataBinder.Eval(Container.DataItem, "IsClosed") %>'
                                        ReadOnlyStyle-CssClass="timeEntryReadOnly" Width="100%" LabelCssClass="hide"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "Hours3") %>' ClientEvents-OnBlur="hoursBlur"
                                        ClientEvents-OnFocus="hoursFocus" />
                                    <asp:HiddenField ID="uxSavedHours3" runat="server" EnableViewState="false" Value='<%# DataBinder.Eval(Container.DataItem, "Hours3") %>' />
                                </telerik:RadAjaxPanel>
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday4 %> <%# Day4Type %> <%# Day4("ddd") %> hours">
                                <telerik:RadAjaxPanel ID="uxHours4UpdatePanel" runat="server">
                                    <telerik:RadNumericTextBox ID="uxHours4" runat="server" AllowOutOfRangeAutoCorrect="false"
                                        EmptyMessage="0.00" EmptyMessageStyle-CssClass="timeEntryEmpty" EnabledStyle-HorizontalAlign="Right"
                                        FocusedStyle-CssClass="timeEntryFocus" HoveredStyle-CssClass="timeEntryHover"
                                        IncrementSettings-Step=".25" MaxValue="<%# MaximumHoursPerDay %>" MinValue="0"
                                        NumberFormat-DecimalDigits="2" NumberFormat-KeepTrailingZerosOnFocus="true" ReadOnly='<%# DataBinder.Eval(Container.DataItem, "IsClosed") %>'
                                        ReadOnlyStyle-CssClass="timeEntryReadOnly" Width="100%" LabelCssClass="hide"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "Hours4") %>' ClientEvents-OnBlur="hoursBlur"
                                        ClientEvents-OnFocus="hoursFocus" />
                                    <asp:HiddenField ID="uxSavedHours4" runat="server" EnableViewState="false" Value='<%# DataBinder.Eval(Container.DataItem, "Hours4") %>' />
                                </telerik:RadAjaxPanel>
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday5 %> <%# Day5Type %> <%# Day5("ddd") %> hours">
                                <telerik:RadAjaxPanel ID="uxHours5UpdatePanel" runat="server">
                                    <telerik:RadNumericTextBox ID="uxHours5" runat="server" AllowOutOfRangeAutoCorrect="false"
                                        EmptyMessage="0.00" EmptyMessageStyle-CssClass="timeEntryEmpty" EnabledStyle-HorizontalAlign="Right"
                                        FocusedStyle-CssClass="timeEntryFocus" HoveredStyle-CssClass="timeEntryHover"
                                        IncrementSettings-Step=".25" MaxValue="<%# MaximumHoursPerDay %>" MinValue="0"
                                        NumberFormat-DecimalDigits="2" NumberFormat-KeepTrailingZerosOnFocus="true" ReadOnly='<%# DataBinder.Eval(Container.DataItem, "IsClosed") %>'
                                        ReadOnlyStyle-CssClass="timeEntryReadOnly" Width="100%" LabelCssClass="hide"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "Hours5") %>' ClientEvents-OnBlur="hoursBlur"
                                        ClientEvents-OnFocus="hoursFocus" />
                                    <asp:HiddenField ID="uxSavedHours5" runat="server" EnableViewState="false" Value='<%# DataBinder.Eval(Container.DataItem, "Hours5") %>' />
                                </telerik:RadAjaxPanel>
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday6 %> <%# Day6Type %> <%# Day6("ddd") %> hours">
                                <telerik:RadAjaxPanel ID="uxHours6UpdatePanel" runat="server">
                                    <telerik:RadNumericTextBox ID="uxHours6" runat="server" AllowOutOfRangeAutoCorrect="false"
                                        EmptyMessage="0.00" EmptyMessageStyle-CssClass="timeEntryEmpty" EnabledStyle-HorizontalAlign="Right"
                                        FocusedStyle-CssClass="timeEntryFocus" HoveredStyle-CssClass="timeEntryHover"
                                        IncrementSettings-Step=".25" MaxValue="<%# MaximumHoursPerDay %>" MinValue="0"
                                        NumberFormat-DecimalDigits="2" NumberFormat-KeepTrailingZerosOnFocus="true" ReadOnly='<%# DataBinder.Eval(Container.DataItem, "IsClosed") %>'
                                        ReadOnlyStyle-CssClass="timeEntryReadOnly" Width="100%" LabelCssClass="hide"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "Hours6") %>' ClientEvents-OnBlur="hoursBlur"
                                        ClientEvents-OnFocus="hoursFocus" />
                                    <asp:HiddenField ID="uxSavedHours6" runat="server" EnableViewState="false" Value='<%# DataBinder.Eval(Container.DataItem, "Hours6") %>' />
                                </telerik:RadAjaxPanel>
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday7 %> <%# Day7Type %> <%# Day7("ddd") %> hours">
                                <telerik:RadAjaxPanel ID="uxHours7UpdatePanel" runat="server">
                                    <telerik:RadNumericTextBox ID="uxHours7" runat="server" AllowOutOfRangeAutoCorrect="false"
                                        EmptyMessage="0.00" EmptyMessageStyle-CssClass="timeEntryEmpty" EnabledStyle-HorizontalAlign="Right"
                                        FocusedStyle-CssClass="timeEntryFocus" HoveredStyle-CssClass="timeEntryHover"
                                        IncrementSettings-Step=".25" MaxValue="<%# MaximumHoursPerDay %>" MinValue="0"
                                        NumberFormat-DecimalDigits="2" NumberFormat-KeepTrailingZerosOnFocus="true" ReadOnly='<%# DataBinder.Eval(Container.DataItem, "IsClosed") %>'
                                        ReadOnlyStyle-CssClass="timeEntryReadOnly" Width="100%" LabelCssClass="hide"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "Hours7") %>' ClientEvents-OnBlur="hoursBlur"
                                        ClientEvents-OnFocus="hoursFocus" />
                                    <asp:HiddenField ID="uxSavedHours7" runat="server" EnableViewState="false" Value='<%# DataBinder.Eval(Container.DataItem, "Hours7") %>' />
                                </telerik:RadAjaxPanel>
                            </td>
                            <td align="center" valign="middle" class="timeEntryRowSummary">
                                <telerik:RadNumericTextBox ID="uxRowSummary" runat="server" EmptyMessage="0.00" EnabledStyle-HorizontalAlign="Right"
                                    ForeColor="#4B4B4B" NumberFormat-DecimalDigits="2" ReadOnly="true" CssClass="timeEntryRowSummary"
                                    Width="100%" TabIndex="-1" ClientEvents-OnLoad="updateRowSummary" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
                <FooterTemplate>
                    <table cellpadding="0" cellspacing="0" width="100%" class="timeEntry">
                        <tr>
                            <td align="center" valign="middle" class="<%# IsToday1 %> <%# Day1Type %> <%# Day1("ddd") %> summary">
                                <telerik:RadNumericTextBox ID="uxSummary1" runat="server" EmptyMessage="0.00" EnabledStyle-HorizontalAlign="Right"
                                    ForeColor="#4B4B4B" NumberFormat-DecimalDigits="2" ReadOnly="true" Width="100%"
                                    ClientEvents-OnLoad="registerSummary" />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday2 %> <%# Day2Type %> <%# Day2("ddd") %> summary">
                                <telerik:RadNumericTextBox ID="uxSummary2" runat="server" EmptyMessage="0.00" EnabledStyle-HorizontalAlign="Right"
                                    ForeColor="#4B4B4B" NumberFormat-DecimalDigits="2" ReadOnly="true" Width="100%"
                                    ClientEvents-OnLoad="registerSummary" />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday3 %> <%# Day3Type %> <%# Day3("ddd") %> summary">
                                <telerik:RadNumericTextBox ID="uxSummary3" runat="server" EmptyMessage="0.00" EnabledStyle-HorizontalAlign="Right"
                                    ForeColor="#4B4B4B" NumberFormat-DecimalDigits="2" ReadOnly="true" Width="90%"
                                    ClientEvents-OnLoad="registerSummary" />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday4 %> <%# Day4Type %> <%# Day4("ddd") %> summary">
                                <telerik:RadNumericTextBox ID="uxSummary4" runat="server" EmptyMessage="0.00" EnabledStyle-HorizontalAlign="Right"
                                    ForeColor="#4B4B4B" NumberFormat-DecimalDigits="2" ReadOnly="true" Width="100%"
                                    ClientEvents-OnLoad="registerSummary" />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday5 %> <%# Day5Type %> <%# Day5("ddd") %> summary">
                                <telerik:RadNumericTextBox ID="uxSummary5" runat="server" EmptyMessage="0.00" EnabledStyle-HorizontalAlign="Right"
                                    ForeColor="#4B4B4B" NumberFormat-DecimalDigits="2" ReadOnly="true" Width="100%"
                                    ClientEvents-OnLoad="registerSummary" />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday6 %> <%# Day6Type %> <%# Day6("ddd") %> summary">
                                <telerik:RadNumericTextBox ID="uxSummary6" runat="server" EmptyMessage="0.00" EnabledStyle-HorizontalAlign="Right"
                                    ForeColor="#4B4B4B" NumberFormat-DecimalDigits="2" ReadOnly="true" Width="100%"
                                    ClientEvents-OnLoad="registerSummary" />
                            </td>
                            <td align="center" valign="middle" class="<%# IsToday7 %> <%# Day7Type %> <%# Day7("ddd") %> summary">
                                <telerik:RadNumericTextBox ID="uxSummary7" runat="server" EmptyMessage="0.00" EnabledStyle-HorizontalAlign="Right"
                                    ForeColor="#4B4B4B" NumberFormat-DecimalDigits="2" ReadOnly="true" Width="100%"
                                    ClientEvents-OnLoad="registerSummary" />
                            </td>
                            <td align="center" valign="middle" class="rowHourSummaryFooter">
                                <telerik:RadNumericTextBox ID="uxSummary8" runat="server" CssClass="timeEntryRowSummary"
                                    EmptyMessage="0.00" EnabledStyle-HorizontalAlign="Right" ForeColor="#4B4B4B"
                                    Font-Bold="true" NumberFormat-DecimalDigits="2" ReadOnly="true" Width="100%"
                                    ClientEvents-OnLoad="registerSummary" />
                            </td>
                        </tr>
                    </table>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <%-- DELETE --%>
            <telerik:GridClientDeleteColumn ButtonType="ImageButton" HeaderStyle-Width="25px"
                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ConfirmText="Delete this entry?"
                ConfirmDialogType="RadWindow" ConfirmTitle="Delete" CommandName="Delete" Text="Delete"
                />
            <%--<telerik:GridButtonColumn HeaderText="Delete" ButtonType="ImageButton" HeaderStyle-Width="60px"
                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ConfirmText="Delete this entry?"
                ConfirmDialogType="RadWindow" ConfirmTitle="Delete" CommandName="Delete" Text="Delete"
                UniqueName="Delete" /> --%>
            <%-- SUBMITTED --%>
            <telerik:GridTemplateColumn HeaderText="Submitted" HeaderStyle-Width="60px" HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center" UniqueName="Submitted" Display="false">
                <ItemTemplate>
                    <asp:Image ID="uxIsSubmitted" runat="server" SkinID="CheckCircle_Orange" Visible='<%# DataBinder.Eval(Container.DataItem, "IsSubmitted") %>' />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Any ideas?

Radoslav
Telerik team
 answered on 11 Dec 2010
1 answer
133 views
Hi

I am facing a display issue for RadDatePicker in Mozilla Firefox.

Following is my scenario:
I have got 2 RadDatePicker controls placed on my webpage, in case if the months being displayed in both of them are different, then this display issue occurs in Mozilla Forefox and not in IE. Kindly help.

Find below my aspx code for the above scenario:

<table width="575" border="0" style="text-align: 
center"><BR> <tr><BR>        
 <td style="width: 
30%"><BR>                
</td><BR>                
<td style="width: 
40%"><BR>                
 <table border="0" runat="server" id="Criteriatable" 
width="45px"><BR>                        
 <tr valign="top" style="visibility: 
hidden;"><BR>                                
 <td class="SubHead" 
width="150px"><BR>                                        
 <asp:Label ID="plReportType" runat="server" Visible="false" 
Text="ReportType 
:"></asp:Label><BR>                                        
</td><BR>                                        
<td class="SubHead" 
width="150px"><BR>               
                           
 <asp:DropDownList ID="cboReportType" runat="server" 
DataValueField="value" DataTextField="text" CssClass="NormalTextBox" 
Visible="false"><BR>                                        
 </asp:DropDownList><BR>                                        
</td><BR>                                
</tr><BR>                                
<tr><BR>                                
 <td><BR>                                        
 <cwc:Label ID="lblFrom" runat="server" 
/><BR>                                        
</td><BR>                                
 <td 
align="left"><BR>                                
  <telerik:RadDatePicker ID="RadDatePicker1" runat="server" 
/><BR>                                
 </td><BR>                                
</tr><BR>                                
<tr><BR>                                
 <td><BR>                                        
 <cwc:Label ID="lblTo" runat="server" 
/><BR>                                        
</td><BR>                                        
<td 
align="left"><BR>                                        
 <telerik:RadDatePicker ID="RadDatePicker2" runat="server" 
/><BR>                                        
</td><BR>                                
</tr><BR>                         
</table><BR>                  
</td><BR>                  
<td style="width: 
30%"><BR>                  
</td><BR>           
</tr><BR>           
<tr><BR>           
 <td style="text-align: center" 
colspan="3"><BR>                
 <ISWebDesktop:WebButton ID="cmdDisplay" Width="150px" runat="server" 
CssClass="CommandButton"<BR>                              
CausesValidation="true" AutoPostback="true" PostBackMode="FullPostBack" 
/><BR>                        
<asp:CompareValidator ID="valStartDate" CssClass="NormalRed" runat="server" 
Display="Dynamic"<BR>                              
CultureInvariantValues="true"    Type="Date" 
Operator="DataTypeCheck" 
ControlToValidate="RadDatePicker1"></asp:CompareValidator><BR>                        
<asp:CompareValidator ID="valEndDate" CssClass="NormalRed" runat="server" 
Display="Dynamic"<BR>                              
CultureInvariantValues="true"    Type="Date" 
Operator="DataTypeCheck" 
ControlToValidate="RadDatePicker2"></asp:CompareValidator><BR>                        
<asp:CompareValidator ID="valDates" CssClass="NormalRed" runat="server" 
Display="Dynamic"<BR>                              
CultureInvariantValues="true"    Type="Date" 
Operator="GreaterThan" ControlToValidate="RadDatePicker2" 
ControlToCompare="RadDatePicker1"></asp:CompareValidator><BR>                 
</td><BR>            
</tr><BR>     </table>


Thanks
Tariq
Maria Ilieva
Telerik team
 answered on 11 Dec 2010
1 answer
85 views
I have followed the example that was laid out in previous posts of how to integrate RadControls into Sharepoint and basically, they compile and everything, but when I go to display the webpart, anything that needs to 'fire' doesn't work, e.g. buttons, actions, etc.

So for purposes of demonstrations, I have stripped down to a very basic webpart that simply has only one RadDatePicker in it.

using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
  
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
  
using Telerik.Web.UI;
  
namespace InternalControls.WebParts.RadControlTest
{
    [Guid("8f913f14-3a18-4287-8444-401611d3cc1f")]
    public class WebPart1 : System.Web.UI.WebControls.WebParts.WebPart
    {
        public WebPart1()
        {
        }
  
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            Page.ClientScript.RegisterStartupScript(typeof(WebPart1), this.ID, "_spOriginalFormAction = document.forms[0].action;_spSuppressFormOnSubmitWrapper=true;", true);
            if (this.Page.Form != null)
            {
                string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"];
                if (!string.IsNullOrEmpty(formOnSubmitAtt) && formOnSubmitAtt == "return _spFormOnSubmitWrapper();")
                {
                    this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();";
                }
            }
  
            ScriptManager sm = ScriptManager.GetCurrent(this.Page);
  
            if (sm == null)
            {
                sm = new RadScriptManager();
  
                Controls.AddAt(0, sm);
            }
        }
  
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            Panel panel = new Panel();
            panel.ID = "Panel1";
            this.Controls.Add(panel);
  
            RadDatePicker rdp = new RadDatePicker();
            rdp.PopupDirection = DatePickerPopupDirection.BottomRight;
            rdp.Calendar.Enabled = true;
  
            panel.Controls.Add(rdp);
            RadAjaxManager ajaxManager = RadAjaxManager.GetCurrent(this.Page);
            if (ajaxManager == null)
            {
                ajaxManager = new RadAjaxManager();
                ajaxManager.ID = "RadAjaxManager1";
                Controls.Add(ajaxManager);
                this.Page.Items.Add(typeof(RadAjaxManager), ajaxManager);
            }
            ajaxManager.AjaxSettings.AddAjaxSetting(rdp, panel);
        }
    }
}


As I said, it will compile and deploy, but when the webpart surfaces the popup button for the calendar doesn't work.  In other words clicking on the popup button does nothing, where as if this were not in a webpart the calendar would be displayed.

Can anyone please help me with this, I have been trying various things for several days.

Thanks,

Marshall
Tsvetoslav
Telerik team
 answered on 11 Dec 2010
7 answers
165 views
Hi,

Greetings,

I am working on displaying the data in self hierarchy using Rad grid. I have taken the code given by the Rad grid demo page.
When iam displaying the data in Web application, i am getting the data in self hierarchy and it is working perfectly.

Then i am trying to display the same grid in visual web part (share point 2010) and after deploying it in the share point, when iam loading the web part, iam getting an message "Stop running the script, if you are trying to run the script your browser will be non -responsive" and then my Page_Prerender event is not firing. In that event, when there are no nested items, hiding the expand collapse image is not working.

I am working on Windows 7 machine having Sharepoint foundation. I am deploying my visual web parts in that share point foundation.

Could any one please let me know if you have a work a round for this.

Thanks
Murthy
Radoslav
Telerik team
 answered on 11 Dec 2010
5 answers
504 views

I feel I'm doing this the hard way, and I'm hoping you can set me straight. I have a grid with EditMode="PopUp" and EditFormType="Template". In this grid's FormTemplate, I have the following save image to click...

<asp:ImageButton ID="imgSave" runat="server" TabIndex="120" AlternateText="Save"
ImageUrl="~/images/icons/save-24.jpg" ToolTip="Save"
CommandName='<%# IIf (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>' />

Before it saves, I validate certain data. So in the grid's ItemDataBound event, I assign to the imgSave's "onclick" attribute a javascript function with various control ClientIDs in the popup. If certain conditions fail, javascript gives an alert and does "return false" to keep the popup from closing. If the data is good, I "return true" to let the popup close and refresh the grid's data. It works well.

Now this is where I've goofed up. What I want, is after the grid is rebound/refreshed, I want to highlight the edited row and display certain stats beneath the grid. I've written the code, but don't know how to call it. Is there an event I can tie to my javascript function? (I tried OnActiveRowChanged, but it didn't fire.)

To get around this, just before my "return true" that closes the popup form, I added these two lines of code...

var f = function() { UpdateStatusBar(iKey); };
setTimeout(f, 1000);
return true;

Having the 1 second delay gives the grid time to rebind/refresh before calling my UpdateStatusBar function, but that's open to timing issues. What should I do instead?

Tsvetoslav
Telerik team
 answered on 11 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?