Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
47 views
I have several RadTimePicker's on my page, all sharing a RadTimeView. The popup buttom image displays fine until I add the attribute Skin="WebBlue" to the RadTimeView, then the button image disappears!

v2012.3.1308.40
Jeanne
Top achievements
Rank 1
 answered on 03 Jul 2013
2 answers
227 views
I have a radgrid. It has edit enabled only for first row.
When the edit is clicked it opens a new radwindow to collect additional information.
Also the radgrid allows row drag and drop.
On rowdrop it checks if the new position is going to be first row it opens the new window to collect similar data for the new first row.
Now when the row is edited and then if the row is dragged and droped two windows open.
If we drag one more time three windows open.
Tried a few things like 
_menuwindow.DestroyOnClose = true;
WinManager.Windows.Clear();
But doesn't help.

Please help. How can I avoid opening unneccessary windows?
If I debug the code it doesn't really go to server to open the serverside window again.
I identify the two windows by giving different names server side and client side.

Any help is appreciated.
Thanks in advance.

Here is the code :

 protected void UIProceduresGrid_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        GridDataItem gdItem = e.Item as GridDataItem;

        if (gdItem != null)
        {
            if (e.CommandName == "PDFEdit")
            {
                WinManager.Windows.Clear();
                
                RadWindow _menuwindow = new RadWindow();
                _menuwindow.NavigateUrl = "ProcedureDependantFactors.aspx";
                _menuwindow.VisibleOnPageLoad = true;
                _menuwindow.ShowContentDuringLoad = true;
                _menuwindow.Style.Value = "z-index:7010;";
                _menuwindow.ID = "ProcedureDependantFactors";                
                _menuwindow.Modal = true;
                _menuwindow.Height = 400;
                _menuwindow.Width = 900;
                _menuwindow.Title = "Procedure Dependant Factors Serverside";
                _menuwindow.DestroyOnClose = true;
               // _menuwindow.OnClientClose = "RefreshParentPage();";
                WinManager.Windows.Add(_menuwindow);
            }
        }
    }

function OnProcRowDropping(src, args) {
    //alert("Dragged grid row index is: " + args._dragedItems[0]._itemIndexHierarchical + "   Dropped target element index is: " + args._targetItemIndexHierarchical + "   Position : " + args._dropPosition);
    if (args._targetItemIndexHierarchical == 0 && args._dropPosition == 'above') {
        if (!confirm('There is another record marked as primary that record will no longer be primary. And the dependant records will be deleted. Are you sure you want to proceed?')) {
            args.set_cancel(true);
        }
        else {
            ShowPDF();
        }
    }
}

function ShowPDF() {
    var oManager = window.radopen("ProcedureDependantFactors.aspx");
    oManager.DestroyOnClose = true;
    oManager.Title = "Procedure Dependant Factors Clientside";
    oManager.set_animation(Telerik.Web.UI.WindowAnimation.Fade);
    oManager.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);
    oManager.set_visibleStatusbar(false);
    oManager.set_visibleTitlebar(true);
    oManager.set_modal(true);
    oManager.set_height("500px");
    oManager.set_width("900px");
    oManager.center();
    oManager.SetActive();
    oManager.show();
}
























































Gauri
Top achievements
Rank 1
 answered on 03 Jul 2013
1 answer
231 views
I have a web user control(NavigationControl.ascx) where I build a PanelBar and it contains another web user control.
<telerik:RadPanelBar runat="server" ID="SearchOptionsPanel" Width="172px" Skin="CMASkin" EnableEmbeddedSkins="false"
    OnClientItemClicked="PanelBarItemClicked">
    <Items>
        <telerik:RadPanelItem Text="Search Options" Expanded="true" Value="MeasureOptions">
            <Items>
                <telerik:RadPanelItem Text="">
                    <ItemTemplate>
                        <uc1:DischargeListCriteriaControl ID="DischargeListCriteriaCtrl" runat="server" />
                    </ItemTemplate>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelItem>
    </Items>
</telerik:RadPanelBar>

How do I access the "DischargeListCriteriaControl" from the codebehind of the NavigationControl.ascx.cs.  The below doesn't work.
public DischargeListCriteriaControl DischargeListCriteriaControl
{
    get
    {
        return this.DischargeListCriteriaCtrl;
    }
}
Robert
Top achievements
Rank 1
 answered on 03 Jul 2013
0 answers
74 views
Hi,
I am using radpanel bar. My reqiurement is to add dyanamically a  Radgrid, and add a radgrid inside the dynamically created radpanel item.


Dhamodharan
Top achievements
Rank 1
 asked on 03 Jul 2013
1 answer
144 views
Hello,
I am trying to resize a splitter and its panes to the size of the content within the panes, and it is only partially working. I'm using 2013.1.417.40 of the Telerik.Web.UI controls.

The application scenario is a reports page, where the user can select a report from a list, tweak some report settings, and then view the report.  To this end, I have a RadComboBox/RadTreeView that allows the user to select which report to view.  Below this, I have a RadSplitter with a top pane, a splitbar, and a bottom pane.  The top pane contains a set of controls that are specific to each report.  The bottom pane is the report viewing area.  Because each report might have a different method of displaying the data, the bottom pane contains a user control that contains multiple user controls, one for each report or group of similar reports.  Within each of these lower level user controls could be a RadGrid or a charting control.

My requirements are such that there should be no scrolling within the report's grid or the  splitter panes.  All scrolling must be performed using the browser scrollbars.  Therefore, I would like to resize the splitter and the panes according to the size of the content within each pane.  For the top pane, I only have two sets of possible report controls, so I know the two possible sizes that the pane could be, and I just pass those sizes.  No problem there.  For the bottom pane, I implemented the technique described in the KB article here.  For my purpose, however, I did not want to perform the sizing in OnClientLoad, because the content is always empty until the user selects a report.  Instead, I start out with a pane height of 100px at page load.  I then size both panes when the user selects a report, and also when the data is populated in the grid or chart.

Here is some of the code.  The actual .aspx is quite large, so I've removed code that I don't think is relevant to the issue.

javascript function;

function resizeSplitter(paneControlsHeight) {
    var splitter = $find("<%= splitterMain.ClientID %>");
    if (splitter) {
        var paneControls = splitter.getPaneByIndex(0);
        var paneReportView = splitter.getPaneByIndex(1);
        if (paneControls && paneReportView) {
            paneControls.set_height(paneControlsHeight);
            paneControls.set_maxHeight(paneControlsHeight);
 
            var height = paneReportView.getContentElement().scrollHeight;
            paneReportView.set_height(height);
            var splitBar = splitter.getSplitBarByIndex(0);
            splitter.set_height(paneControlsHeight + splitBar.getHeight() + height);
        }
    }
}

ASPX markup:

<telerik:RadSplitter ID="splitterMain" runat="server" Orientation="Horizontal" Width="973">
<telerik:RadPane runat="server" id="paneControls" Width="100%" Height="250" MaxHeight="250" Scrolling="None" >
    <!-- All sorts of controls go here that allow the user to change the scope and display of their report data.
         Includes RadDatePickers, RadComboBoxes, RadTreeViews, asp:DropDownLists, etc. -->
</telerik:RadPane>
<telerik:RadSplitBar runat="server" id="splitBarMain1" CollapseMode="Forward" />
<telerik:RadPane runat="server" id="paneReportView" Width="100%" Height="100" Scrolling="None" >
    <div id="divReportView" style="width:970px; border:none;margin-top:7px; background-color:#EEEEEE; overflow:hidden;" runat="server">
        <analytics:AllReportsViewControl ID="allReportsViewControl" runat="server" ></analytics:AllReportsViewControl>
    </div>
</telerik:RadPane>
</telerik:RadSplitter>

and some relevant code in the .cs:

private void ResizeSplitterOnClient(Report report)
{
    if (report != null)
    {
        // Just determine which of two heights the top pane will get.
        int paneControlsHeight = 450;
        // ReportFilterControls.GeographyControls and ReportFilterControls.CommodityTree should be mutually exclusive, as they occupy the same real estate.
        if (report.FindFilterControl((int)ReportFilterControls.CommodityTree) != null)
        {
            paneControlsHeight = 250;
        }
        // And tell the client to call its resizeSplitter function.
        RadAjaxManager.GetCurrent(this).ResponseScripts.Add(string.Format("setTimeout('resizeSplitter({0});',100);", paneControlsHeight));
    }
}

The ResizeSplitterOnClient method is called when the user selects a new report, as well as whenever the currently active RadGrid's NeedDataSource event is fired.  This could occur when the grid is first loaded with data, or when a page-indexing or page-sizing event occurs.

When all is said and done, the dynamic sizing works fine the first time that the grid is populated.  The initial size of the bottom page is 100, and when the user triggers the data to be bound to the grid for the first time, the grid is loaded at a default of 50 rows per page.  I can see in the client that the value of the height variable in the resizeSplitter javascript function is 1337, thus setting the bottom pane and splitter height correctly.  However, when I do something that changes the grid height, such as changing the page size down to 20, height becomes 1334, and the resize leaves a whole lot of empty space between the bottom of the much-smaller grid and the bottom of the bottom pane.  If I continue further and set the page size to 10, height becomes 1331.  If I move to the last page in the data set which only contains one row, height becomes 1328.  If I go back to the first page, which contains 10 rows again, height becomes 1325.  It seems like on each postback, the number drops by 3 pixels, regardless of the actual content of the pane.

Please can somebody take a look and tell me what I'm doing wrong?
Thanks.
Steve
Top achievements
Rank 1
 answered on 03 Jul 2013
1 answer
490 views
I'm using a line chart to plot data for every M-F in a date range. I'm binding this to a datatable, and because there are a lot of dates, I'm only displaying the dates on Mondays. 

Right now the separation between every day is a major grid line and I've hidden the minor grid lines because they're irrelevant - a fraction of a day.

Is there any way to set the interval for the major/minor grid lines? Say every 5 columns is a major and every 1 day is minor?

My x axis is a collection of dates, the datetime axis didn't seem to give me enough flexibility on this so I did it manually. This means I can't use the datetime intervals. 

Here is my markup:

<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Width="900px" Height="400px" Skin="Metro" Transitions="true" >
                <ChartTitle Text="">               
                    <Appearance Visible="false">
                        <TextStyle Margin="0" Padding="0" FontSize="1" />
                    </Appearance>
                </ChartTitle>
                <PlotArea>                                                
                    <XAxis MajorTickType="Outside" MinorTickType="None">
                        <TitleAppearance Visible="false">
                        </TitleAppearance>
                        <LabelsAppearance RotationAngle="45">
                        </LabelsAppearance>
                        <MajorGridLines Color="#EFEFEF" Width="1"></MajorGridLines>
                        <MinorGridLines Color="#F7F7F7" Width="1" Visible="false"></MinorGridLines>
                    </XAxis>
                    <YAxis>
                        <TitleAppearance Text="Price" Visible="false">
                        </TitleAppearance>
                        <MajorGridLines Color="#EFEFEF" Width="1"></MajorGridLines>
                        <MinorGridLines Color="#F7F7F7" Width="1"></MinorGridLines>
                    </YAxis>
                    <Series>
                        <rad:LineSeries MissingValues="Gap"  ColorField="Color" DataFieldY="Price">
                            <LineAppearance Width="1" />
                            <LabelsAppearance Visible="false"></LabelsAppearance>
                            <TooltipsAppearance ClientTemplate="#=dataItem.ToolTip#" />
                            <SeriesItems>
                            </SeriesItems>                           
                        </rad:LineSeries>
                    </Series>
                </PlotArea>
            </telerik:RadHtmlChart>


Danail Vasilev
Telerik team
 answered on 03 Jul 2013
1 answer
207 views
Hi,

i want to hightlight the Content of Radeditor on click of a
GridButtonColumn

i want to highlight the word which is present in grid. on GridButton Click

Nikolay
Telerik team
 answered on 03 Jul 2013
1 answer
439 views
Hi
  How to give custom colors in donut chart series ? my donut client side code is 
 <telerik:RadHtmlChart runat="server" ID="DonutChart" Width="500" Height="300" Transitions="true"
                                                                                        Skin="Default">
                                                                                        <Appearance>
                                                                                            <FillStyle BackgroundColor="White"></FillStyle>
                                                                                        </Appearance>
                                                                                        <ChartTitle Text="Total Files According to Department ">
                                                                                            <Appearance Align="Center" BackgroundColor="White" Position="Top"><TextStyle />
                                                                                            </Appearance>
                                                                                        </ChartTitle>
                                                                                        <Legend>
                                                                                            <Appearance BackgroundColor="White" Position="Right" Visible="true">
                                                                                            </Appearance>
                                                                                        </Legend>
                                                                                        <PlotArea>
                                                                                            <Appearance>
                                                                                                <FillStyle BackgroundColor="White"></FillStyle>
                                                                                            </Appearance>
                                                                                            <Series>
                                                                                                <telerik:DonutSeries StartAngle="90">
                                                                                                    <LabelsAppearance Visible="false">
                                                                                                    </LabelsAppearance>
                                                                                                    <TooltipsAppearance DataFormatString="{0}%"></TooltipsAppearance>
                                                                                                    <SeriesItems>
                                                                                                        <telerik:PieSeriesItem />
                                                                                                    </SeriesItems>
                                                                                                   </telerik:DonutSeries>
                                                                                            </Series>
                                                                                        </PlotArea>
                                                                                    </telerik:RadHtmlChart>


in that i use telerik predefined skin " Default"
and my server side code is 

    DonutChart.PlotArea.Series.Clear()
                Dim col As New DonutSeries()
                col.Items.Clear()
                
                 For Each row1 As DataRow In dt1.Rows

                        Dim se As New SeriesItem()
                         Dim pi As New PieSeriesItem()
                         se.YValue = row1(1).ToString()
                    se.Name = row1(0)
                        col.Items.Add(se)
                Next
        DonutChart.PlotArea.Series.Add(col)

Here how to give custom skin
        like red,yellow,blue,green,black,pink..... upto 10 colors
Danail Vasilev
Telerik team
 answered on 03 Jul 2013
4 answers
175 views
Hi
How can I remove some of the items from the context menu displayed on right clicking on the editor on IE7

I would like to remove Paste from Word and Paste As Html options.
Marin Bratanov
Telerik team
 answered on 03 Jul 2013
3 answers
209 views
For a current project we are using jquery written into the content of the radeditor.  The Jquery library exists on the master page of the application, however if my understanding is correct the radeditor is rendered using an iframe and thus the jquery reference is missing.  This is throwing a javascript error for obvious reasons.  Is there any way to include a reference to an external javascript library from within the radeditor iframe?
Marin Bratanov
Telerik team
 answered on 03 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?