Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
81 views
Hi! How could I make a custom dialog with the same kind of window that opens when I open editors Hyper link manager. I would like to get top header and bottom footer with ok and cancel buttons. Now I get only a plain window with only my own stuff. Is there an easy way? I tried to register and use these components, but with no luck.

<%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
<%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
<%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>

Rumen
Telerik team
 answered on 09 Nov 2011
1 answer
141 views
I have a splitbutton in a toolbar.

I have a number of options, but I want the fist one to be the default, always; even if they user clicks on the dropdown and selets a different child button.

That is, if I have
<telerik:RadToolBarSplitButton CommandName="Action" EnableDefaultButton="true" DefaultButtonIndex="0" >
    <Buttons>
        <telerik:RadToolBarButton runat="server"
                                CommandArgument="Local"
                                Text="Local">
        </telerik:RadToolBarButton>
        <telerik:RadToolBarButton runat="server"
                                CommandArgument="Window"
                                Text="Local">
        </telerik:RadToolBarButton>
    </Buttons>
</telerik:RadToolBarSplitButton>

When the user clicks on the button proper, I want Add(Local) to execute. If they click on the dropdown and select Add(Window), I want Add(Window) to execute but I want Add(Local) to remain the default button.

I'm getting it all to work, except for the last bit.

I've tried calling set_defaultButtonIndex(0) in both the ClientClicking and ClientClicked events but to no avail.

Appreciate any hints.

--
Stuart

Kate
Telerik team
 answered on 09 Nov 2011
1 answer
78 views
Team Telerik,

Hi - using ASP.NET AJAX Q2 2009 on a legacy app.

When users update the databound grid, I have the grid ITEMCOMMAND  call the AJAXManager with a specific tag, which in turn fires off another routine which updates a summary grid of labels and calculations, external to the grid.

I can trace the calls fine, from the grid to the manager to the update sub. HOWEVER, the UI never gets updated.

I have the AJAXManager in the ASPX configured to identify
- the grid updating itself
- the grid updating the AjaxManager
- the grid updating the labels
- the AJAXmanager updating the labels

nothing seems to work. I put a manual refresh image on the screen which DOES update everything properly via ajax, when configured in the manager as such.

I see that prior version of the grid really had a problem with this, and I have tried monkeying with the EnableAJAX="false"   EnableOutsideScripts="true", but that seems to be just flailing at the problems

Any tips or pointers from the hivemind?
Maria Ilieva
Telerik team
 answered on 09 Nov 2011
1 answer
93 views
I have a treelist that starts fully expanded because I call ExpandAllItems().

I want to disable collapsing the nodes.

How can I do it?

Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 09 Nov 2011
2 answers
100 views
Hi

I have made some changes according to this article http://www.telerik.com/community/forums/aspnet-ajax/scheduler/asp-updatepanel-and-radscheduler-issues.aspx, but got another javascript error when I try to add a appointment, here is the details

Message: 'Telerik.Web.RadDatePickerPopupDirection.BottomRight' is null or not an object
Line: 10
Char: 1
Code: 0
URI: http://winsps:81/ScriptResource.axd?d=bObZWqwCQ27Ew08lmqPNpb0hb8fJTnibHARVcv144jcy-xsybBbpW2-eVsV7j6KK0uXqcrwPXYjDG7a0xE21XjhSGd74A1Rz1mUaexrDlmyegEDFO2BCvt6XFVMhD-xk0&t=ffffffffb564747d

Following is my aspx code

<script type="text/javascript">
           
              function OnClientAppointmentMoving(sender, eventArgs) {
                  eventArgs.set_cancel(true);
              }
        </script>
   <style>
.rsAptDelete
{
//display: none;
}
 
.rsModalDialog
    {
          top:300px!important;
    }
.rsAptResize
{
display:none;
}
 
</style>
 
<asp:UpdatePanel runat="server" ID="UpdatePanel1">
    <ContentTemplate>
      <telerik:RadScheduler runat="server" ID="RadScheduler1" 
                FirstDayOfWeek="Monday"
                RowHeaderWidth="52px"
                DayStartTime="06:00:00"
                DayEndTime="22:30:00" 
                DataKeyField="ID"
                DataSubjectField="Subject"
                DataStartField="Start"
                DataEndField="End"
                DataRecurrenceField="RecurrenceRule"
                DataRecurrenceParentKeyField="ID"
                OnAppointmentCreated="RadScheduler1_AppointmentCreated"
                SelectedView="TimelineView"
                GroupBy="Rooms"
                GroupingDirection="Vertical"
                OverflowBehavior="Expand"
                StartInsertingInAdvancedForm="true"
                StartEditingInAdvancedForm="true"
                TimelineView-NumberOfSlots="7"
                TimelineView-ColumnHeaderDateFormat ="dd/MMM <br />(ddd)"
                TimelineView-HeaderDateFormat="dd/MM/yyyy"
                RowHeight="80px"
                LastDayOfWeek="Friday"
                onnavigationcomplete="RadScheduler1_NavigationComplete"
                OnClientAppointmentMoving="OnClientAppointmentMoving"
                OnAppointmentInsert="RadScheduler1_AppointmentInsert"
                OnAppointmentDelete="RadScheduler1_AppointmentDelete"
                OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
            onformcreated="RadScheduler1_FormCreated">
                     
                <AdvancedForm Modal="true"  />
                <TimelineView UserSelectable="false" StartTime="06:00" />
                                 
                <WeekView UserSelectable="false" />
                <MonthView UserSelectable="false" />
                <DayView UserSelectable="false" />
                <TimeSlotContextMenuSettings EnableDefault="true" />
                <AppointmentContextMenuSettings EnableDefault="false" />
                
                <AppointmentTemplate>
                              <b>  <asp:Label runat="server" ID="AssignedTo"  /></b>   <%# Eval("Subject") %>
                </AppointmentTemplate>
                 
            </telerik:RadScheduler>
        </ContentTemplate>
</asp:UpdatePanel>


Please advice. Thanks
CH
Top achievements
Rank 1
 answered on 09 Nov 2011
0 answers
65 views
Hi.

I have a tabstrip inside a update panel and when it does the postback inside the panel, the tabstrip frozes and I can't select other tabs in the tabstrip.
my page is something like this

<asp:UpdatePanel ID="UpdLocType" runat="server" UpdateMode="Conditional">
 <Triggers>
  <asp:AsyncPostBackTrigger ControlID="gvLocType" EventName="SelectedIndexChanged" />
 </Triggers>
 <ContentTemplate>
  <asp:GridView id="gvLocType" .....
  </asp:GridView>
 </ContentTemplate>
</asp:UpdatePanel> 
<asp:UpdatePanel ID="UpdGroup" runat="server" UpdateMode="Conditional">
 <Triggers>
  <asp:AsyncPostBackTrigger ControlID="gvLocType" EventName="SelectedIndexChanged" />
  <asp:AsyncPostBackTrigger ControlID="gvGroup" EventName="SelectedIndexChanged" />
 </Triggers>
 <ContentTemplate>
  <asp:GridView ID="gvGroup" ......
  </asp:GridView>
 </ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdItems" runat="server" UpdateMode="Conditional" >
 <Triggers>
  <asp:AsyncPostBackTrigger ControlID="gvLocType" EventName="SelectedIndexChanged" />
  <asp:AsyncPostBackTrigger ControlID="gvGroup" EventName="SelectedIndexChanged" />
 </Triggers>
 <ContentTemplate>
  <radTS:RadTabStrip runat="server" ID="familyTabs" Align="left" Skin="Office2007"
                                Width="100%" MultiPageID="itemsMultipage" ReorderTabRows="false" >
  </radTS:RadTabStrip>
  <radTS:RadMultiPage ID="itemsMultipage" runat="server" Height="500" >
  </radTS:RadMultiPage>                             
 </ContentTemplate>
</asp:UpdatePanel>

in the first 2 panels i have a gridview and when selectedindex is fired then updates the panel with the tabstrip. that tabstrip is populated with a datasource and the pageviews are build dinamically  with a sub that ads a gridview to the

pageview. the first time on load it goes well but after that it won't let change the selected tab. can anyone help??

Private Sub setPageViews(ByVal type As Integer, ByVal group As String, ByVal family As String)

 Dim view As New PageView

 For Each Tab As Tab In familyTabs.Tabs 

         gv = New GridView
             ....
  

             gv.DataSource = someDataSouce
             gv.DataBind()
  
            view.ID = Tab.Text
             ab.PageViewID = view.ID
             view.Controls.Add(gv)
             itemsMultipage.PageViews.Add(view)

          

        Next

    End Sub


Nuno
Top achievements
Rank 1
 asked on 09 Nov 2011
1 answer
505 views
I have a RadListView and within the listview I have an asp.net linkbutton. I want to dynamically set the linkbutton's PostBackUrl. I can achieve this if I find the linkbutton control in the listview's ItemDataBound event. But by doing this when I end up clicking on the linkbutton the listview ItemCommand event is not being fired. I need the itemCommand even to be fired so I can take the datakeyvalue of the item clicked and set it into a session variable to pass to teh postbackurl page of the link button.

<telerik:RadListView ID="lstVwWebpageList" runat="server" EnableViewState="true" ItemPlaceholderID="webpageContainer" AllowPaging="true" DataKeyNames="id" Skin="WebBlue" OnItemDataBound="lstVwWebpageList_ItemDataBound" OnPageIndexChanged="lstVwWebpageList_PageChange" Width="607px" OnItemCommand="lstVwWebpageList_ItemCommand">
    <LayoutTemplate>
        <table cellpadding="0" cellspacing="0">
            <tr>
            <td>
                <asp:PlaceHolder ID="webpageContainer" runat="server" />
            </td>
            </tr>
            <tr>
            <td>
            <telerik:RadDataPager ID="Pager" runat="server" PagedControlID="lstVwWebpageList" PageSize="50" Skin="WebBlue">
                <Fields>
                    <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                    <telerik:RadDataPagerButtonField FieldType="Numeric" />
                    <telerik:RadDataPagerButtonField FieldType="NextLast" />
                </Fields>
            </telerik:RadDataPager>
            </td>
            </tr>
        </table>
    </LayoutTemplate>
     
    <ItemTemplate>
        <fieldset style="float: left; width: 300px;">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td style="width: 25%;">
                                    <b>Name:</b>
                                </td>
                                <td style="width: 75%;">
                                    <asp:Label ID="lblName" runat="server" Text='<%# Eval("name") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 25%;">
                                    <b>Page:</b>
                                </td>
                                <td style="width: 75%;">
                                    <asp:LinkButton ID="pagenameLink" runat="server" CommandName="LinkClicked" Text='<%# Eval("pagename") %>'></asp:LinkButton>                                   
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </fieldset>
    </ItemTemplate>
</telerik:RadListView>


protected void lstVwWebpageList_ItemDataBound(object sender, RadListViewItemEventArgs e)
   {
       LinkButton link = (LinkButton)e.Item.FindControl("pagenameLink");
       Label lblname = (Label)e.Item.FindControl("lblName");
 
       link.PostBackUrl = "EditWebpage.aspx?name=" + lblname.Text + "&page=" + link.Text;
 
       //RadListViewDataItem item = (RadListViewDataItem)e.Item;
       //Session["linkID"] = item.DataItem;// Convert.ToInt32(item.OwnerListView.DataKeyValues[item.DisplayIndex]["id"]);
   }
 
   protected void lstVwWebpageList_ItemCommand(object sender, RadListViewCommandEventArgs e)
   {
       if (e.CommandName == "LinkClicked")
       {
           RadListViewDataItem item = (RadListViewDataItem)e.ListViewItem;
           Session["linkID"] = item.DataItem;// Convert.ToInt32(item.OwnerListView.DataKeyValues[item.DisplayIndex]["id"]);
       }
   }
Tsvetoslav
Telerik team
 answered on 09 Nov 2011
1 answer
121 views
Hi, 
I'm trying to make a table non editable in the radeditor in ie8+, below is a sample of the content of the editor.
When I have a doctype in the content it is possible to edit everything, with out the doctyps it behaves as expected.
It would be great if you could help me figure out how to get the  there a way to get contentEditable="false" functioning and include the doctype.

thanks

<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <style>
    .unselect{
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -o-user-select: none;
        user-select: none;
        }
    </style>
    </head>
    <body class="A4" id="editorBody" style="background-image: url(/images/rightmargin.png); min-width: 170mm; padding-bottom: 5mm; min-height: 297mm; padding-left: 20mm; width: 170mm; padding-right: 20mm; background-repeat: repeat-y; background-position: 191mm 0mm; height: 100%; padding-top: 5mm;">
        <span contenteditable="false" unselectable="on" class="unselect">
        <table class="EmbeddedTable unselect" style="width: 210mm;" contenteditable="false" unselectable="on" cellpadding="3">
            <colgroup><col style="text-align: left; width: 30mm; vertical-align: top;" />
            <col style="text-align: left; width: 30mm; vertical-align: top;" />
            <col style="text-align: left; width: 30mm; vertical-align: top;" />
            <col style="text-align: left; width: 30mm; vertical-align: top;" />
            <col style="text-align: left; width: 30mm; vertical-align: top;" />
            <col style="text-align: left; width: 30mm; vertical-align: top;" />
            <col style="text-align: left; width: 30mm; vertical-align: top;" />
            </colgroup>
            <thead  class="unselect" style="font-style: normal; font-family: arial; font-size: 8pt; font-weight: bold; text-decoration: none;">
                <tr>
                    <td  class="unselect" style="text-align: center; width: 210mm; font-family: arial;" contenteditable="false" colspan="7" unselectable="on">
                    <p class="tableP unselect" style="text-align: center; font-weight: bold; text-decoration: none;" contenteditable="false" unselectable="on">not editable</p>
                    </td>
                </tr>
                <tr>
                    <td class="DesignColumnHeader unselect" style="width: 30mm;" contenteditable="false" unselectable="on">
                        <p class="tableP unselect" style="font-weight: bold; text-decoration: none;" contenteditable="false" unselectable="on">not editable</p>
                    </td>
                    <td class="DesignColumnHeader unselect" style="width: 30mm;" contenteditable="false" unselectable="on">
                        <p class="tableP unselect"  style="font-weight: bold; text-decoration: none;" contenteditable="false" unselectable="on">not editable</p>
                    </td>
                    <td class="DesignColumnHeader unselect" style="width: 30mm;" contenteditable="false" unselectable="on">
                        <p class="tableP unselect" style="font-weight: bold; text-decoration: none;" contenteditable="false" unselectable="on">not editable</p>
                    </td>
                    <td class="DesignColumnHeader unselect" style="width: 30mm;" contenteditable="false" unselectable="on">
                        <p class="tableP unselect" style="font-weight: bold; text-decoration: none;" contenteditable="false" unselectable="on">not editable</p>
                    </td>
                    <td class="DesignColumnHeader unselect" style="width: 30mm;" contenteditable="false" unselectable="on">
                        <p class="tableP unselect" style="font-weight: bold;" contenteditable="false" unselectable="on">not editable</p>
                    </td>
                    <td class="DesignColumnHeader unselect" style="width: 30mm;" contenteditable="false" unselectable="on">
                        <p class="tableP unselect" style="font-weight: bold;" contenteditable="false" unselectable="on">not editable</p>
                    </td>
                    <td class="DesignColumnHeader unselect" style="width: 30mm;" contenteditable="false" unselectable="on">
                        <p class="tableP unselect" style="font-weight: bold;" contenteditable="false" unselectable="on">not editable</p>
                    </td>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
        </span>
    </body>
</html>
Rumen
Telerik team
 answered on 09 Nov 2011
0 answers
40 views
Hello,

I have configured my site on II7 but the filters on the Rad Grid and the Calenders are not working, I am not able to get any filter option on click of filter icon. But it is working fine when I run my site on ASP.Net development server.
Please response at your earliest.
Mona
Top achievements
Rank 1
 asked on 09 Nov 2011
2 answers
117 views
Hello,

We have created a web page that uses a RadMenu as a means of navigation. We also use the RadAlert to display message to the user. However, when the RadAlert window is display (and the parent page is disabled) the RadMenu control is still accessible. 
ASPX code:
<telerik:RadWindowManager ID="WindowManager" runat="server" />
<
table >
    <tr>
        <td  valign="top">
            <telerik:RadMenu ID="RadMenu1" Runat="server" Flow="Vertical">
                <Items>
                    <telerik:RadMenuItem Text="item 1">
                        <Items>
                            <telerik:RadMenuItem Text="sub 1 1" />
                            <telerik:RadMenuItem Text="sub 1 2" />
                            <telerik:RadMenuItem Text="sub 1 3" />
                        </Items>
                    </telerik:RadMenuItem>
                 
                    <telerik:RadMenuItem Text="item 2">
                        <Items>
                            <telerik:RadMenuItem Text="sub 2 1" />
                            <telerik:RadMenuItem Text="sub 2 2" />
                            <telerik:RadMenuItem Text="sub 2 3" />
                        </Items>
                    </telerik:RadMenuItem>
                     
                    <telerik:RadMenuItem Text="item 3">
                        <Items>
                            <telerik:RadMenuItem Text="sub 3 1" />
                            <telerik:RadMenuItem Text="sub 3 2" />
                            <telerik:RadMenuItem Text="sub 3 3" />
                        </Items>
                    </telerik:RadMenuItem>
                </Items>
             
            </telerik:RadMenu>
        </td>
        <td valign="top">
            stuff<br />
            <asp:Button ID="btnAlert" runat="server" Text="Alert"
                onclick="btnAlert_Click" />
        </td>
    </tr>
</table>
C# code:
/// <summary>
/// Recursively searches for a control with the specified ID.
/// </summary>
protected Control FindControl(Control control, string id)
{
    Control foundControl = control.FindControl(id);
 
    if (foundControl == null)
    {
        for (int index = 0; index < control.Controls.Count; index++)
        {
            Control childControl = control.Controls[index];
 
            foundControl = FindControl(childControl, id);
 
            if (foundControl != null)
            {
                break;
            }
        }
    }
 
    return foundControl;
}
 
protected void btnAlert_Click(object sender, EventArgs e)
{
    RadWindowManager windowManager =
           FindControl(this, "WindowManager") as RadWindowManager;
 
    if (windowManager != null)
    {
        windowManager.RadAlert("message", 400, null, "title", null);
    }
}

I've tried setting RadMenu1.Enabled = false; before the RadAlert() is called (which works), but the RadMenu does not look correct. The z order of the RadMenu is still above everything else.

Does anybody know how to disable the RadMenu when the RadAlert window is displayed (and enable the RadMenu when the RadAlert window is closed)?

Thanks,

Matt
Matt
Top achievements
Rank 1
 answered on 09 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?