Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
192 views
Hi,

we are using the Radhtml Chart with Series Type Area. In your demos, you got an opacity, so even areas which lay above each other are visible. i tried to apply opactity too, but it's not possible. 

This is my code:

               columnSeries = New AreaSeries
                columnSeriesByRowName.Add(rowName, columnSeries)
                columnSeries.Name = rowName
                columnSeries.LineAppearance.LineStyle = HtmlChart.Enums.ExtendedLineStyle.Step
                Dim colorVal = ColorTranslator.FromHtml(colors(numberOfSeries Mod 13))
                columnSeries.Appearance.FillStyle.BackgroundColor = Color.FromArgb(50, colorVal)
                columnSeries.LabelsAppearance.TextStyle.Color = Color.DarkGray

What do i have to change?

Thanks for advice.


Danail Vasilev
Telerik team
 answered on 17 Jul 2014
1 answer
139 views
Is there any way of changing the default mouseover of a candlestick chart from $ to blank or a specific value?
Danail Vasilev
Telerik team
 answered on 17 Jul 2014
3 answers
138 views
Hi
I was trying to replicate this demo
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/grouping/grouping-client-side-api/defaultcs.aspx
but I have some problem

As you can see from the attached it seems to work but Company and Cdc doesn't group for anything

If I try to add or delete group nothing happens
If I try to order by Company or Cdc (click on the arrow on the group) I have a js telerik error
TypeError: f.get_owner(...) is null

Grid
<telerik:RadGrid ID="HomeRadGrid" runat="server" ClientDataSourceID="RadClientDataSource1"
                EnableEmbeddedSkins="False" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True"
                Skin="MySkin" ShowGroupPanel="True" PageSize="10">
                <PagerStyle Mode="NextPrevAndNumeric" />
                <MasterTableView AutoGenerateColumns="False" ClientDataKeyNames="Id, Bt1Attribute.Latitude, Bt1Attribute.Longitude, BaloonIcon"
                    HierarchyLoadMode="Client" GroupLoadMode="Client"  EnableGroupsExpandAll="true">                   
                    <GroupByExpressions>                   
                        <telerik:GridGroupByExpression>
                            <SelectFields>
                                <telerik:GridGroupByField FieldName="CompanyDescription" FieldAlias="Company">
                                </telerik:GridGroupByField>
                            </SelectFields>
                            <GroupByFields>
                                <telerik:GridGroupByField FieldName="CompanyDescription">
                                </telerik:GridGroupByField>
                            </GroupByFields>
                        </telerik:GridGroupByExpression>
                        <telerik:GridGroupByExpression>
                            <SelectFields>
                                <telerik:GridGroupByField FieldName="CdcCode" FieldAlias="Cdc">
                                </telerik:GridGroupByField>
                            </SelectFields>
                            <GroupByFields>
                                <telerik:GridGroupByField FieldName="CdcCode" >
                                </telerik:GridGroupByField>
                            </GroupByFields>
                        </telerik:GridGroupByExpression>
                    </GroupByExpressions>
<Columns>
  <telerik:GridBoundColumn DataField="CompanyDescription" HeaderText="Company" SortExpression="CompanyDescription"
                        GroupByExpression="CompanyDescription GROUP BY CompanyDescription"
                            ShowFilterIcon="false" AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                            UniqueName="CompanyDescription" Visible="true" meta:resourcekey="GridBoundColumnResource1">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CdcCode" HeaderText="Project" SortExpression="CdcCode"
                            ShowFilterIcon="false" AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                            GroupByExpression="CdcCode GROUP BY CdcCode"
                            UniqueName="CdcCode" Visible="true" meta:resourcekey="GridBoundColumnResource2">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Cdc.Site" HeaderText="Site" SortExpression="Cdc.Site"
                            AutoPostBackOnFilter="True" CurrentFilterFunction="Contains" ShowFilterIcon="false"
                            ItemStyle-Width="50px" FilterControlWidth="30px" UniqueName="Cdc.Site" Visible="true"
                            meta:resourcekey="GridBoundColumnResource3">
                            <ItemStyle Width="50px"></ItemStyle>
                        </telerik:GridBoundColumn>
....
 
 </Columns>
                    <PagerStyle AlwaysVisible="True" ShowPagerText="False" PageSizeControlType="None">
                    </PagerStyle>
                </MasterTableView>
                <ClientSettings ReorderColumnsOnClient="false" AllowDragToGroup="True" AllowColumnsReorder="false">
                    <ClientEvents OnRowDblClick="RowDblClick" OnHierarchyExpanded="LoadSmallMap" OnHierarchyExpanding="CollapseOtherRows" >
                    </ClientEvents>                   
                    <Selecting AllowRowSelect="true"></Selecting>
                    <Resizing AllowRowResize="false" AllowColumnResize="false" EnableRealTimeResize="false"
                        ResizeGridOnColumnResize="False"></Resizing>
                </ClientSettings>
                <GroupingSettings ShowUnGroupButton="True" CaseSensitive="false"></GroupingSettings>
            </telerik:RadGrid>

ClientDataSource
<telerik:RadClientDataSource ID="RadClientDataSource1" runat="server" AllowBatchOperations="true">   
        <ClientEvents OnChange="LoadBigMap" OnDataParse="Parse" />
        <DataSource>
            <WebServiceDataSourceSettings>
                <Select Url="load_map.asmx/GetHomeData" RequestType="Post" DataType="JSON" ContentType="application/json; charset=utf-8" />
            </WebServiceDataSourceSettings>
        </DataSource>    
        <Schema>
            <Model>
                <telerik:ClientDataSourceModelField FieldName="F1204Status" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="Id" DataType="Number" />
                <telerik:ClientDataSourceModelField FieldName="Ambiente" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="AmbienteFullName" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="CompanyDescription" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="Cdc.CompanyCode" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="Cdc.Code" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="CdcCode" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="Cdc.Site" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="Bt1Asset.Asset.Code" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="Bt1Asset.Code" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="Bt1Asset.Asset.Description" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="Bt1Asset.Bt1" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="Bt1Asset.Bt2" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="TxRxImg" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="GpsFixImg" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="Bt1Attribute.Latitude" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="Bt1Attribute.Longitude" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="BaloonIcon" DataType="String" />
            </Model>
        </Schema>     
    </telerik:RadClientDataSource>

function Parse (sender, args) {
               var data = args.get_response().d;
            
               args.set_parsedData(data);
           }
Angel Petrov
Telerik team
 answered on 17 Jul 2014
10 answers
340 views
Hi,
I want to use image gallery as a content slider and I want to redirect to other pages by clicking on images in the image gallery.
But ImageGalleryItem class does not have a NavigateUrl to use.
Is there any workaround for this.

best regards
Amir
Milind
Top achievements
Rank 1
 answered on 17 Jul 2014
2 answers
147 views
Dear Telerik,

I'm following your demo on 
http://blogs.telerik.com/aspnet-ajax/posts/13-05-07/how-to-implement-drill-down-functionality-in-telerik-s-pivotgrid-for-asp.net-ajax-part-1

My question is how can I modify my code to use stored procedure with parameter selection if I have a sqldatasource in the aspx page in front?

Thanks for the assist.

Best regards.
Konstantin Dikov
Telerik team
 answered on 17 Jul 2014
3 answers
136 views
Guys,

I know your intentions are good, so I am expecting a lot !! I just hate to say but it seems to me that you could have hit the ground running a little better with this control GIVEN that you all have been getting great feedback on forums from your other platforms that have a Gantt control (notably Siliverlight). So, what you all have learned with that should have been the basis for feature release 1, not starting at the beginning, which is where we seem to be at.

Nevertheless, we are where we are and I need some things that I think are REASONABLE requests and that others may need as well:

1) The option  to use the TimeLine side of the control without the treecontrol and replace it with the Grid control for performing SIMPLE graphical display of time-phased data. Let me create a splitter and put the Grid on the left, and the Gantt timeline on the right. Let me do that. Give me some simple hooks for letting me get some of my grid data over to the TimeLine and give me enough so that my rows match up and I can synch the scrolling of the right and left sides. I would not need a sophisticated interface for inserting tasks or interactive gantt bars that stretch the timeline and automatically update the start times/end times. Just a simple interface for graphically displaying time-phased data from the Grid.

2) Read your forums for the Sliverlight Gantt and immediately begin prioritizing all of the most requested features from that forum because many of those requests are going to be the same ones from this group as far as business functionality goes.

Thanks




Dimitar Terziev
Telerik team
 answered on 17 Jul 2014
7 answers
850 views
Hi,
I am using a radgrid with batch edit mode.
However there are few things that I want to achieve, please let me know how to achieve them.

1) Upon clicking the Save Changes button (on grid_BatchEditCommand method), I will perform some checking if there's any validation error, I want to leave the radgrid in editing mode as per before clicking the save changes button.
I tried using e.canceled = true, but it seems it's like canceling all the changes (works similar like Cancel All Changes button).
So how to leave it in editing mode?

2) I have another Save button outside the grid, how to check that the radgrid is edited and not yet saved?

Thanks!
Eyup
Telerik team
 answered on 17 Jul 2014
7 answers
457 views
I have a PanelBar on my page that populated with items via the Client API.  The functions that manipulate the PanelBar follow:

    function BuildPanelBar(sender) {
        var panelBar = sender;
        var menuJson = JSON.parse('<%=Model.MenuItems %>');

        panelBar.trackChanges();
        
        var items = panelBar.get_items();
        if (items.get_count() > 0) panelBar.get_items().clear();

        for (var i = 0; i < menuJson.length; i++) {
            var currentItem = menuJson[i];

            var rootItem = new Telerik.Web.UI.RadPanelItem();
            rootItem.set_text(currentItem.DisplayName);

            if (currentItem.IsRootNode) {
                addItemsToRoot(currentItem, rootItem);
            }

            
            panelBar.get_items().add(rootItem);
            panelBar.commitChanges();
        }
    }

    function addItemsToRoot(currentItem, rootItem) {
        
        for (var i = 0; i < currentItem.ChildrenNodes.length; i++) {
            
            var newCurrentItem = currentItem.ChildrenNodes[i];
            
            var newItem = new Telerik.Web.UI.RadPanelItem();
            newItem.set_text(newCurrentItem.DisplayName);
            
            if (newCurrentItem.IsRootNode) {
                addItemsToRoot(newCurrentItem, newItem);
            }
            rootItem.get_items().add(newItem);
        }
    }

I need the individual items to call a different JavaScript when they are clicked, and not postback to the server.  I was hoping to do something like this:

            newItem.set_onclick(<function goes here>);

but all I have found in the client api is the OnClientClick function that I declare at the PanelBar level.  While each item that isn't a root node would call the same function, the values that the items would provide to the function would be different.  Is there anyway to achieve what I am trying to do?
Shinu
Top achievements
Rank 2
 answered on 17 Jul 2014
1 answer
190 views
I am having trouble setting the source of a Media Player to a asp.net webforms HTTP Handler. 

I am wondering if anyone can tell me if it is possible to hook up the MediaPlayer to a HTTP Handler. 

Example Code is

videoPlayer.Source = String.Format("localhost:1099\<Project>.Video.ashx?FileLocation={1}", "Video.mp4")
Dim sources As String() = {"Video1.mp4", "Video2.mp4"}
For Each source As String In sources
    If Not String.IsNullOrEmpty(source) Then
        Dim videoSources As New MediaPlayerSource()
        videoSources.Path = String.Format("localhost:1099\<Project>.Video.ashx?FileLocation={1}", source)
        videoPlayer.Sources.Add(videoSources)
    End If
Next
Angel Petrov
Telerik team
 answered on 17 Jul 2014
7 answers
568 views
I'm having an issue trying to convert one of my RadGrids to Batch edit mode from EditForms. The following is all code that worked natively prior to changing the EditMode.

Here is an example of the problem, starting with the GridTemplateColumn causing problems:
<telerik:GridTemplateColumn HeaderText="Unit #" ColumnGroupName="GeneralInformation" UniqueName="EmpORUnitID" DataField="EmpORUnitID" HeaderStyle-Width="100px">
                <ItemTemplate>
                    <asp:Label ID="lblUnitID" runat="server" Text=<%#DataBinder.Eval(Container, "DataItem.EmpORUnitID")%>></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadComboBox runat="server" ID="rcbUnitNumber"
                        EnableLoadOnDemand="True" ShowMoreResultsBox="true" BorderStyle="None" Width="90px"
                        EnableVirtualScrolling="true" EmptyMessage="Choose a Unit #"
                        DataTextField="EmpORUnitID" MarkFirstMatch="True" Filter="StartsWith"
                        HighlightTemplatedItems="true" Height="200px" Text='<%#DataBinder.Eval(Container, "DataItem.EmpORUnitID")%>'>
                        <WebServiceSettings Method="GetUnitNumberList" Path="Timesheet.aspx" />
                    </telerik:RadComboBox>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Odo Start" ColumnGroupName="GeneralInformation" UniqueName="OdoStart" DataField="OdoStart" HeaderStyle-Width="100px">
                <ItemTemplate>
                    <%#DataBinder.Eval(Container, "DataItem.OdoStart")%>
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadNumericTextBox runat="server" ID="rtbOdoStart" Width="50px" Text='<%#DataBinder.Eval(Container, "DataItem.OdoStart")%>'>
                    </telerik:RadNumericTextBox>
                    <telerik:RadButton ID="btnFindOdoStart" runat="server" Width="20px"
                                            OnClick="btnFindOdoStart_Click" Icon-PrimaryIconUrl="~/Images/Icons/gauge.png"></telerik:RadButton>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>

Then, I have the following (with some lines cut out) to extract values from the EditItemTemplate controls (bolded the relevant sections to this problem)

protected void rgTodaysVehicles_UpdateCommand(object sender, GridCommandEventArgs e)
        {
            try
            {
                GridEditableItem editedItem = e.Item as GridEditableItem;
                SWG.Timesheet.WebApp.Entities.Timesheet timesheet = Session["CurrentTimesheet"] as SWG.Timesheet.WebApp.Entities.Timesheet;
                VehicleMileageSummary vehicleMileageSummary = timesheet.VehicleMileages[editedItem.ItemIndex];
                try
                {
                    vehicleMileageSummary = BuildVehicleMileageSummary(editedItem, vehicleMileageSummary);

The last line above leads to:

private VehicleMileageSummary BuildVehicleMileageSummary(GridEditableItem editedItem, VehicleMileageSummary vehicleMileage)
        {
            List<String> errorList = new List<string>();
            try
            {
                vehicleMileage.IsDirty = true;            
                RadComboBox cbxEmpOrUnitID = (RadComboBox)editedItem["EmpORUnitID"].FindControl("rcbUnitNumber");       
                vehicleMileage.EmpORUnitID = cbxEmpOrUnitID.Text;

I receive null Object errors for the bolded line above, as the control "rcbUnitNumber" isn't found. Using breakpoints and some testing I can confirm that "editedItem" only contains the controls from the column ItemTemplate rather than EditItemTemplate.

Can anyone see what I'm doing wrong here?



Angel Petrov
Telerik team
 answered on 17 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?