Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
441 views
Hi

We have recently updated a web application which was using Telerik.Web.UI version 2008.3.1314.35 to and updated the to version 2010.3.1317.35. 

The application sets the RadWindowManager's DestroyOnClose="True" and opens a window using server side code. Before I updated when window's close button is clicked, the window closes and the RadWindowManager to deletes the window.  
After update to version 2010.3.1317.35 the window closes but is not deleted and when the page posts back the window reappears.

An example of the mark up I use is
<body>
    <form id="form1" runat="server">
     <telerik:RadScriptManager ID="QMAS2ScriptManager" runat="server" EnableTheming="True">
    </telerik:RadScriptManager>
    <telerik:RadWindowManager ID="DialogWindowManager" runat="server" 
        Modal="True" Overlay="True" VisibleStatusbar="False" ReloadOnShow="True" 
        ShowContentDuringLoad="False"
        KeepInScreenBounds="True" 
        Behaviors="Resize, Close, Maximize, Move, Reload" 
        OnClientClose="OnClientClose"
        DestroyOnClose="True"
        Height="500px" Width="650px" Behavior="Resize, Close, Maximize, Move, Reload"
        InitialBehavior="None" Left="" Style="display: none;" Top="">
    </telerik:RadWindowManager>
    <div>
       <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
    </div>
    <script type="text/javascript">
        function OnClientClose(radWindow) 
        {
           __doPostBack();
        }
    </script>
    </form>
</body>

the code I use to create a new window looks like 

       protected void Button1_Click(object sender, EventArgs e)
        {
            RadWindowManager rwm = this.DialogWindowManager;
            RadWindow newWindow = new RadWindow();
            newWindow.NavigateUrl = "wwww.google.co.uk"; // url;//  +"?sessionPrefix=" + sessionPrefix + additionalQueryStringParams;
            newWindow.Title = "Test";
            newWindow.VisibleOnPageLoad = true;
            rwm.Height = 400;
            rwm.Width = 400;
            rwm.Windows.Add(newWindow);
        }

Any idea why this is happening?


Martin
Top achievements
Rank 1
 answered on 01 Feb 2012
2 answers
150 views
I am getting runtime error  " Microsoft JScript runtime error: 'ONClientLoad' is undefined

I have radeditor defined with  clientside event

 <telerik:RadEditor ID="RadEditor3" Runat="server" EditModes="Design, Preview"

 StripFormattingOnPaste="MSWordNoFonts" Width="100%" OnClientLoad="OnClientLoad"

 AutoResizeHeight="false" BorderStyle="None" Height="530px" Skin="Office2007" >


Javascript function is

function OnClientLoad(editor) {
           editor.attachEventHandler("onkeydown", function(e) {
               var content = editor.get_text(); //returns the editor's content as plain text
               var words = 0;
               if (content) {
                   var punctRegX = /[!\.?;,:&_\-\-\{\}\[\]\(\)~#'"]/g;
                   var contentcontent = content.replace(punctRegX, "");
                   var trimRegX = /(^\s+)|(\s+$)/g;
                   contentcontent = content.replace(trimRegX, "");
                   if (content) {
                       splitRegX = /\s+/;
                       var array = content.split(splitRegX);
                       words = array.length;
                   }
               }
               // var counter = $get("counter");
               // counter.innerHTML = "Words: " + words + " Characters: " + content.length;
               var wcountLabel = document.getElementById("<%= lblWordCount.ClientID %>";
               var hfwcountId = document.getElementById("<%= hfWordCount.ClientID %>");
               wcountLabel.innerText = "Words: " + words;
               hfwcountId.innerText = words 
           });

Please let me know what I am missing here

Thanks

NVB
Top achievements
Rank 1
 answered on 01 Feb 2012
0 answers
81 views
I have RAD strip and two rad multi page 
the tabs are two .  1) grid_tab     2) detail_tab
1)  it has a a grid view in which one column I want to make a hyper link or simple text which has onclick event or which can run some C# code when ever clicked (other then button,image button or any bulky object)  
2)  it will open the details of records passed from the click of the grid view row in grid_tab 

there are two issues I am facing 

1) in grid_tab how to find a clickable text which run some C# code when ever clicked opens the detail_tab 
2) how can I pass the id if I am not displaying the id (PK) of respective in the grid of grid_tab 
usman
Top achievements
Rank 1
 asked on 01 Feb 2012
4 answers
250 views
Hi,

I have searched the web, but apparently do not posses enough skills to find desired information.

My question: Is it possible to tell Timeline view to hide resources declared in GroupBy field of TimelineView setting, if they do not contain any appointments in selected period? I have seen that Silverlight and WPF do contain such functionality with DisplayEmptyGroup property, but have not seen an option to do that in ASP.NET AJAX.

Here is my Scheduler markup.
<telerik:RadScheduler ID="schTimeline" runat="server" SelectedView="TimelineView" AllowDelete="false" AllowEdit="false" AllowInsert="false" DataSourceID="odsTimelineData"
    DataKeyField="ID" DataSubjectField="SUBJECT" DataStartField="START_DATE" DataEndField="END_DATE" OverflowBehavior="Expand" RowHeaderWidth="180px">
    <TimelineView UserSelectable="false" GroupBy="Employees" GroupingDirection="Vertical" SortingMode="Global" />
    <MultiDayView UserSelectable="false" />
    <DayView UserSelectable="false" />
    <WeekView UserSelectable="false" />
    <MonthView UserSelectable="false" />
    <ResourceTypes>
        <telerik:ResourceType KeyField="Username" Name="Employees" TextField="Name" ForeignKeyField="PERSON" DataSourceID="odsEmployees"/>
    </ResourceTypes>
    <AppointmentTemplate>
        <div class="<%# Eval("CssClass") %>">
            <p class="rsCustomSubject"><%# Eval("Subject") %></p>
        </div>
    </AppointmentTemplate>
</telerik:RadScheduler>

What I would like to do is hide all employees that don't have any appointments in timespan displayed in timeline view.

Thank you for your response
Vlad
Top achievements
Rank 1
 answered on 01 Feb 2012
2 answers
75 views
The new "Social Share" feature is a great feature and thank you for this. I think the next step for Telerik, is to provide a control that we can allow user to authenticate via their FB or Twitter or Google+ account.
Instead of each one of us writing the API code to these three social network, it would be best to be part of a control.

It's also very important for Telerik to provide events and methods/properties that when a person is logged in successfully, then we can retrieve the available attributes that FB or Twitter or Google+ provides from their account (at least name and Email address). This is important, because in many cases (for example), I need to create that person into the ASP.Net membership system and I also create a series of other tables to extend that user (i.e. Profile, settings, privacy setting and etc.) as part of my system. So, just authenticating them is not enough, but to be able to get access to the their attributes (of course this is with their "Allow" permission).

Love to hear comments on this!
Thank you in advance!
Ben Hayat
Top achievements
Rank 2
 answered on 01 Feb 2012
4 answers
100 views
OK, here is what I am trying to do. I have a grid and the customer wants totals at the bottom.  Here is an example of the columns in the grid.
<telerik:GridBoundColumn DataField="RulesIdentifiedCount" HeaderText="Rules Identified" Visible="true"                                    UniqueName="RulesIdentifiedCount">
</telerik:GridBoundColumn>
Here is an the code from the itemdatabound event.


Dim

 

 

rulesidentified As Integer = 0

 

If dtr.Read() Then
gridItem("RulesIdentifiedCount").Text = dtr("RulesIdentifiedCount")
rulesidentified = rulesidentified = dtr("RulesIdentifiedCount")
End If

At the end I am taking the rulesidentified variable and trying to set the footer.
If (TypeOf e.Item Is GridFooterItem) Then
Dim footerItem As GridFooterItem = CType(e.Item, GridFooterItem)
footerItem("RulesApplicableCount").Text = rulesidentified
End If


I am not getting the footer to show anything.  What am I doing wrong?
Richard
Top achievements
Rank 1
 answered on 01 Feb 2012
2 answers
46 views
Is it possible to display a Silverlight chart in a tooltip on a radgrid?
Matt
Top achievements
Rank 1
 answered on 01 Feb 2012
19 answers
213 views
Hi Guys,

I was wondering if any of you have tried to create a "OS" like webpage, with a taskbar showing your open windows??

I am trying to create a smalle web-os for a cms like system, and the "start" button is ready, and the windows open as I want them to - But it gets cluttered - so I was wondering if the windows like taskbar was an option??

Thank you in advance :-)

// Morten
Marin Bratanov
Telerik team
 answered on 01 Feb 2012
11 answers
97 views
Hi guys,
this is my second notice regarding this issue.I have aspx page with various telerik controls.There is a RadCombobox control where user choose 'Yes' or 'No' and after postback should go to the next control which is a RadNumericTextBox.
In IE8 works fine but in IE7 instead of going to the next control after postback it is jump on top of the screen.
Please help me with this issue.

Thanks so much,.
Vasil
Telerik team
 answered on 01 Feb 2012
5 answers
166 views
RadControls version 2011.3.1305.35

I have a very simple RadGrid example that allows column sorting.  I have added checkboxes to each column header.  I am experiencing 2 issues when attempting to sort.  The 1st, 3rd, 5th, ... (every other time) times that I click on the column header, my checkboxes disappear and the data does not sort.  This is undesired behavior.  The 2nd, 4th, 6th, ... times that I click on the column header, it sorts as expected and my checkboxes are visible as expected.  What I would like to accomplish is:

#1 - Everytime I click on a column header, the grid sorts.  I would expect the SortCommand event to get raised each time.
#2 - Everytime I click on a column header, the checkboxes are visible.

Please watch this video clip to see the what I have decribed as the issue.  I would expect my breakpoint to be hit on every column sort.

http://screencast.com/t/V8OTlSGMdXSL

Here is my code:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="RadGridSorting.aspx.vb" Inherits="RadGridSorting" %>
      
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>    
        <telerik:RadScriptManager runat="server" ID="mgrJS">
        </telerik:RadScriptManager>        
        <telerik:RadGrid runat="server" ID="dgHeader" Skin="Web20" AllowSorting="true" >
            <ClientSettings>
                <Scrolling UseStaticHeaders="True" />
                <Selecting EnableDragToSelectRows="False" />
            </ClientSettings>
            <MasterTableView BorderWidth="1px" GridLines="Both" style="border-collapse: collapse !Important;" Font-Bold="false" 
                             TableLayout="Fixed" AutoGenerateColumns="false" ShowHeader="True" >
                <RowIndicatorColumn Visible="False">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn Resizable="False" Visible="False">
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <EditFormSettings>
                    <PopUpSettings ScrollBars="None" />
                </EditFormSettings>
            </MasterTableView>
        </telerik:RadGrid>   
    </form>
</body>
</html>
Partial Class RadGridSorting
    Inherits System.Web.UI.Page
  
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim dtHeader As New DataTable
            dtHeader.Columns.Add(New DataColumn("COL_ID", GetType(String)))
            Dim colRow As DataRow = dtHeader.NewRow
            colRow(0) = "1234567"
            dtHeader.Rows.Add(colRow)
            colRow = dtHeader.NewRow
            colRow(0) = "2345678"
            dtHeader.Rows.Add(colRow)
            colRow = dtHeader.NewRow
            colRow(0) = "3456789"
            dtHeader.Rows.Add(colRow)
            colRow = dtHeader.NewRow
            colRow(0) = "4567890"
            dtHeader.Rows.Add(colRow)
            colRow = dtHeader.NewRow
            colRow(0) = "5678901"
            dtHeader.Rows.Add(colRow)
            colRow = dtHeader.NewRow
            colRow(0) = "6789012"
            dtHeader.Rows.Add(colRow)
            colRow = dtHeader.NewRow
            colRow(0) = "7890123"
            dtHeader.Rows.Add(colRow)
            'Define columns of master table view.
            For Each row As DataRow In dtHeader.Rows
                Dim newCol As New GridBoundColumn
                dgHeader.MasterTableView.Columns.Add(newCol)
                newCol.HeaderText = row("COL_ID")
                newCol.DataField = row("COL_ID")
                newCol.DataFormatString = "{0:N0}"
                newCol.HeaderStyle.Width = 100
                newCol.ItemStyle.Width = 100
            Next
            Session("header") = dtHeader
        End If
    End Sub
  
    Protected Sub dgHeader_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles dgHeader.ItemDataBound
        If e.Item.ItemType = GridItemType.Header Then
            Dim hdrItem As GridHeaderItem = CType(e.Item, GridHeaderItem)
            For i As Integer = 2 To hdrItem.Cells.Count - 1
                Dim ctrl As LinkButton = CType(hdrItem.Cells(i).Controls(0), LinkButton)
                If ctrl IsNot Nothing Then
                    Dim val As Integer = 0
                    Integer.TryParse(ctrl.Text, val)
                    If val > 0 Then
                        Dim chk As New CheckBox
                        chk.ID = "chk" & val
                        hdrItem.Cells(i).Controls.Clear()
                        hdrItem.Cells(i).Controls.Add(chk)
                        hdrItem.Cells(i).Controls.Add(ctrl)
                        hdrItem.Cells(i).HorizontalAlign = HorizontalAlign.Center
                    End If
                End If
            Next
  
        End If
    End Sub
  
    Protected Sub dgHeader_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles dgHeader.NeedDataSource
        If Session("data") Is Nothing Then
            Session("data") = CreateTable()
        End If
        dgHeader.DataSource = Session("data")
    End Sub
  
    Private Function CreateTable() As DataTable
        Dim dtHeader As DataTable = Session("header")
        Dim dtData As New DataTable
  
        For Each dr As DataRow In dtHeader.Rows
            dtData.Columns.Add(New DataColumn(dr("COL_ID"), GetType(Integer)))
        Next
  
        'Populate w/ data
        Dim Generator As System.Random = New System.Random()
        Dim r As DataRow
        For i As Integer = 0 To 9
            r = dtData.NewRow
            For j As Integer = 0 To 6
                r(j) = Generator.Next(0, 100)
            Next
            dtData.Rows.Add(r)
        Next
        Return dtData
    End Function
  
    Protected Sub dgHeader_SortCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridSortCommandEventArgs) Handles dgHeader.SortCommand
        Dim s As String = ""
    End Sub
End Class

Thanks.
Rob
Top achievements
Rank 1
 answered on 01 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?