Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
Hi,
I am using the AJAX radchart with zooming and a button to toggle the zoom server side.  All is well except that I get these large black borders on the X and Y axis when it goes in Zoom mode.  Any ideas?  Below is my code for the aspx.
Thank you,
Jen

 

<telerik:RadChart ID="RadChart1"

 

 

runat="server" ChartImageFormat="Bmp"

 

 

ClientSettings-EnableZoom="false" AutoLayout="True"

 

 

DefaultType="Line" Skin="ExcelClassic" Width="1014px" Height="500px"

 

 

OnItemDataBound="RadChart1_ItemDataBound" OnDataBound="RadChart1_DataBound" >

 

 

<Series>

 

 

 

<telerik:ChartSeries Type="Line">

 

<

 

Appearance ShowLabels="false">

 

<

 

FillStyle MainColor="156, 154, 255" SecondColor="156, 154, 255">

 

 

</FillStyle>

 

<

 

Border Color="Black"></Border>

 

</

 

Appearance>

 

</

 

telerik:ChartSeries>

 

</

 

Series>

 

 

<

 

PlotArea>

 

<

 

XAxis >

 

<

 

Appearance >

 

 

<LabelAppearance RotationAngle="30" >

 

 

</LabelAppearance>

 

<

 

MajorGridLines Width="0" Color="DimGray"></MajorGridLines>

 

</

 

Appearance>

 

<

 

AxisLabel >

 

<

 

TextBlock Text="Date/Time">

 

<

 

Appearance TextProperties-Font="Verdana, 9.75pt, style=Bold"></Appearance>

 

</

 

TextBlock>

 

</

 

AxisLabel>

 

</

 

XAxis>

 

<

 

YAxis>

 

<

 

Appearance MinorTick-Width="0">

 

<

 

MajorGridLines Color="Black"></MajorGridLines>

 

 

<MinorGridLines Width="0" />

 

</

 

Appearance>

 

<

 

AxisLabel>

 

<

 

TextBlock>

 

<

 

Appearance TextProperties-Font="Verdana, 9.75pt, style=Bold"></Appearance>

 

</

 

TextBlock>

 

</

 

AxisLabel>

 

</

 

YAxis>

 

 

<YAxis2>

 

 

<AxisLabel>

 

 

<TextBlock>

 

 

<Appearance TextProperties-Font="Verdana, 9.75pt, style=Bold">

 

 

</Appearance>

 

 

</TextBlock>

 

 

</AxisLabel>

 

 

</YAxis2>

 

<

 

Appearance Corners="Round, Round, Round, Round, 6">

 

<

 

FillStyle MainColor="Silver" FillType="Solid"></FillStyle>

 

 

<Border Color="Gray" />

 

</

 

Appearance>

 

</

 

PlotArea>

 

<

 

ChartTitle>

 

<

 

Appearance

 

 

Dimensions-Margins="4%, 10px, 14px, 0%" Position-AlignedPosition="Top">

 

</

 

Appearance>

 

<

 

TextBlock>

 

<

 

Appearance TextProperties-Font="Verdana, 12pt" TextProperties-Color="Black"></Appearance>

 

</

 

TextBlock>

 

</

 

ChartTitle>

 

 

<Legend>

 

 

<Appearance Dimensions-AutoSize="true" >

 

 

<ItemTextAppearance TextProperties-Font="Verdana, 9pt">

 

 

</ItemTextAppearance>

 

 

<Border Color="Black" />

 

 

</Appearance>

 

 

</Legend>

 

 

</telerik:RadChart>

 

Ves
Telerik team
 answered on 07 Dec 2009
0 answers
164 views
Hi

I have a RADTreeview with the settings as shown

<

telerik:RadTreeView ID="RadTreeViewFolders" runat="server" AutoPostBack="False"

 

 

BorderWidth="0px" CausesValidation="False" DragAndDrop="False" EnableViewState="true"

 

 

LoadingMessagePosition="BeforeNodeText" MultipleSelect="false" OnClientNodeClicking="onNodeClicking"

 

 

RetainScrollPosition="true" SingleExpandPath="true"

 

 

Skin="Office2007">

 

 

</telerik:RadTreeView>

1)    The treeview does not repond to the session timeout from asp.net
2)    The same happens with the RADGRID

I need help on the above 2 issues

Thanks

 

Mahendra s
Top achievements
Rank 1
 asked on 07 Dec 2009
2 answers
67 views
Hey

i am currently try'ing to localize the radgrid with paging and <PagerStyle Mode="Slider"/> but it seems not to work or i simply using the wrong parameters ;)
here my markup (not working):
<PagerStyle Mode="Slider" NextPageToolTip="test123" /> 
working markup:
<PagerStyle NextPageToolTip="test123" /> 

can anyone give me a hint what i am doing wrong?
thx!


meik b
Top achievements
Rank 1
 answered on 07 Dec 2009
9 answers
1.4K+ views
Hi!

I am trying to set a checkbox value to true/false based on a cookie on the client side. This works perfectly well outside the toolbar, but not when the checkboxes are inside. Nothing happens. Have anyone experienced this before? Here is the code:

function loadToolBar() {    
        var toolBar = $find("<%=reportToolBar.ClientID %>");    
        var tdTool = toolBar._findItemByText("timeVsDepth");    
        var chkBoxTimeDepth = $telerik.findElement(tdTool.get_element(), ("chkBoxOptionsTvsD"));    
        var wsTool = toolBar._findItemByText("wellSchematic");    
        var chkBoxWellSchematic = $telerik.findElement(wsTool.get_element(), ("chkBoxOptionsWS"));    
        var gantTool = toolBar._findItemByText("gant");    
        var chkBoxGant = $telerik.findElement(gantTool.get_element(), ("chkBoxOptionsGant"));    
   
        var gantChecked = (getCookie("currentGant"));    
        var timeDChcked = getCookie("currentTimeDepth");    
        var wellSChck = getCookie("currentWellSch");    
   
        if (gantChecked != null && gantChecked == "true") {    
            chkBoxGant.checked = true;    
            document.getElementById("chkboxTest").checked = true;    
            gantTool.check();    
        }    
        if (timeDChcked != null && timeDChcked == "true") {    
            chkBoxTimeDepth.checked = true;    
            tdTool.check();    
        }    
        if (wellSChck != null && wellSChck == "true") {    
            chkBoxWellSchematic.checked = true;    
            wsTool.check();    
        }    
    }    
   
<telerik:RadToolBar ID="reportToolBar" Runat="server" Width="100%" OnClientButtonClicked="selectViewOptions" Skin="DBR" EnableEmbeddedSkins="false" OnClientLoad="loadToolBar" >    
        <Items>    
<telerik:RadToolBarDropDown runat="server" Text="Report Options" Width="50">    
            <Buttons>    
                <telerik:RadToolBarButton runat="server" Text="timeVsDepth" Value="timeDepth">    
                    <ItemTemplate>                            
                    <div onclick="StopPropagation(event)">    
                        <asp:CheckBox ID="chkBoxOptionsTvsD" runat="server" Text="Include time vs depth" Font-Size="12px" />                                                               
                    </div>    
                    </ItemTemplate>    
                </telerik:RadToolBarButton>    
                <telerik:RadToolBarButton runat="server" Text="wellSchematic" Value="wellSchematic">    
                    <ItemTemplate>    
                    <div onclick="StopPropagation(event)">    
                        <asp:CheckBox ID="chkBoxOptionsWS" runat="server" Text="Include well schematic" Font-Size="12px" />                     
                    </div>    
                    </ItemTemplate>    
                </telerik:RadToolBarButton>    
                <telerik:RadToolBarButton runat="server" Text="gant" Value="gant">    
                    <ItemTemplate>    
                    <div onclick="StopPropagation(event)">    
                        <asp:CheckBox ID="chkBoxOptionsGant" runat="server" Text="Include 1 week plan" Font-Size="12px" />                           
                    </div>    
                    </ItemTemplate>    
                </telerik:RadToolBarButton>    
            </Buttons>    
            </telerik:RadToolBarDropDown>    
</Items>    
    </telerik:RadToolBar>  

kjellerik
Top achievements
Rank 1
 answered on 07 Dec 2009
8 answers
586 views

This has to be pretty common and simple and that must be why I havent' been able to find an answer :-)

The RadGrid seemed fine for us until we tried to replace a vanilla grid on a page that uses buttons to dynamically change the datasource AND that also Sorts. 

For example,

Say one button on the webform connects to a source of the result of Membership.GetAllUsers()  which of course returns a collection of Membership Users objects and then another button fills the grid with a results of some SQL.

Okay... you start with adding the two buttons and in their click events you put standard grid.Datasource=XXX / grid.DataBind()  lines.

Everything is good.

BUT it seems to us that when you do this "simple data binding" you lose the ability to SORT the grid.  When you sort, the RadGrid disappears (because it is just a rendered table and it is empty.. even though there was ViewState there is no data and so there is no more grid).

So instead we tried going the Telerik way and not using DataBind()... instead using the NeedDataSource event.  But this has the problem of it only apparently allowing us to use the grid for one single dedicated purpose - such as GetAllUsers() instead of dynamically changing the data source via buttons.

We thought that somehow we could put some information in the GridNeedDataSourceEventArgs and read it in the NeedDataSource event and do a switch/case but it is readonly and the docs even imply that we only have one data soruce option:

"
In the code of this event you should prepare the data source (list of objects) for Telerik RadGrid and assign it to the grid's DataSource property.
"

 

How can we both change the grid data source on-demand AND have sorting?  It's a more or less built-in feature for other grids including the C1/MS freebies in VS so we took it for granted that it would be here too.  Do we have to go back to old style manual code for sorting or Are we just missing something in front of us?

Yavor
Telerik team
 answered on 07 Dec 2009
3 answers
111 views
We have two panels added to our page programmatically, both are added to the RadAjaxManager. The first contains a RadComboBox, the second a RadGrid. The first grid panel is added as trigger for the combo box panel. When rows are added, the combobox should be updated with new items. This works when the grid(and panel) is added before the combo box(and panel). However when the combo box panel is added before the grid panel, the combo box isn't updated.

Unfortunately I was unable to reproduce this in a smaller demo project.

Any ideas for what we can try would be greatly appreciated!

OnInit:
Controls added

OnLoadComplete:
Controls in panels data bound if panel was updated

Page_PreRender:
Panels added to RadAjaxManager






Iana Tsolova
Telerik team
 answered on 07 Dec 2009
1 answer
72 views
We are getting a crash in the scheduler that is webService bound whenever we have it set to weekview, with the groupBy property set and the showResourceHeaders set to false.

I will try to include the source files that should allow you to duplicate this issue, I am using version 2009.3.1103.

.aspx
<script runat="server"
protected void RadScheduler1_ResourcesPopulating(object sender, ResourcesPopulatingEventArgs e) 
    { 
        // Clear any previous resources in the scheduler 
        RadScheduler1.Resources.Clear(); 
 
        var consultants = new List<RssSchedulerConsultant> 
                              { 
                                  new RssSchedulerConsultant 
                                      {Name = "test1"Id = 1
                              }; 
 
        // Create our new sub-classes schedulerInfo class 
        var info = new RssSchedulerInfo 
                                     { 
                                         ViewStart = e.SchedulerInfo.ViewStart, 
                                         ViewEnd = e.SchedulerInfo.ViewEnd, 
                                         ViewableConsultants = consultants
                                         Consultant = null 
                                     }; 
 
        // Assign it to the eventArgs 
        e.SchedulerInfo = info
    } 
</script> 
 
  <telerik:RadScheduler ID="RadScheduler1" runat="server" Height="100%"  
    WeekView-GroupBy="Consultant" SelectedView="WeekView"  
    OnResourcesPopulating="RadScheduler1_ResourcesPopulating"  
    ShowResourceHeaders="false">  
    <WebServiceSettings Path="~/WebServices/ConsultantDayViewScheduler.asmx" ResourcePopulationMode="ServerSide" />  
  </telerik:RadScheduler>  

RssSchedulerInfo.cs
using System.Collections.Generic; 
using Telerik.Web.UI; 
using System; 
 
namespace Sonic.Rrs.MvcWeb.WebServices.Models 
    public class RssSchedulerInfo : SchedulerInfo 
    { 
        public IList<RssSchedulerConsultant> ViewableConsultants { getset; } 
 
        public RssSchedulerConsultant Consultant { getset; } 
    } 
 
    public class RssClinic 
    { 
        public int Id { getset; } 
        public string Name { getset; } 
        public DayOfWeek StartDay { getset; } 
        public DayOfWeek EndDay { getset; } 
    } 
 
    public class RssSchedulerConsultant 
    { 
        public string Name { getset; } 
        public long Id { getset; } 
        public RssClinic Clinic { getset; } 
    } 

WebService
[WebMethod(EnableSession = true)] 
        public IEnumerable<ResourceData> GetResources(RssSchedulerInfo schedulerInfo) 
        { 
            var resources = new List<ResourceData>(); 
            foreach (RssSchedulerConsultant consultant in schedulerInfo.ViewableConsultants) 
            { 
                var resourceItem = new ResourceData 
                                       { 
                                           Available = true
                                           Key = consultant.Id.ToString(), 
                                           Text = consultant.Name, 
                                           Type = "Consultant" 
                                       }; 
                resources.Add(resourceItem); 
            } 
 
            return resources; 
        } 

Any ideas?
T. Tsonev
Telerik team
 answered on 07 Dec 2009
5 answers
293 views
Hello,
I have an aspx form with a window manager on there, and I am opening new windows client side based on user action.  When the window is created, I want to set a custom icon that may be different depending on what the user clicked (Search, Edit Customer, Edit Order, New Order, etc...).  The windows are opening fine, and the iconUrl is set, because I retrieve it later, and show it in a listing of open windows.  However, only the default icon appears in the window's title.  Am I missing a call or something to tell it to refresh the title bar? 

Thanks in advance.
Lance


I am using the following code to open the windows.
                function OpenWindow(url, id, iconUrl)  
                {  
                    var wnd = $find(id);  
                    if (!wnd)  
                    {  
                        wnd = window.radopen(url, id);  
                        if (iconUrl)  
                        {  
                            wnd.set_iconUrl(iconUrl);  
                        }  
                    }  
                    else 
                    {  
                        wnd.show();  
                    }  
                    return false;  
                } 

Georgi Tunev
Telerik team
 answered on 07 Dec 2009
4 answers
137 views
Hi all,

I have 20 columns in grid, i wanted to show header in 2 rows (10 columns,10 columns) and also it should support grouping and sorting, please tell me any possible ways to do this,  it is very urgent for me, please save me, help me regarding this.
pradeep k
Top achievements
Rank 1
 answered on 07 Dec 2009
2 answers
213 views
Hi folks there !

I have been using the RAD GRID for a quite some while in my project.

I have enabled the FILTERING option on to my RAD GRID.

How can I minimize the HEIGHT of the TEXT BOX that appers with the FILTER Icon when we enable the filtering option.

Please help.

Below is the code that I ahve been using in my application :-

<telerik:RadGrid ID="AllFilesRadGrid" runat="server" DataSourceID="AllFilesSqlDataSource" 
                    GridLines="None" AllowFilteringByColumn="True" Skin="Vista">  
                    <MasterTableView AutoGenerateColumns="False"  DataKeyNames="File_Id" AllowFilteringByColumn="True" DataSourceID="AllFilesSqlDataSource">  
                        <RowIndicatorColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </RowIndicatorColumn> 
                        <ExpandCollapseColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </ExpandCollapseColumn> 
                        <Columns> 
                            <telerik:GridBoundColumn DataField="File_Name" HeaderText="File Name" SortExpression="File_Name" 
                                UniqueName="File_Name" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="true">  
                                <ItemStyle Width="50px" CssClass="GridCSS" /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="File_Path" HeaderText="File Path" SortExpression="File_Path" 
                                UniqueName="File_Path" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="true">  
                                <ItemStyle Width="50px" CssClass="GridCSS" /> 
                            </telerik:GridBoundColumn>                        
                            <telerik:GridBoundColumn DataField="File_Type" HeaderText="File Type" SortExpression="File_Type" 
                                UniqueName="File_Type" ReadOnly="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="true">  
                            </telerik:GridBoundColumn> 
                              <telerik:GridBoundColumn DataField="StatusOfFile" HeaderText="File Status" SortExpression="StatusOfFile" 
                                UniqueName="StatusOfFile" ReadOnly="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="true">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="File_UploadedDate"  DataType="System.DateTime" 
                                HeaderText="Uploaded Date" SortExpression="File_UploadedDate" UniqueName="File_UploadedDate" DataFormatString="{0:MM/dd/yy}"  HtmlEncode="false">  
                            </telerik:GridBoundColumn> 
                                 <telerik:GridBoundColumn DataField="File_UploadedByName" DataType="System.Int32" HeaderText="Uploaded By" 
                                SortExpression="File_UploadedByName" UniqueName="File_UploadedByName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="true">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridTemplateColumn HeaderText="Action" UniqueName="TemplateColumn" AllowFiltering="false" AutoPostBackOnFilter="false"  ShowFilterIcon="false">  
                                <ItemTemplate> 
                                  
                                    <asp:ImageButton ID="DownloadImageButton" AlternateText="Download" runat="server" ImageUrl="~/Images/download_manager2.png" Width="16px" Height="16px" CommandArgument='<%# Eval("File_FullPath") %>'  onclick="DownloadImageButton_Click" /> 
                                    &nbsp;  
                                    &nbsp;  
                                    <asp:ImageButton ID="ArchiveImageButton" AlternateText="Archive" runat="server" ImageUrl="~/Images/archiver.png" Width="16px" Height="16px" CommandArgument='<%# Eval("File_FullPath") %>' onclick="ArchiveImageButton_Click" /> 
                                      <cc1:ConfirmButtonExtender ID="ArchiveConfirmButtonExtender" runat="server" ConfirmText="Are you sure you want to archive ?" TargetControlID="ArchiveImageButton" > 
                                    </cc1:ConfirmButtonExtender> 
                                    &nbsp;  
                                    <asp:ImageButton ID="DeleteImageButton" AlternateText="Delete" runat="server" ImageUrl="~/Images/editdelete.png" Width="16px" Height="16px" CommandArgument='<%# Eval("File_FullPath") %>' onclick="DeleteImageButton_Click" /> 
                                    <cc1:ConfirmButtonExtender ID="DeleteConfirmButtonExtender" runat="server" ConfirmText="Are you sure you want to delete ?" TargetControlID="DeleteImageButton" > 
                                    </cc1:ConfirmButtonExtender> 
                                </ItemTemplate> 
                                 <ItemStyle Width="330px" /> 
                                 <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" /> 
                            </telerik:GridTemplateColumn> 
                        </Columns> 
                    </MasterTableView> 
                    <ClientSettings EnableRowHoverStyle="true">  
                    <Selecting AllowRowSelect="True" /> 
                    </ClientSettings> 
                </telerik:RadGrid> 
 Please help me ..


Ajay
Ajay
Top achievements
Rank 2
 answered on 07 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?