Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
68 views
I am attempting to get a div to show and follow the mouse based on the row that the mouse is over. It seems that I can't get the right element to target in order to make this work. 

In the code below lblEnclarityReportsPerPayer gets filled from codebehind with tables that have an ID that corresponds to the simpleRequestDate. The problem is that my $("tr.rgHoveredRow").mousemove() is not firing. 


<telerik:RadGrid runat="server" ID="gvReport" DataSourceID="dsReport" >
    <ClientSettings>
        <ClientEvents OnRowMouseOver="showPayerBreakOut" OnRowMouseOut="hidePayerBreakOut" />
    </ClientSettings>
    <MasterTableView DataKeyNames="simpleRequestDate" ClientDataKeyNames="simpleRequestDate" CommandItemDisplay="Top" PageSize="100">
    <CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" />
        <Columns>
            <telerik:GridDateTimeColumn DataField="RequestDate" DataFormatString="{0:MM/dd/yyyy}" HeaderText="Request Date" SortExpression="RequestDate" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" />
            <telerik:GridBoundColumn DataField="requests" HeaderText="Requests" SortExpression="requests" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" />
            <telerik:GridBoundColumn DataField="faxNumbersReceived" HeaderText="Fax Numbers Received" SortExpression="faxNumbersReceived" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" />
            <telerik:GridBoundColumn DataField="percentage" HeaderText="Percentage Found" SortExpression="percentage" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" />
        </Columns>
    </MasterTableView>   
</telerik:RadGrid>
 
<script type="text/javascript">
    $(document).ready(function () {
        $('#payerReports span').children().each(function () {
            $(this).hide();
        });
    });
 
    var moveLeft = 20;
    var moveDown = 10;
 
    $("tr.rgHoveredRow").mousemove(function (e) {
        $('#payerReports').css('top', e.pageY + moveDown).css('left', e.pageX + moveLeft);
    });
 
    function showPayerBreakOut(sender, eventArgs) {
        $("#" + eventArgs.getDataKeyValue("simpleRequestDate")).show();
    }
    function hidePayerBreakOut(sender, eventArgs) {
        $("#" + eventArgs.getDataKeyValue("simpleRequestDate")).hide();
    }
 
     
</script>
 
<div id="payerReports">
    <asp:Label runat="server" ID="lblEnclarityReportsPerPayer" />
</div>
Kostadin
Telerik team
 answered on 09 Jan 2013
3 answers
123 views

am using IIS Url Rewrite to create friendly url, i have noticed after enabling it the radeditor fail to render as in the image :http://i.stack.imgur.com/TZo2O.png

The rule am using look like this in web.config :

<rewrite>
        <rules>
            <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
                <match url="^([^/]+)/?$" />
                <conditions>
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                </conditions>
                <action type="Rewrite" url="Default.aspx?name={R:1}" />
            </rule>
        </rules>
    </rewrite>


I have changed DialogHandler from aspx to axd and also changed the path for it to look like below and also cant render properly

<add path="~/Telerik.Web.UI.DialogHandler.axd" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />

Rumen
Telerik team
 answered on 09 Jan 2013
3 answers
184 views
Is there a way to assign variable to $find function?
eg: It can be Sunday thru Saturday
var dateOfWeek = "Wednesday"
var timePickerStart = $find("<%= RadDateTimePickerWednesdayStart.ClientID %>");

or I can use:
var timePickerStart2 = document.getElementById("ctl00_TabContent_RadWindow1_C_RadDateTimePicker" + dateOfWeek + "Start");
timePickerStart2.set_enabled(true);
but I receive error "
Microsoft JScript runtime error: Object doesn't support property or method 'set_enabled".
Marin Bratanov
Telerik team
 answered on 09 Jan 2013
2 answers
141 views
When I  use editor in HTML mode its breaking valid meta tags from

   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

into

        &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
?
Rumen
Telerik team
 answered on 09 Jan 2013
1 answer
115 views
how to impliment radprogressarea to the asyncupload on a tooltip?
Shinu
Top achievements
Rank 2
 answered on 09 Jan 2013
1 answer
151 views
how to open radwindow from server side?
Shinu
Top achievements
Rank 2
 answered on 09 Jan 2013
1 answer
124 views
Hello,
I have a RadPanelBar. Under RadPanelBar there are 5 RadPanelItem's, each having a different ContentTemplate of different heights.

Can I set the height of ContentTemplate without scroll bars?

Regards,
Abhay
Kate
Telerik team
 answered on 09 Jan 2013
1 answer
133 views
how to disable rotate buttons?
Princy
Top achievements
Rank 2
 answered on 09 Jan 2013
3 answers
72 views
I set NewLineBr="false", initial state is working fine. e.g., after you change alignment to "center" and click html view and go back to Design view, you can't change the alignment.

Any advice?????????????


Thanks.
Nikolay
Telerik team
 answered on 09 Jan 2013
9 answers
408 views

I've searched through the forums and haven't found anyone with exactly this situation yet, so hopefully I can get some help from all of you smart people out there. 

I've got an application page in a WSS 3.0 environment that has a RadGrid on it.  The grid is populated with data from a back-end SQL database and I've implemented the Export to Excel functionality as described here:  http://demos.telerik.com/aspnet-ajax/Grid/Examples/GeneralFeatures/Exporting/DefaultCS.aspx.  Exporting the data to Excel works just fine.  However, after the "Export to Excel" button has been clicked, all controls on my page are no longer functional.  I can't Export to Excel again, I can't refresh the grid, etc...everything is effectively frozen.

To further test this, I created a standard ASP.NET Web Application (to see if it would work outside of a WSS 3.0 environment).  Using the EXACT SAME CODE, everything works just fine.  I can export, refresh the grid, and life is good. 

My grid is ajaxified through RadAjaxManager.  The "Export to Excel" button is not ajaxified and sits in a HTML table above the grid.

I need some guidance as to why my SharePoint environment might be giving me a problem.  To help you help me, see the below code blocks.

This is my RadScriptManager as it sits on a master page that my SharePoint environment is using 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" > 
</telerik:RadScriptManager> 

This is the code within my .aspx page for the contentplaceholder "PlaceHolderMain".  This page is deployed to SharePoint as an application page.
<asp:Content ID="Main" contentplaceholderid="PlaceHolderMain" runat="server">  
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
        Width="75px">  
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
            style="border: 0px;" /> 
    </telerik:RadAjaxLoadingPanel> 
<table cellpadding="5px">  
    <tr> 
        <td class="SearchLabel">  
            View:  
        </td> 
        <td> 
            <telerik:RadComboBox ID="cboViews" runat="server" Skin="WebBlue">  
                <Items> 
                    <telerik:RadComboBoxItem Text="" Value="" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                    <telerik:RadComboBoxItem Text="DummyData" Value="DummyData" /> 
                </Items> 
            </telerik:RadComboBox> 
        </td> 
        <td> 
            <asp:LinkButton CssClass="SearchLabel" OnCommand="lbtnGo_Command" ID="lbtnGo" Font-Underline="true" runat="server" Text="Go"/>  
        </td> 
    </tr> 
</table> 
<table> 
    <tr> 
        <td align="left">  
            <asp:Button ID="btnExport" Width="150px" Text="Export to Excel" OnClick="btnExport_Click" runat="server" /> 
        </td> 
    </tr> 
</table> 
<table> 
    <tr> 
        <td> 
            <telerik:RadGrid   
                ID="grdView"   
                runat="server" 
                Skin="Office2007" 
                PageSize="100" 
                OnNeedDataSource="grdView_NeedDataSource" 
                OnExcelMLExportStylesCreated="RadGrid1_ExcelMLExportStylesCreated" 
                OnExcelMLExportRowCreated="RadGrid1_ExcelMLExportRowCreated" 
                > 
                <MasterTableView HeaderStyle-Font-Bold="true" HeaderStyle-Wrap="false" ItemStyle-Wrap="false">  
                </MasterTableView> 
                <GroupingSettings CaseSensitive="false" /> 
            </telerik:RadGrid> 
        </td> 
    </tr> 
</table> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="lbtnGo">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="grdView" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="grdView">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="grdView" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
</asp:Content> 
 

This is my C# source
1  public class MyClass : LayoutsPageBase     
2  {     
3         protected RadGrid grdView;     
4         protected RadComboBox cboViews;     
5         protected Button btnExport;     
6         private string curview;     
7     
8         protected override void OnLoad(EventArgs e)     
9         {     
10                 if (!Page.IsPostBack)     
11                 {     
12                     grdView.Visible = false;     
13                 }     
14                 else     
15                 {     
16                     grdView.Visible = true;     
17                 }                 
18         }     
19     
20         protected void lbtnGo_Command(object sender, CommandEventArgs e)     
21         {     
22             grdView.Rebind();     
23         }     
24     
25         protected void grdView_NeedDataSource(object o, GridNeedDataSourceEventArgs e)     
26         {     
27                 if (cboViews.SelectedValue != "")     
28                 {     
29                     curview = cboViews.SelectedValue;     
30     
31                     Database db = DatabaseFactory.CreateDatabase();     
32                     DbCommand getleview = db.GetStoredProcCommand("MyStoredProcedure");     
33     
34                     db.AddInParameter(getleview, "View", DbType.String, curview);     
35     
36                     DataSet ds = db.ExecuteDataSet(getleview);     
37                     DataTable dt = ds.Tables[0];     
38     
39                     grdView.DataSource = dt;     
40                 }     
41                 else     
42                 {     
43                     grdView.DataSource = string.Empty;     
44                 }     
45         }     
46     
47         protected void btnExport_Click(object sender, EventArgs e)     
48         {     
49             ConfigureExport();     
50             grdView.MasterTableView.ExportToExcel();     
51         }     
52     
53         public void ConfigureExport()     
54         {     
55             grdView.ExportSettings.ExportOnlyData = true;     
56             grdView.ExportSettings.IgnorePaging = true;     
57             grdView.ExportSettings.OpenInNewWindow = true;     
58             if (cboViews.SelectedValue != "")     
59             {     
60                 curview = cboViews.SelectedValue;     
61                 grdView.ExportSettings.FileName = "SomeFileName_" + curview;     
62             }     
63             else     
64             {     
65                 grdView.ExportSettings.FileName = "SomeFileName";     
66             }     
67         }     
68     
69         protected void RadGrid1_ExcelMLExportRowCreated(object source, Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowCreatedArgs e)     
70         {     
71             if (e.RowType == Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowType.DataRow)     
72             {     
73                 if (e.Row.Cells[0] != null && ((string)e.Row.Cells[0].Data.DataItem).Contains("U"))     
74                 {     
75                     e.Row.Cells[0].StyleValue = "MyCustomStyle";     
76                 }     
77             }     
78         }     
79     
80         protected void RadGrid1_ExcelMLExportStylesCreated(object source, Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLStyleCreatedArgs e)     
81         {     
82             foreach (Telerik.Web.UI.GridExcelBuilder.StyleElement style in e.Styles)     
83             {     
84                 if (style.Id == "headerStyle")     
85                 {     
86                     style.FontStyle.Bold = true;     
87                     style.FontStyle.Color = System.Drawing.Color.Gainsboro;     
88                     style.InteriorStyle.Color = System.Drawing.Color.Wheat;     
89                     style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid;     
90                 }     
91                 else if (style.Id == "itemStyle")     
92                 {     
93                     style.InteriorStyle.Color = System.Drawing.Color.WhiteSmoke;     
94                     style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid;     
95                 }     
96                 else if (style.Id == "alternatingItemStyle")     
97                 {     
98                     style.InteriorStyle.Color = System.Drawing.Color.LightGray;     
99                     style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid;     
100                 }     
101             }     
102     
103             Telerik.Web.UI.GridExcelBuilder.StyleElement myStyle = new Telerik.Web.UI.GridExcelBuilder.StyleElement("MyCustomStyle");     
104             myStyle.FontStyle.Bold = true;     
105             myStyle.FontStyle.Italic = true;     
106             myStyle.InteriorStyle.Color = System.Drawing.Color.Gray;     
107             myStyle.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid;     
108             e.Styles.Add(myStyle);     
109         }   
110  }  
 

So this code works perfectly in a standard asp.net web application, but does not in my WSS 3.0 environment.  One of the obvious differences between the two is that WSS 3.0 makes use of master pages and that's where I have my RadScriptManager.  In the asp.net web application, it's on the same .aspx page.  Maybe it's because it's the end of the day and I cannot think properly any more, but I am currently at a complete loss.  I appreciate any help.

Eric Skaggs
Sujay
Top achievements
Rank 1
 answered on 09 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?