Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
89 views
We use a an older version of telerik web DLL  which doesn't support grid.clearActiveRow() method so can you please let me know how to go about it using code. I just want to clear the active row selection. Please help.
Madhu
Top achievements
Rank 1
 answered on 23 Mar 2013
3 answers
207 views
How do I set a RadEditor that is within a RadGrid to only display vertical scroll bars and properly word wrap to the next line.

 

Thank You!
Rengo
Top achievements
Rank 1
 answered on 23 Mar 2013
1 answer
277 views
I have a telerik popped up window. It opens fine; however, I am having an issue closing the window. 


Here is the popup window:


@{Html.Telerik().Window()
         .Name("Window")
         .Title("Student Window")
         .LoadContentFrom(Url.Action("AddReason", "Reason", new { id = reasonID }, Request.Url.Scheme))
         .ClientEvents(events => events
             .OnClose("ClosingWindow")
             )
         .Draggable(false)
         .Scrollable(false)
         .Width(800)
         .Height(600)
         .Modal(true)
         .Visible(false)
         //.Effects(fx => fx           
         //    .Zoom()           
         //    .Opacity())
         .Render();
     }

here is the reference for the javascript:
<script src="@Url.Content("~/Scripts/jquery-1.4.4.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/spin.min.js")" type="text/javascript"></script>

Here is the JavaScript:
function DoOpen(id) {
        var url = '@Url.Action("AddReason","Reason")';
        $.post(url, { id: id }, function (data) {
            var window = $('#Window').data('tWindow').center();
            window.content(data);
            window.open();
        });
   }
 //This javascript is in the main page
//I did an alert. alert($('#Window')) and 
alert($('#Window').data('tWindow')) they both return null

  function ClosingWindow() {
      $('#Window').prop("checked", "checked");
      $('#Window').data('tWindow').close();
       window.location.href = window.location.href;
   }

Here is the partial view :
@model Student.Models.Reason
@using Student.Example
 
@{
    ViewBag.Title = "Add Reason";
    Layout = "~/Views/Shared/_PartialReason.cshtml";
}
 
<script type="text/javascript">
    function CloseWindow() {
//        alert($("#Window").closest('.t-window').data('#tWindow'));
//        $("#Window").data("tWindow").close();
        $('#Window').prop("checked", "checked");
         window.location.href = window.location.href;
    }
 
</script>
 
@using (Html.BeginForm("AddReason", "Reason", FormMethod.Post))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <div class="editor-field">
            @(Html.Telerik().Editor()
            .Name("EncountersArchive")
            .HtmlAttributes(new { style = "height:310px;", id = "AddAReason" })
            .Encode(true)
            .Tools(
            tools => tools
                       .Clear()
                        .Bold().Italic().Underline().Strikethrough().Subscript().Superscript().Separator()
                        .FontName().FontSize()
                        .FontColor().BackColor().Separator()
                        .JustifyLeft().JustifyCenter().JustifyRight().JustifyFull().Separator()
                        .InsertUnorderedList().InsertOrderedList().Separator()
                        .Indent().Outdent().Separator()
            ))
        </div>
        <p style="text-align:center">
              
            <input type="submit" value="Reason" id="AddReasonID" onclick="CloseWindow()"/>
        </p>
    </fieldset>
}


Mitch
Top achievements
Rank 1
 answered on 23 Mar 2013
2 answers
176 views
Hi guys

I'm using a sqlserver view to bring up my fields. My update command however has errors when I try it

This is the resource:
<asp:SqlDataSource ID="SQLLucas" runat="server" ConnectionString="<%$ ConnectionStrings:DatabaseAutoSMSDiary1 %>" SelectCommand="SELECT * FROM [vwBookingsDetails]" UpdateCommand="UPDATE [Bookings] SET [Start Time] = @Start, [End Time] = @End1, [Booking Date] = @BookingDate WHERE [Booking ID] = @ID1">                    
             <UpdateParameters>
                <asp:Parameter Name="Start" Type="DateTime"></asp:Parameter>
                <asp:Parameter Name="End1" Type="DateTime"></asp:Parameter>
                <asp:Parameter Name="BookingDate" Type="DateTime"></asp:Parameter>
                <asp:Parameter Name="ID1" Type="Int32"></asp:Parameter>
            </UpdateParameters>
    </asp:SqlDataSource>

This is my error coming from js function appointmentMoveEnd:

Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Incorrect syntax near 'nvarchar'.
Incorrect syntax near 'datetime'.
http://localhost:5468/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-AU%3aacfc7575-cdee-46af-964f-5d85d9cdcf92%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-AU%3aed0b2505-4ecf-45ea-bd67-f51c9ccd1855%3a16e4e7cd%3af7645509%3a22a6274a%3aed16cbdc%3a874f8ea2%3a24ee1bba%3a4c8be21a%3af46195d3%3a650fdad%3ad40f7d5c%3ae91ff703%3a7666c7ed%3aa51ee93e%3a59462f1
Line 9

Thanks
Aaron
Aaron
Top achievements
Rank 1
 answered on 23 Mar 2013
6 answers
191 views
I have a GridHyperLink Column in a RadGrid with the ImageUrl property set to a .png image. When the grid displays, there is a border around the image. How can I remove this border? In normal HTML i would just set the border to 0 for the img tag. 

<telerik:GridHyperLinkColumn HeaderText="" UniqueName="CourseDetailsLink" ImageUrl="Images/ClockIcon.png" DataNavigateUrlFields="TrainingItemID" DataNavigateUrlFormatString="CourseDetails.aspx?itemID={0}" DataTextField="TrainingItemID" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="50px" AllowFiltering="false" Groupable="false"></telerik:GridHyperLinkColumn>
Margo Noreen
Top achievements
Rank 1
Iron
Veteran
 answered on 22 Mar 2013
1 answer
65 views
While working on implementing a custom FileBrowserContentProvider, I've come across two issues which I could use some guidance on.

First, when deleting folders, they still appear in the right-hand pane of the FileExplorer control even though they have been removed from the TreeView.

Second, I've implemented automatic unzipping to the StoreFile method following the work of several previous posters. This appears to cause issues for the TreeView, which renders any folders inside of the extracted folders as blank items.

Has anyone else encountered similar issues which could shed light on the cause of these behaviors? Also, clicking the refresh button in the toolbar at the top of the control appears to "fix" both issues. Is there a way to trigger this refresh behavior from the code-behind?
Vessy
Telerik team
 answered on 22 Mar 2013
3 answers
253 views
How can I get all the checked items (nodes) in DropDownTree server-side?
Hank
Top achievements
Rank 1
 answered on 22 Mar 2013
10 answers
433 views
Hello!

There is the same article at your documentation.
Quote:
"
Otherwise, you have to load the user control only the first time:
protected void Page_Load(object sender, EventArgs e)
{
        if (Page.FindControl("myUC") == null)
        {
            Control myControl = this.LoadControl("gridUC.ascx");
            myControl.ID = "myUC";
            this.Panel1.Controls.Add(myControl);
        }
}
"

I want to know if we add controls dynamically we should restore it at every postback. So if (Page.FindControl("myUC") == null) will always true, and control would be recreated.

Dynamically creation userControl at Page_Init is not possible for me. Could u give some comment?

Thanks, Andrew
Daniel
Telerik team
 answered on 22 Mar 2013
2 answers
513 views
I have the following button declared:

<telerik:RadButton ID="btnProcessPayment" runat="server" Text="Process Payment" CssClass="btn-red-strip"
    Style="float: left;" ButtonType="SkinnedButton" EnableTheming="false"
    OnClick="btnProcessPayment_Click" Height="48px" Enabled="false"
    DisabledButtonCssClass="btn-gray-l"
    HoveredCssClass="btn-red-strip" SingleClick="True"
    SingleClickText="Processing..." EnableEmbeddedSkins="False" />

The button is disabled by default until the user checks a box.  Here is the checkbox event handler:

protected void chkPaymentMsgAck_CheckedChanged(object sender, EventArgs e)
{
    btnProcessPayment.Enabled = chkPaymentMsgAck.Checked;
}

This is the related CSS:

.btn-red-strip
{
    background: url("images/btn-drk-red-strip.jpg") repeat-x scroll 0 0 transparent;
    color: white;
    display: block;
    height: 48px;
    line-height: 48px;
    padding: 0 10px;
    cursor: pointer;
}
 
.btn-gray-strip
{
    background: url("images/btn-gray-strip.jpg") repeat-x scroll 0 0 transparent;
    color: white;
    display: block;
    height: 48px;
    line-height: 48px;
    padding: 0 10px;
    cursor: pointer;
}

Everything displays fine when the button is enabled or disabled BUT when it is disabled and then mouse-over'ed, the button background disappears.  I can get rid of this behavior by enabling the built-in styling instead but I want the button to follow the same look as the rest of the site (which don't use RadControls).
J
Top achievements
Rank 1
 answered on 22 Mar 2013
4 answers
108 views
Is it possible to have the RadDocks become tabbed when more than one shares the DockZone?

Michael
Slav
Telerik team
 answered on 22 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?