Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
294 views
Is it possible to export each page of the radgrid to each page of the exported pdf? If it is possible can you give me an example?
Princy
Top achievements
Rank 2
 answered on 25 Feb 2014
1 answer
413 views
Hi,
I am trying to set filter true on two gridbound columns of the radgrid which has dataformatstring to it. But the filtering doesnt seem to work. Here is the code for the columns. This should be something simple but still couldn't find out. Really appreciate some help. Thanks.

Filter works fine in the first one.
=======================
<telerik:GridBoundColumn DataField="divName" DataType="System.String" HeaderText="Division Of Admin"
                        Visible="true" HeaderStyle-Width="13%" FilterControlWidth="65%" SortExpression="divName"
                        UniqueName="divName" AllowFiltering="true" AutoPostBackOnFilter="true" ShowFilterIcon="false">
                    </telerik:GridBoundColumn>

Filter doesnt work
==============
 <telerik:GridBoundColumn DataField="eventDt" DataFormatString="{0:MM-dd-yyyy}" HeaderText="Event Date" Visible="true" HeaderStyle-Width="15%"
                    FilterControlWidth="65%" SortExpression="eventDt" UniqueName="eventDt" AllowFiltering="true" AutoPostBackOnFilter="true" ShowFilterIcon="false">
</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="startTime" DataFormatString="{0:t}" HeaderText="Event Time" Visible="true" HeaderStyle-Width="15%"
                        FilterControlWidth="65%" SortExpression="startTime" UniqueName="startTime" AllowFiltering="true" AutoPostBackOnFilter="true" ShowFilterIcon="false">
                    </telerik:GridBoundColumn>
Princy
Top achievements
Rank 2
 answered on 25 Feb 2014
10 answers
2.6K+ views
Hi
 How to close rad window from server side click event ?.From main page button click event i open Rad Window ,and in that i use three text boxes,if all text boxes having value ,it will store in database and close that rad window,if any one text box is empty rad window not close and show the error msg.

My code is :

In Client Side Code:

   function CloseAndRedirect(sender, args) {
            GetRadWindow().BrowserWindow.location.href = 'Default1.aspx';        //Redirect to new url 
            GetRadWindow().close();       //closes the window       
        }

        function GetRadWindow()   //Get reference to window    
        {
            var oWindow = null;
            if (window.radWindow)
                oWindow = window.radWindow;
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;
            return oWindow;
        }

Server Side Code :

 Protected Sub btnSendMail_Click(sender As Object, e As EventArgs) Handles btnSendMail.Click
             If (txtName.Text = "" or txtcompany.Text="" or txtphone.Text="" ) Then

                      ShowMessage("enter all values")

            Else
             'Dim script As String = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(CloseAndRedirect);</script>"
            'ClientScript.RegisterStartupScript(Me.GetType(), "Close", script)

            Dim script As String = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(CloseAndRedirect());</script>"
            RadScriptManager.RegisterStartupScript(Me, Me.GetType(), "CloseAndRedirect()", script, False)

    End Sub

I try both in else block ,but both not work.it show error like "0x800a1391 - Microsoft JScript runtime error: 'Sys' is undefined".

My need is close the rad window when  server side button click event in and stay in main page

Pls Reply asap.......
    Regards
        Aravind
Shinu
Top achievements
Rank 2
 answered on 25 Feb 2014
3 answers
123 views
Hi,

I have in a RadGrid (latest version) a GridTemplateColumn. In the ItemTemplate for this GridTemplateColumn I create a RadMenu with several menuitems.
When I open this menu the dropdown with the menuitems doesn't show beyond the borders of the row of the grid (see attached screenshot).
How can I make the menu appear properly?

Paul
Shinu
Top achievements
Rank 2
 answered on 25 Feb 2014
3 answers
121 views
hi , 
i have GridView Contain DetailTable 
DetailTable contain hyperlink Template column 
 i want to hide && show this hyperlink basedon Post.USerID

  protected void gvComments_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        if (!e.IsFromDetailTable)
        {
            var result = TopicsProvider.GetAllTopics();
            gvComments.MasterTableView.VirtualItemCount = result.Count();
            gvComments.MasterTableView.DataSource = result;
        }

    }protected void gvComments_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
      if (e.Item is GridDataItem && e.Item.OwnerTableView.Name == "Posts")
        {
            if ((((e.Item.DataItem as Post).USerID) == int.Parse(Session["UId"].ToString())))
            {

                (gvComments.MasterTableView.DetailTables[0].Columns[6] as GridTemplateColumn).Visible = true;
            }
            else
            {
                (gvComments.MasterTableView.DetailTables[0].Columns[6] as GridTemplateColumn).Visible = false;
            }
        }
}
 protected void gvComments_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e)
    {
        if (sender.Equals(gvComments))
        {
            gvComments.Dispose();
        }
        Label TopicID = (Label)e.DetailTableView.ParentItem.FindControl("lID");
        var result = PostProvider.GetPostsByTopicID(int.Parse(TopicID.Text));
        e.DetailTableView.DataSource = result;
        e.DetailTableView.DataBind();

}

please help ..
Regards ,
 Hanaa Sayed

Shinu
Top achievements
Rank 2
 answered on 25 Feb 2014
4 answers
208 views
Hello team,

I am using telerik radtabstrip in my project. I want to display image on selected radtabstrip, is there possible. i tried a lot on OnClientTabSelected="OnClientTabSelected" with javascript function. plaese help me out how can i solve my problem.

My code is that 

<script type="text/javascript" language="javascript">
         function OnClientTabSelected(sender, eventArgs) {
             var tab = eventArgs.get_tab();
             alert(get_text());

             tab.set_imageUrl('../images/arrow-on.png');
             tab.get_element().style.ImageUrl = "Images\arrow-on.png";

         }
    </script>
Shinu
Top achievements
Rank 2
 answered on 25 Feb 2014
2 answers
137 views
I have just run across this issue due to work we are doing for cross-browser compatibility. I use the following code to display a confirmation dialog:

​Confirmation Dialog .ASPX:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdminExecuteConfirmDialog.aspx.cs" Inherits="FEUserAdmin.dialogs.AdminExecuteConfirmDialog" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head id="headAdminExecuteConfirmDialog" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en" />
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="-1"/>
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE"/>
<title>Sabre Admin Confirmation Message</title>
<link href="./../css/AdminWeb.css" rel="stylesheet" type="text/css" />
<link href="./../skins/WLSmall/Ajax.WLSmall.css" rel="stylesheet" type="text/css" />
<link href="./../skins/WLLarge/Ajax.WLLarge.css" rel="stylesheet" type="text/css" />
<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
<script type="text/javascript" language="javascript" src="./../js/AdminWeb.js"></script>
<style type="text/css">
html
{
overflow:hidden;
}
</style>
</head>
<body>
<form id="formAdminExecuteConfirmDialog" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
</Scripts>
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="500"></telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" MinDisplayTime="500" Skin="WLSmall" EnableEmbeddedSkins="false" ></telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel3" runat="server" MinDisplayTime="500" Skin="WLLarge" EnableEmbeddedSkins="false" ></telerik:RadAjaxLoadingPanel>
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Web20"></telerik:RadSkinManager>
<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Web20"/>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript" language="javascript">
function GetRadWindow()
{
var oWnd = null;
if (window.radWindow)
oWnd = window.radWindow;
else if (window.frameElement.radWindow)
oWnd = window.frameElement.radWindow;
return oWnd;
}

function DialogClose()
{
var oWnd = GetRadWindow();

oWnd.close();
}
</script>
</telerik:RadCodeBlock>
<center>
<div>
<table id="tblAWECControls" cellspacing="0" cellpadding="2" rules="none" border="0" class="sfecua_table_noborder" width="100%" style="table-layout:fixed">
<tr style="vertical-align:top; width:100%">
<td align="left" style="width:100%; white-space:normal">
<div id="divValidationResults" style="height:115px; overflow-y:hidden">
<asp:TextBox ID="tbAWECExecuteConfirmMessage" runat="server" BorderStyle="None" CssClass="sfecua_label_headingCenterMedium" Rows="8" ReadOnly="True" Width="95%" TextMode="MultiLine"></asp:TextBox>
</div>
</td>
</tr>
<tr style="vertical-align:top; width:100%">
<td align="center" style="width:100%; white-space:nowrap">
<hr style="width:95%" />
</td>
</tr>
<tr style="vertical-align:top; width:100%">
<td align="center" style="width:100%; white-space:nowrap">
<telerik:RadButton ID="btnAWECCloseDialog" runat="server" AutoPostBack="false" Text="Close" Width="95%" OnClientClicked="DialogClose"></telerik:RadButton>
</td>
</tr>
</table>
</div>
</center>
</form>
</body>
</html>
 
From Parent Page:

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" KeepInScreenBounds="true" ReloadOnShow="true" ShowContentDuringLoad="false" Skin="Web20" VisibleStatusbar="false">
<Windows>
<telerik:RadWindow ID="rwValidationResults" Modal="true" Width="460px" Height="252px" Behaviors="Close" ></telerik:RadWindow>
<telerik:RadWindow ID="rwExecuteConfirm" Modal="true" Width="320px" Height="220px" Behaviors="Close" ></telerik:RadWindow>
<telerik:RadWindow ID="rwExecuteError" Modal="true" Width="320px" Height="220px" Behaviors="Close" ></telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>

Invoked By:

var objECWindow = radopen('./../dialogs/AdminExecuteConfirmDialog.aspx?ConfirmMessage=' + strExecuteConfirmMessage, 'rwExecuteConfirm');

----

This displays as expected in IE11, but is painted without borders and without a title bar background (and corner icons) in the current versions of FireFox and Chrome based browsers (Chromium, Opera.)

Please see attached screenshots.  Any suggestions would be greatly appreciated.

KK60
Top achievements
Rank 1
 answered on 24 Feb 2014
1 answer
113 views
I am manually creating appointments into my RADScheduler. On the very first page load, all works perfectly. However the moment I navigate or change the view, all the appointments vanish from the screen. I stepped through the code and my data binding routines are running and they are creating appointments after each navigation...but nothing displays.

Is there an additional "refresh" step I need to do to force the appointments to display? Again I am manually creating appointments, I am not using the RADScheduler's "DataBinding" methods because recurring events don't seem to work right if I bind to a datasource.

Thanks!
Ben
Top achievements
Rank 1
 answered on 24 Feb 2014
1 answer
95 views
Am I forgetting to do something here? 

I tried two difference methods:

Method 1:
---------------------
I retrieve my record from the DB
I place the string from my loaded record into the RecurrenceEditor's RecurrenceRuleText field
I make changes to other areas of my record (I do not touch the RecurrenceEditor)
I save my record again...
I find that the RecurrenceEditor's .RecurrenceRuleText field no longer holds "Exceptions", they have been erased

Method 2:
---------------------
I retrieve my record from the DB
I load the RecurenceRuleText into a RecurrenceRule object.
I place the RecurrenceRule object into the RecurrenceEditor's RecurrenceRule field
I make changes to other areas of my record (I do not touch the RecurrenceEditor)
I save my record again...
I find that the RecurrenceEditor's .RecurrenceRule field no longer holds "Exceptions", they have been erased
Ben
Top achievements
Rank 1
 answered on 24 Feb 2014
11 answers
197 views
Is there a way to modify the text that is displayed on the appointment block?

In my situation, I have my own custom Appointment object that has all the required fields, plus several other custom fields. The datasource for the scheduler is a custom collection of these objects.

In my appointment block, I want to display the Subject (required field) along with its associated location (custom field). Is this possible?
Kerry
Top achievements
Rank 1
 answered on 24 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?