Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
81 views

I have 2 combobox with checkbox generated on server side. The id of combo is depending on some event that I don’t know on client side. I have click event of the checkbox on client side. I have spent some times with the html generated by Telerik with those control, and I don’t see any way to associate the check box with the combobox. Is there any way server side (adding some properties while binding checkbox for example to indicate the combo ID), or on client side with jQuery. I tried the $('div.RadComboBox_Default’) but I get both combo. Any help would be greatly appreciated.

 

Emmanuel
Top achievements
Rank 1
 answered on 08 Dec 2010
4 answers
169 views
Hi,

I want to use a grid with some command item template and one of these functionalities is Export to excel, but manually triggered.

The problem is that when I use an ajaxfied grid the export doesn't work, but if don't it woks fine.

Here is the aspx code:

<telerik:RadGrid runat="server" ID="rg_leads" AutoGenerateColumns="false" DataSourceID="ods_leads" AllowMultiRowSelection="true"  
            AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true" OnItemCommand="rg_leads_ItemCommand"
            <HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu> 
            <ClientSettings> 
                <Selecting AllowRowSelect="true" /> 
            </ClientSettings> 
            <ExportSettings IgnorePaging="true" OpenInNewWindow="false" ExportOnlyData="true" FileName="exporteddata.xls">  
            </ExportSettings> 
            <MasterTableView IsFilterItemExpanded="false" CommandItemDisplay="Top"
                <CommandItemTemplate> 
                    <telerik:RadToolBar runat="server" ID="rtb_toolBar"  
                        OnButtonClick="rtb_toolBar_ButtonClick"
                        <Items> 
                            <telerik:RadToolBarButton Text="Apply filter" CommandName="FilterRadGrid" ImageUrl="img/filter.png" ImagePosition="AboveText"  /> 
                            <telerik:RadToolBarButton IsSeparator="true"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton ImageUrl="img/delete32.png" ImagePosition="AboveText" Text="Delete" CommandName="MassiveDelete"></telerik:RadToolBarButton> 
                            <telerik:RadToolBarDropDown ImagePosition="AboveText" ImageUrl="img/addToList32.png" Text="Add To List" OnDataBinding="DropDownDataBinding"
                                <Buttons> 
                                   <telerik:RadToolBarButton runat="server" CommandName="NewList2" > 
                                       <ItemTemplate> 
                                           <telerik:RadTextBox ID="rtb_newList" runat="server" Text="New List" onclick="this.value = ''" CssClass="textboxNewList"
                                           </telerik:RadTextBox> 
                                           <asp:ImageButton ID="ib_newList" runat="server" ImageUrl="img/add32.png" CommandName="NewList" CssClass="imageNewList" /> 
                                       </ItemTemplate> 
                                   </telerik:RadToolBarButton> 
                               </Buttons> 
                            </telerik:RadToolBarDropDown> 
                            <telerik:RadToolBarButton ImageUrl="img/export.png" Text="Export" CommandName="Export" ImagePosition="AboveText"></telerik:RadToolBarButton> 
                        </Items> 
                    </telerik:RadToolBar> 
                </CommandItemTemplate> 
                <Columns>...</Columns> 
           </MasterTableView> 
</telerik:RadGrid> 
 

And I've a Panel with all the content of the page called Panel1, so the ajax manager code looks like this.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="Panel1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

How can I do to take arround the ajax call when I use the export button, but not when I use other tools like remove?

Thanks
Daniel
Telerik team
 answered on 08 Dec 2010
5 answers
135 views
Hello,

We are currently trialing RadScheduler for a project which involves printing out several room booking sheets for various locations throughout an educational institution.  Rooms are grouped into Campuses. We need to be able to print out all the booking for the rooms in a certain campus for a specified week in a grid format. These printouts are then posted outside the room.

We have managed to use RadScheduler to successfully print out the room bookings for a single room in a campus for a specified week. However we can't seem to get it to printout multiple rooms at the same time. We figured that if we could create an instance of RadScheduler during runtime, we could create a datasource and bind the instance of radscheduler to it. We could loop through a counter to create as many instances of RadScheduler as required to print out room bookings for all the rooms in the campus.

Is there a way to achieve this?


Regards


Ciph
Peter
Telerik team
 answered on 08 Dec 2010
0 answers
77 views
Hi

I am using RadComboBox as below


<telerik:RadComboBox ID="RadComboBox1" runat="server" Width="250px" ShowToggleImage="True"
                                            Style="vertical-align: middle;" OnClientDropDownOpened="OnClientDropDownOpenedHandler"
                                            EmptyMessage="Choose a destination" ExpandAnimation-Type="None" CollapseAnimation-Type="None">
                                            <ItemTemplate>
                                                <div id="div1">
                                                    <telerik:RadTreeView runat="server" ID="RadTreeView1" OnClientNodeClicking="nodeClicking"
                                                        Width="100%" Height="140px">
                                                        <Nodes>
                                                        </Nodes>
                                                    </telerik:RadTreeView>
                                                </div>
                                            </ItemTemplate>
                                            <Items>
                                                <telerik:RadComboBoxItem Text="" />
                                            </Items>
                                        </telerik:RadComboBox>

I am saving Full Path in DB like

string Path = "" ;
       foreach (RadComboBoxItem myItem in RadComboBoxIn.Items)
       {
           RadTreeView myTree = (RadTreeView)myItem.FindControl("RadTreeView1");
           Path = myTree.SelectedNode.FullPath;
       }

So now onload i want to set Combo and tree to that FullPath which i saved in DB.

thanks
Muhammad Imran
Top achievements
Rank 1
 asked on 08 Dec 2010
6 answers
569 views
I haven't tried to reproduce this in a simpler ASPX page but in my solution if I use an asp:Button button then when the postback occurs the RadEditor1.Text value is correct and shows the changes that was made.

However, if I use an asp:LinkButton when it's clicked the post back does NOT show the chnages that was just made but rather shows the original content that was put into the rad editor.

Any thoughts?

Is there something about a LinkButton that causes the editor trouble?  This is on .NET 4.0 using the 40 library from 2010 Q2.

Thanks,
Kevin
Kevin Warnke
Top achievements
Rank 1
 answered on 08 Dec 2010
3 answers
383 views
Hi,
Put this into the context of a construction company, I need to get a system running where there is a hierarchy list of current jobs which can be expanded to show a list of machines booked to that job, which can be further expanded to show a list of operators for that machine currently working on that job. This will also have two further tables containing machines and operators which can be dragged onto jobs and machined respectively, this will then update records in a MS SQL database.
I just need to know if this is possible and if so, some guidence on how to make this posssible, as this is the first time I have used Telerik.

Many Thanks in advance,
Dan
Veli
Telerik team
 answered on 08 Dec 2010
2 answers
88 views
Hi there. I think this is not telerik-specific but perhaps you might be able to help nontheless:

I have a radWindow with multiple Elements. One of them is a button, another is a "simple" radgrid
One of them is a Button that opens a new window. In that window an element can be changed in the database which is the datasource of the radgrid.

After closing that window I initiate a postback through the "OnClientClose"-Method.

Before opening that window the datasource of the radgrid had 5 Elements. After closing that window the datasource has 6 Elements (as wanted). I can see in the OnNeedsDataSource-Event that the datasource REALLY has that 6 elements. But in the frontend the new element is not shown.

I can close and reopen the window or reload it with response.redirect(response.url.toString()) but that of course kills all form entries made.

Any clue what causes that behaviour?

Ole
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DetailInfos.aspx.cs" Inherits="waPMHI.dlg.DetailInfos" %>
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <telerik:RadCodeBlock ID="RadCodeBlockInfo" runat="server">
  
        <script type="text/javascript" language="javascript">
  
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow;
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                return oWindow;
            }
  
            function CloseWindow() {
                var oWindow = GetRadWindow();
                oWindow.close();
            }
  
            function AddAttachment() {
                var oBrowserWnd = GetRadWindow().BrowserWindow;
                setTimeout(function() {
                    var oWnd = oBrowserWnd.radopen("../dlg/GeneralUploader.aspx", "Upload");
                    oWnd.SetUrl(oWnd.GetUrl());
                    oWnd.add_close(OnClientClose);
                }, 300);
            }
  
            function OnClientClose(oWnd) {
                // Nach dem Schliessen eines Fensters: AjaxRequest
                oWnd.remove_close(OnClientClose);
  
                $find("<%= infoManager.ClientID %>").ajaxRequest("AddAttachmentClose");
            }
  
          <!-- [...] more JS -->
                          
        </script>
  
    </telerik:RadCodeBlock>
</head>
<body class="dlgInfos" onkeypress="Escape(event);">
    <form id="form1" runat="server">
    <telerik:RadWindow ID="DetailInfo" runat="server" SkinID="SingletonSkin" />
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <telerik:RadFormDecorator ID="RadFormDecorator" runat="server" DecoratedControls="Buttons" />
    <telerik:RadAjaxManager ID="infoManager" runat="server" OnAjaxRequest="InfoManager_AjaxRequest" />
    <table width="100%" cellpadding="0px" cellspacing="0px">
        <tr>
            <td>
                <asp:UpdatePanel ID="FormPanel" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
<!-- More Elements [...] -->
                         
                                        <asp:Button ID="btnAddAttachment" Enabled="false" runat="server" Text="<%$Resources:TextResources, ID_MAIL_ADDATTACHMENT%>"
                                            OnClick="btnAddAttachment_Click" />
                                    
<!-- More elements [...] -->
                    </ContentTemplate>
                </asp:UpdatePanel>
                <br />
                  
                                    <telerik:RadGrid runat="server"  Width="100%" ID="attGrid" ShowHeader="false" AutoGenerateColumns="true" OnNeedDataSource="infoGrid_NeedDataSource">    
                                    </telerik:RadGrid>
                                    
             
    </form>
</body>
</html>

P.S:
Perhaps it might help to know that the NeedsDataSource-Event does not fire automaticly after closing the popup. I have to rebind manually for it to fire.
Ole Albers
Top achievements
Rank 2
 answered on 08 Dec 2010
1 answer
85 views
Hi,

I'm trying to export the content of the radeditor to PDF. I can load the radeditor without a problem ie RadEditor.Content = MyText()
I used the below on a button click event:

PrintEditor.ExportToPdf();

When I do I can the attached error. The thing is, when I copy the html code from the editor and hard code it in to the <Content></Content> tags it works fine.

Any clues?

Thanks in advance.

Dobromir
Telerik team
 answered on 08 Dec 2010
1 answer
48 views
Hi,

Could you please tell me how to call a web UserControl in FilterTemplate section of RadGrid.
My requirement is that in a webuser control for DateTime column in filter section I have to create a filter which sould have following controls and options-

1- From and To date in filter template(when user enter these two  dates and press enter show the records between these two dates)
2- The same column should have a filter Icon in filtertemplae section with GreateThan, Lessthan,Equals,NotEquals filters option, on seletion of any of these options I have to filter based on From Date value(means if i enter a date in From date field the then select Gretaerthan option from filter than it should return the records which are greater tha the values provided in from date field.) 

Please suggest me regarding that how to achive similar kind of setup for filter using telerik controls .

Regards,
Mamta
Iana Tsolova
Telerik team
 answered on 08 Dec 2010
2 answers
406 views
Hi,

I have Radwindow Manager in page, Radwindow1 is opened  if a condition is met on server side . User closes this window by clicking  "Save"  /  "Cancel"  Button .  If  "Save" button is clicked, information is processed on the server and Radwindow1 is closed.

Logic is:
If(condition1)
{
    Create a new Radwindow and add it to Radwindow Manager
    Open RadWindow1
}


SaveButton_Click( ....)
{
   .......................
   close RadWindow.....
}

Any idea?

Thanks
Prava
Prava kafle
Top achievements
Rank 1
 answered on 08 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?