Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
484 views
I am trying to highlight the current cell in a radGrid while mouseover is happening.   For the most part I have it figured out, except for getting the initial background cell color before changing it, so I can change it back on the mouseout event.

Here is my JS.  The row that is not giving me what I need is $LastColor = item.get_cell(cellName).style.background;  It is returning white when it should be getting the cell background color.  What is the correct property to get this?

var $LastColor
 
       function RowMouseOver(sender, eventArgs) {
           var rowIndex = eventArgs.get_itemIndexHierarchical();
           var item = sender.get_masterTableView().get_dataItems()[rowIndex];
           var cellIndex = eventArgs._domEvent.target.cellIndex;
           var cellName = $find('<%= rgProjectDetails.ClientID%>').get_masterTableView().get_columns()[cellIndex].get_uniqueName();
           $LastColor = item.get_cell(cellName).style.background;
           item.get_cell(cellName).style.background = "red";
       }
       function RowMouseOut(sender, eventArgs) {
           var rowIndex = eventArgs.get_itemIndexHierarchical();
           var item = sender.get_masterTableView().get_dataItems()[rowIndex];
           var cellIndex = eventArgs._domEvent.target.cellIndex;
           var cellName = $find('<%= rgProjectDetails.ClientID%>').get_masterTableView().get_columns()[cellIndex].get_uniqueName();
           item.get_cell(cellName).style.background = $LastColor;
       }
Jayesh Goyani
Top achievements
Rank 2
 answered on 24 Mar 2013
0 answers
54 views
I am using telerik radpanelbar and source from  a sitemap data source.When i give value to url in the sitemap,then the link is redirected to a page other that telerik radwindow manager.I tried to give the value of URl to empty and give  url value to the title attribute,It works and open in the radwindow but the title of the menu is also a link which is not good at all.
How can i open radpanel menus open in the rad window without redirection to its own page other than Radwindow manager?
yishagerew
Top achievements
Rank 1
 asked on 24 Mar 2013
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
193 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
273 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
171 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
179 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
60 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
252 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
416 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?