Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
343 views
Hi,

Currently i have a chart with its legends (total 5 items) displayed in 1 row at the bottom. See below code.

I'm trying to put the legend at the right side of the graph, and outside plot area. After i changed the alignedposition to be right, all the legends (total 5 items) are shown in 1 row.
e.g.,  - Series 1  - Series 2

I want to display as those demos on Telerik website, each legend takes 1 row.
E.g.,
  • Series 1
  • Series 2

ChartControl.Legend.Appearance.Location = Telerik.Charting.Styles.LabelLocation.OutsidePlotArea;
ChartControl.Legend.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Bottom;

Please advise how to achieve it. Thanks,
Evgenia
Telerik team
 answered on 14 Oct 2011
5 answers
525 views
hi again, i've a problem when export to pdf
i've my editor text and some text is on bold, but i when export to pdf, this don't showing the text on bold,

picture 1 -text from radeditor bold letter is on bold
picture 2 -same text from PDF

any idea ?
thy
Pablo
Top achievements
Rank 1
 answered on 14 Oct 2011
1 answer
192 views
Hi,

I'm using the scheduler control in TimelineView only. I set the following custom attributes on resources server side in the OnDataBound event, example:

 

 

resource.Attributes.Add("StartTime", "08:00"); 
resource.Attributes.Add("EndTime", "16:00");

 


These are the start time and end time of each individual resource's working hours, and are in my code loaded from a database. These attributes are used server side in the OnTimeSlotCreated event successfully.

In my application, I need to check if an appointment is moved outside of the resource's working hours, and then display a javascript alert warning the user from the OnClientAppointmentMoveEnd event.

From my JavaScript, if I attemp the following I am able to retrive the attributes correctly:

 

 

var startTime = scheduler.get_resources().getResource(0).get_attributes().getAttribute("StartTime");

If I attempt to retrieve the attributes from the event arguments using the following code, the attributes don't exist:
 

var startTime = eventArgs.get_targetSlot().get_resource().get_attributes().getAttribute("StartTime");

If I call the following function, I am able to get the resource correctly, it's just the attributes that are blank:

var resource = eventArgs.get_targetSlot().get_resource();

Is there any way i can retrive my resource attributes successfully from the event arguments or from the scheduler.get_resources() based on the resource key? Optionally, how can i find the index of a resource from the resource collection by the resource key so I can use the getResource(index) function?

I'm using version 2011.1.413.40.

Thanks

 

Ivana
Telerik team
 answered on 14 Oct 2011
2 answers
124 views
Hi
Any one know how to use combobox inside comboboxes..?
I used like the below

<telerik:RadComboBox ID="rcbNonStock" CausesValidation="false" AutoPostBack="true" EmptyMessage="Search Non Stock Item..."                                                                ShowMoreResultsBox="true" runat="server" LoadingMessage="Loading..." AppendDataBoundItems="true" Width="300px"  Height="350px" DropDownWidth="725px" HighlightTemplatedItems="true"                                                                 Filter="Contains" EnableLoadOnDemand="true" OnSelectedIndexChanged="rcbNonStock_SelectedIndexChanged" EnableVirtualScrolling="true" OnItemsRequested="rcbNonStock_ItemsRequested" ZIndex="3000" AllowCustomText="True" >

                                                              

                                                               <HeaderTemplate>

                                                              

 <table style="width: 700px">

 <tr>

<td style="width: 80px; text-align: left">

Item Category:</td>

<td style="width: 200px; text-align: left">

<telerik:RadComboBox ID="rcbNonStockCategory" runat="server" CausesValidation="false" AutoPostBack="true"  EnableLoadOnDemand="true" HighlightTemplatedItems="true"                           OnItemsRequested="rcbNonStockCategory_ItemsRequested"  DataTextField = "Item Category Code" DataValueField ="Item Category Code" Width="200px" Height="350px"                                                                  OnSelectedIndexChanged="rcbNonStockCategory_SelectedIndexChanged" ZIndex="4000"   ></telerik:RadComboBox> </td>                                                             

                                                                  

<td style="width: 100px;">                                                                      </td>   

<td style="width: 40px;"></td>                                                                                                                             

<td style="width: 80px; text-align: left">                                                       

Product Group: </td>

<td style="width: 200px; text-align: left">

 <telerik:RadComboBox ID="rcbNonStockProduct" runat="server" CausesValidation="false" AutoPostBack="true"  EnableLoadOnDemand="true"

DataTextField = "Product Group Code" DataValueField ="Product Group Code"   OnItemsRequested="rcbNonStockProduct_ItemsRequested"

OnSelectedIndexChanged="rcbNonStockProduct_SelectedIndexChanged" EnableScreenBoundaryDetection ="true"  Width="200px"  Height="350px" ZIndex="4000"></telerik:RadComboBox>                                                                 </td>

</tr>

</table>

 <table style="width: 700px" cellpadding="0" cellspacing="0">

<tr></tr>

<tr></tr>

<tr style="border-style: solid; border-width: 5px">

 <td style="width: 75px; text-align: left">

 No                                                                            </td>

                                                                            <td style="width: 300px; text-align: left">

                                                                                Description

                                                                            </td>

                                                                            <td style="width: 150px; text-align: left">

                                                                                Brand Name

                                                                            </td>

                                                                            <td style="width: 150px; text-align: left">

                                                                                Catalogue ID

                                                                            </td>

                                                                        </tr>

                                                                    </table>

                                                                </HeaderTemplate>

                                                                <ItemTemplate>

<table style="width: 700px" cellpadding="0" cellspacing="0">

                                                                        <tr>

                                                                            <td style="width: 75px; text-align: left">

                                                                                <%# DataBinder.Eval(Container,"Value") %>

                                                                            </td>

                                                                            <td style="width: 300px; text-align: left">

                                                                                <%# DataBinder.Eval(Container, "Attributes['Description']")%>

                                                                            </td>

                                                                            <td style="width: 150px; text-align: left">

                                                                                <%# DataBinder.Eval(Container, "Attributes['Brand Name']")%>

                                                                            </td>

                                                                            <td style="width: 150px; text-align: left">

                                                                                <%# DataBinder.Eval(Container, "Attributes['Catalogue ID']")%>

                                                                            </td>

                                                                        </tr>

                                                                    </table>

                                                                </ItemTemplate>

                                                                <FooterTemplate >

                                                                </FooterTemplate>

                                                            </telerik:RadComboBox>



But when i clicked any child combo box , the parent combo box getting closed
Any one know about how refore to keep open the parent combo box when we clicked on any child combo boxs..?

Regards
Kiran
kiran
Top achievements
Rank 1
 answered on 14 Oct 2011
2 answers
197 views

 

Hi
I have used ComboBox control called stocksCombo in Radgrid
In stocks ComboBox i have used another two ComboBoxes called ProductsCombo and ItemsCombo in Header Templete
When i clicked the ProductsCombo or ItemsCombo these dropdown lists are opening but when i clicked any of the right scroll (ProductsCombo or ItemsCombo ) the stocksCombo was closing and clicked combo was still opened.How to keep open the StocksCombo even any scrolls clicked in ProductsCombo or ItemsCombo.

Regards
Kiran

kiran
Top achievements
Rank 1
 answered on 14 Oct 2011
1 answer
83 views
Tooltip not support french character??
ées

Please refer image below
http://img849.imageshack.us/img849/4505/tooltip.jpg
Marin Bratanov
Telerik team
 answered on 14 Oct 2011
2 answers
96 views
Hi,
I am getting one script error
"Unable to get value of the property 'remove_initializeRequest': object is null or undefined" after i redirect to a page using

RadAjaxManager.Redirect. Why this script error is getting?.. I found that  'remove_initializeRequest' is a function of the Ajax js file MicrosoftAjaxWebForms.debug.js. Please reply

Maria Ilieva
Telerik team
 answered on 14 Oct 2011
3 answers
165 views
Hi,

I have a page with 3 RadGrids and an UserControl (pop up EditForm) with a RadGrid.  Here is my situation:
  • When you right click an item in one of the 3 RadGrid on the actual page a Context Menu shows - this is good
  • When you click Edit in the Context Menu, the UserControl appears in the edit pop up - this is good
  • When you right click an item in the RadGrid in the UserControl two "bad" things happen: the Context Menu for the 3 RadGrids on the page shows - this is bad; and the row in the RadGrid on the page (not the UserControl) with the same index as the row right clicked in the RadGrid in the UserControl becomes selected - this is also bad

Here is the code for one of the 3 RadGrids on the actual page (there's no conflict between the three), you'll note that I use a UserControl for the modal pop up EditForm:
<telerik:RadGrid ID="GuestTabsGrid" runat="server"
    OnNeedDataSource="GuestTabsGrid_NeedDataSource" OnInsertCommand="TabsGrid_InsertCommand" OnUpdateCommand="TabsGrid_UpdateCommand"
    AutoGenerateColumns="false" AllowFilteringByColumn="false" AllowSorting="false" AllowPaging="true">
    <PagerStyle Mode="NextPrevAndNumeric" />
    <GroupingSettings CaseSensitive="false" />
    <MasterTableView TableLayout="Fixed" CommandItemDisplay="Top"
        ClientDataKeyNames="Id,Name,IsSystem,IsPublished" DataKeyNames="Id"
        EditMode="PopUp">
        <Columns>
            <telerik:GridBoundColumn UniqueName="GuestNameCol" HeaderText="Tab Name" DataField="Name"/>
            <telerik:GridTemplateColumn UniqueName="GuestSystemCol" HeaderText="Is System Tab?" DataField="IsDefault">
                <ItemTemplate>
                    <asp:Label runat="server" Text='<%# Convert.ToBoolean(Eval("IsSystem")) == true? "Yes" : "No" %>' />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="GuestPortletsCol" HeaderText="Portlets" DataField="LearningStudioPortletsXml">
                <ItemTemplate>
                    <asp:Label runat="server" Text='' />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn UniqueName="GuestSortOrderCol" HeaderText="Sort Order" DataField="SortOrder"/>
        </Columns>
        <EditFormSettings UserControlName="..\Controls\TabDetailsControl.ascx" EditFormType="WebUserControl"
            InsertCaption="Add new tab" CaptionFormatString="Edit Tab: {0}" CaptionDataField="Name"
            PopUpSettings-Width="750px" PopUpSettings-Modal="true">
            <EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update record"
                UniqueName="EditCommandColumn1" CancelText="Cancel edit">
            </EditColumn>
            <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
        </EditFormSettings>
    </MasterTableView>
    <ClientSettings>
        <Selecting AllowRowSelect="true" />
        <ClientEvents OnPopUpShowing="PopUpShowing" />
        <ClientEvents OnRowContextMenu="TabRowContextMenu" />
    </ClientSettings>
</telerik:RadGrid>

Here is the code for the Context Menu for the 3 RadGrids on the page:
<telerik:RadContextMenu ID="TabGridMenu" runat="server" OnItemClick="TabGridMenu_ItemClick"
    EnableRoundedCorners="true" EnableShadows="true">
    <Items>
        <telerik:RadMenuItem Text="Edit" Value="Edit" />
        <telerik:RadMenuItem Text="Delete" Value="Delete" />
        <telerik:RadMenuItem Text="Set as default" Value="SetDefault" />
        <telerik:RadMenuItem Text="Publish" Value="Publish" />
        <telerik:RadMenuItem Text="Unpublish" Value="Unpublish" />
    </Items>
</telerik:RadContextMenu>


Here is the JavaScript function for the Context Menu on that page, you'll note I have a check to make sure that the "sender" is one of the 3 RadGrids that use this Context Menu:
function TabRowContextMenu(sender, eventArgs) {
    var menu = $find("<%=TabGridMenu.ClientID %>");
    var evt = eventArgs.get_domEvent();
    var clickedGridId = sender.get_id();
 
    if (evt.target.tagName == "INPUT" || evt.target.tagName == "A") {
        return;
    }
 
    if (clickedGridId != "<%=GuestTabsGrid.ClientID %>"
        || clickedGridId == "<%=SignInTabsGrid.ClientID %>"
        || clickedGridId == "<%=SignedInTabsGrid.ClientID %>")
        ) {
        return;
    }
 
    var publish = menu.findItemByValue("Publish");
    var unpublish = menu.findItemByValue("Unpublish");
    var setDefault = menu.findItemByValue("SetDefault");
 
    publish.set_visible(false);
    unpublish.set_visible(false);
    setDefault.set_visible(false);
 
    var itemIsPublished = eventArgs.getDataKeyValue("IsPublished") == "True";
    var itemIsDefault = eventArgs.getDataKeyValue("IsSystem") == "True";
    var dataItem = eventArgs.get_gridDataItem();
    var index = eventArgs.get_itemIndexHierarchical();
     
    document.getElementById("<%=radGridClickedRowIndex.ClientID %>").value = index;
    document.getElementById("<%=radGridClicked.ClientID %>").value = clickedGridId;
 
    sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true);
 
    if (itemIsPublished) {
        unpublish.set_visible(true);
    }
    else {
        publish.set_visible(true);
    }
 
    if (!itemIsDefault) {
        setDefault.set_visible(true);
    }
 
    menu.show(evt);
 
    evt.cancelBubble = true;
    evt.returnValue = false;
 
    if (evt.stopPropagation) {
        evt.stopPropagation();
        evt.preventDefault();
    }
}
 
</script>

Here is the code for the RadGrid in my UserControl, note that it doesn't have a Context Menu:
<telerik:RadGrid runat="server" ID="TabAvailablePortlets" OnNeedDataSource="grdPendingOrders_NeedDataSource"
    AllowPaging="false" Width="150px" OnRowDrop="grdPendingOrders_RowDrop" AllowMultiRowSelection="false"
    AutoGenerateColumns="false">
    <MasterTableView DataKeyNames="Id,Name,IsSystem,IsPublished,Content" TableLayout="Fixed">
        <Columns>
            <%--<telerik:GridDragDropColumn HeaderStyle-Width="18px" Visible="false" />--%>
            <telerik:GridBoundColumn UniqueName="TANameCol" HeaderText="Portlet Name" DataField="Name"/>
        </Columns>
    </MasterTableView>
    <ClientSettings AllowRowsDragDrop="True" AllowColumnsReorder="true" ReorderColumnsOnClient="true">
        <Resizing AllowColumnResize="true" />
        <Selecting AllowRowSelect="True" EnableDragToSelectRows="false"/>
        <ClientEvents OnRowDropping="onRowDropping" />
        <Scrolling AllowScroll="true" UseStaticHeaders="true"/>
    </ClientSettings>
    <PagerStyle Mode="NumericPages" PageButtonCount="4" />
</telerik:RadGrid>

Any idea why this is happenning?  I would really appreciate any help in resolving this.

Thanks!
Mira
Telerik team
 answered on 14 Oct 2011
1 answer
96 views
Hello Telerik Team

I have a rotator which shows photos, and below each photo I have like buttons for facebook, gplus and twitter. When the first photo shows up, the links are there and seem to be ok, but when I click(or mouseover) the rotators buttons, the links just disappear. Can you spot the error or give me an idea please? Thx a lot! The code I use is this:
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1"
            EnableAJAX="false">
            <telerik:RadRotator runat="server" ID="RadRotator1" Skin="Black" RotatorType="Buttons"
                DataSourceID="ObjectDataSource2" Width="850px" Height="520px" ScrollDirection="Right,Left "
                SlideShowAnimation-Type="Fade" EnableAjaxSkinRendering="true" WrapFrames="true"
                OnClientItemShown="ItemShown_handler" OnItemClick="RadRotator1_ItemClick" OnItemDataBound="RadRotator1_ItemDataBound">
                <ItemTemplate>
                    <div>
                        <%#SetInitialIndex(Container) %>
                        <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" ResizeMode="Fit" DataValue='<%#Eval("Data") %>'
                             Style="padding-left: 5px;
                            padding-right: 5px;" />
                        <asp:Label runat="server" ID="lblTinyURL" Visible="true" ToolTip='<%#Eval("TinyURL") %>'
                            ForeColor="Black" Font-Size="XX-Small"></asp:Label>
                    </div>
                </ItemTemplate>
            </telerik:RadRotator>
        </telerik:RadAjaxPanel>
         
        <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" LoadingPanelID="LoadingPanel1"
            EnableAJAX="false">
        <div>
        <script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
        <table>
            <tr>
                <td>
                    <div id="fbDiv">
                         
                    </div>
                </td>
                <td>
                    <div id="gp1Div">
                     
                    </div>
                </td>
                <td>
                    <div id="twitterDiv">
                     
                    </div>
                </td>
            </tr>
        </table>
        </div>
        </telerik:RadAjaxPanel>
        
        <telerik:RadCodeBlock runat="server" ID="RadCodeBlock1">
            <script type="text/javascript">
                function ItemShown_handler(sender, args) {
                    var ItemIndex = sender.get_currentItem().get_index();
 
                    // Get the wraper element ;
                    var wrapper = getWrapperElement(args.get_item());
 
                    // Find an asp control
                    var aspLabelLink_InsideTemplate = findAspControl("lblLink", wrapper);
                    var aspLabelTinyUrl_InsideTemplate = findAspControl("lblTinyURL", wrapper);
 
                    var fb = aspLabelTinyUrl_InsideTemplate.outerHTML;
                    var gp1 = aspLabelTinyUrl_InsideTemplate.outerHTML;
                    var twitter = aspLabelTinyUrl_InsideTemplate.outerHTML;
 
                    if (fb.length > 0 && fb.indexOf("title=") > -1)
                        fb = fb.substring(fb.indexOf("title=") + 6, fb.indexOf("></SPAN>"));
                    if (gp1.length > 0 && gp1.indexOf("title=") > -1)
                        gp1 = gp1.substring(gp1.indexOf("title=") + 6, gp1.indexOf("></SPAN>"));
                    if (twitter.length > 0 && twitter.indexOf("title=") > -1)
                        twitter = twitter.substring(twitter.indexOf("title=") + 6, twitter.indexOf("></SPAN>"));
 
                    //var fbDiv = findHtmlElement("fbDiv", wrapper);
                    fbDiv.innerHTML = "<div class=\"fb-like\" data-href=\"" + fb + "\" data-send=\"true\" data-width=\"450\" data-show-faces=\"true\" data-colorscheme=\"dark\"></div>";
 
                    //var gp1Div = findHtmlElement("gp1Div", wrapper);
                    gp1Div.innerHTML = "<div class=\"g-plusone\" data-href=\"" + gp1 + "\"></div><span itemprop=\"description\"></span>";
 
                    //var twitterDiv = findHtmlElement("twitterDiv", wrapper);
                    var firstPartUrl = "<a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-url=\"" + twitter;
                    var restOfUrl1 = "\" data-text=\"Nice!!!\" data-count=\"horizontal\">Tweet</a>";
 
                    twitterDiv.innerHTML = firstPartUrl + restOfUrl1;
 
                    //$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(ItemIndex);
                }
 
                function findHtmlElement(id, wrapperElement) {
                    // Get the image ;
                    var image = $get(id, wrapperElement);
                    return image;
                }
 
                function findAspControl(id, wrapperElement) {
                    // Get the control ;
                    var control = $get(wrapperElement.id + "_" + id, wrapperElement);
                    return control;
                }
 
                function getWrapperElement(rotatorItem) {
                    var itemElem = rotatorItem.get_element();
                    var wrapper = itemElem.firstChild;
                    return wrapper;
                }
 
            </script>
             
        </telerik:RadCodeBlock>
Alin
Top achievements
Rank 1
 answered on 14 Oct 2011
5 answers
361 views
Hi Telerik,

I am just brainstorming some ideas on ways to make my dashboard more visually appealing. On my dashboard I have multiple tabs associated with multiple page views. In addition, I have a timer which runs and, on tick, increments the tab's selected index.

This all works fine and dandy -- the tabs cycle between page views and the data displayed changes. That being said, it's almost 'too' snappy. Think like UpdatePanels updating without any flash and wondering 'woah, what just happened.'

As such, I was hoping to be able to fade in/fade out page views. Obviously this isn't inherently supported in the Telerik control suite (maybe it could be in the future? :) Would be very sexy), but I was wondering if you guys had any ideas on how to make this happen? I'm fine with it being a 'modern browser only' type of thing -- using CSS3/HTML5 opacity elements... but I wasn't really sure where to start.

What do you guys think? Maybe I should change the selected indices of the TabStrip and MultiPage, but then instead of telling an UpdatePanel to refresh the content of the MultiPage I could, instead, set a client-side opacity-fader to bring the new page view up?

Sean
Genady Sergeev
Telerik team
 answered on 14 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?