Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
214 views

Hi, I am new to Telerik and ASP.NET, but not to programming.  I have multiple controls (radcomboboxes, text fields) repeated in rows of a table. Each row's field names are appended with a digit to differentiate(ddlChild1, ddlChild2, etc.). I am wanting to modify 4 of the controls in that row, based on the selection of in the combo box (ddlChildx).  I am trying to minimize the code needed, so instead of having a block of code and duplicating it 10 times for each of the rows/controls' SelectedIndexChanged event, I wanted to pass the controls in the row to a function or subroutine by reference.  However, when I try to declare the parameters 'As Telerik.RadComboBox', it lists Telerik as a namespace not a class in the pop up help when writing out the code.  So, it isn't able to bring up the Methods in that parameter.  

What do I need to do for the subroutine or function to recognize the telerik control so I can pass it by reference and just do changes to the .SelectedValues or .Text in my subroutine or function.  I tried just defining the parameters as dropdownbox, but in compile it said that I couldn't pass the Telerik control to the function

Thanks in advance for your help.

Here's the code to call the function for one of the rows:

Public Sub ddlChild1_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs) Handles ddlChild1.SelectedIndexChanged
        'Child Selected Now Default other fields
        Dim intPos As Integer

        intPos = InStr(ddlChild1.Text, "-")
        If intPos <> 0 Then
            If Mid(ddlChild1.Text, intPos + 1, 3) = "000" Then
                'Not a Child
                If Mid(ddlChild1.Text, intPos - 1, 2) = "MG" Then
                    ddlAccount1.SelectedValue = "MG"
                End If
            Else
                'Child
                'Get Next Applied From and To Dates
                Functions.fGetAppliedFromTo(ddlChild1, ddlAccount1, txtFrom1, TxtTo1)
                'Get Next Support Due
                Functions.fGetAmountOwed(ddlChild1, txtAmount1)

            End If
        End If
    End Sub

 

Here's the beginning of one of the functions:

 Public Shared Function GetAppliedFromTo(ByRef ddlChild As DropDownList, ByRef ddlAccount As DropDownList, ByRef txtFrom As TextBox, ByRef txtTo As TextBox)

 

 

 

 

Software
Top achievements
Rank 1
 answered on 16 Jun 2016
3 answers
581 views
I'd like to use the DatePicker control: http://demos.telerik.com/aspnet-ajax/calendar/examples/datepicker/clientapi/defaultcs.aspx

Would it be possible to enable only Mondays to be selectable when user wants to pick a date?

Thanks,
Eyup
Telerik team
 answered on 16 Jun 2016
6 answers
271 views

Hello,

     I have a RadNumericTextBox used to accept a numeric value. Now I  got a requirement that when the user input 0, the text in the text box should be changed to a string like "Disabled" instead of the numeric value 0.

     Is there any solution? Thanks in advance.

Best regards

Zhang Rui

 

Vasil
Telerik team
 answered on 16 Jun 2016
15 answers
81 views
Hi.
I have a problem, because I want to change code SQL to code C#.

I'm creating 2 Tables and.... 

DataSet ds = new DataSet("Gantt");
        ds.Tables.Add(dt);
        ds.Tables.Add(gd);
        //RadGantt1.DataSource = ds;
        //RadGantt1.DataSourceID = null;
        //RadGantt1.Data
        //RadGantt1.DataSourceID = "GanttTasks";
        RadGantt1.DataSource = ds;
        //RadGantt1.DataSourceID = "GanttTasks";
        //RadGantt1.DependenciesDataSource = gd;
        //RadGantt1.DependenciesDataSourceID = "GanttDependencies";

Actually problem:
Telerik.Web.UI.Gantt.GanttDataSourceException: DependenciesDataSourceID may not be null in case of DataSource binding. So I changed last line, but I have another problem.
What I should do now?







admin
Top achievements
Rank 1
 answered on 16 Jun 2016
1 answer
133 views

My title is a bit weird as I'm having trouble explaining what I mean, so let me try to clarify.  I have a UI that is meant to have a single repeating row of "header" data and then "detail" data under it.  An example would be something like this in pseducode layout:

Header Row 1
Detail Row 1
Detail Row 2
Detail Row 3
Header Row 2
Detail Row 4
Detail Row 5
Detail Row 6

In MVC I would do something like this (again, pseudocode):

<table>
@foreach (var m in Model.EnrollmentPeriods) {
<tr class="header">
<td>@m.EnrollmentPeriodName</td>
<td><button id="newElectionButton">New Election</button></td>
</tr>
@foreach (var m2 in m.EnrollmentDetails) {
<tr>
<td>@m2.BenefitClass</td>
<td>@m2.Region</td>
<td>@m2.Band</td>
<tr>
@}
@}
</table>

 

I have looked at the RadGrid and RadListView, and neither seem to do what I want.  I'm not trying to use grouping, I basically need to have a way to say this set of data is repeated on this row, and this other set of data is repeated below it.  If you look at the attachment (hopefully it comes), the gray shaded area is the "header" portion that needs to be repeated and the white part is the "detail" records.  I can handle the button parts myself, it's mainly just the layout because none of the controls seem to allow for a non-grouping header row, and the gray part needs to be for each "section", it can't repeat with each row of data.

Ianko
Telerik team
 answered on 16 Jun 2016
14 answers
3.1K+ views
Hi,

I am using few time(7) columns in my SQL table. RadGrid always show the time in GridDateTimeColumn as 13:55:24.1658985 does not matter what I am putting in DataFormatString. I want to show short 12hr notation: "1:55pm". How to do that?
<telerik:GridDateTimeColumn DataField="TicketEmailTime" DataFormatString="{0:t}" FilterControlAltText="Filter colTicketEmailTime column" HeaderText="Ticket Email Time" UniqueName="colTicketEmailTime" DataType="System.DateTime" PickerType="TimePicker" AllowFiltering="False" AllowSorting="False">
    <ColumnValidationSettings>
        <ModelErrorMessage Text="" />
    </ColumnValidationSettings>
</telerik:GridDateTimeColumn>

Regards,
  Oleg
Vasil
Telerik team
 answered on 16 Jun 2016
1 answer
103 views

Hello,

 

Is there a way to get selected start and end dates after selecting in TimeSlot?

 

thanks

Ivan Danchev
Telerik team
 answered on 16 Jun 2016
5 answers
88 views
Hi,

This is an interesting problem and I'm hoping you're able to help. I have a RadGrid in a page that is being displayed in a RadWindow. I am using the "InPlace" edit method on the grid which sits in the middle of the page and is updated using the RadAjaxManager. This all works fine. I should explain that I'm not using the datasource auto update functionality of the RadGrid, I'm fetching the values on the server-side and managing the update of the datasource myself. This all works as we would expect.

I then came to the point where I needed to add a RadComboBox into one of the columns of the grid. So I removed the GridBoundColumn and replaced it with a GridTemplateColumn. I populate the RadComboBox from the code-behind using the ItemDataBound event handler. Whilst the RadComboBox appears to populate I now receive an error in the Microsoft Ajax client library, when I click to edit a row in the grid. This is fairly simple code but I'm unable to see where the issue is.

What is interesting is this ... If I put back the GridBoundColumn and have both in the grid at the same time, I don't receive the client-side error at all, the RadComboBox populates and works as it should. As soon as I remove the GridBoundColumn, it stops working.

I have included snippets from the code below. I would appreciate any help you can give, many thanks.

The Error
library: MicrosoftAjax.js
line : var a=g?new h(g):new h
output: Object Expected

Code Behind
        public void DetailGrid_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                /* find the combo box that we're going to populate the detail types with */
                RadComboBox ddlDetailTypes = (RadComboBox)e.Item.FindControl("ddlDetailTypes");

                /* get the detail types to bind to the drop down list */
                Dictionary<int, string> detailtypes = presenter.GetDetailTypes();

                /* bind the drop down list */
                ddlDetailTypes.DataSource = detailtypes;
                ddlDetailTypes.DataBind();

                /* select the value in the drop down list */
                if (e.Item.DataItem != null)
                    ddlDetailTypes.SelectedValue = ((DetailModel)e.Item.DataItem).Type.ToString();
            }
        }

Grid Bound Column
                        <telerik:GridDropDownColumn UniqueName="Type" DataField="Type" Visible="true" HeaderText="Type">
                            <ItemStyle Width="60" />
                        </telerik:GridDropDownColumn>

Template Column (with RadComboBox)
                        <telerik:GridTemplateColumn UniqueName="Type" Visible="true" HeaderText="Type">
                            <ItemTemplate>
                                <%# DataBinder.Eval(Container.DataItem, "TypeDescription") %>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadComboBox DataTextField="Value" DataValueField="Key"  ID="ddlDetailTypes" runat="server" Skin="WebBlue" EnableEmbeddedScripts="false">
                                </telerik:RadComboBox>
                            </EditItemTemplate>
                            <ItemStyle Width="60" />
                        </telerik:GridTemplateColumn>
Hansel Eduard
Top achievements
Rank 1
 answered on 16 Jun 2016
8 answers
311 views

Environment:  Visual Studio 2012 using UI for APS.NET AJAX Q2 2016

We are modelling a workflow process using the RadGrid.  I have attached a model of what we are trying to represent, along with other screen shots.

Figure 1 contains the workflow model.  The model consists of a main task (AEHF 10/20...) that has 3 sub tasks (Terminal 10/20..., Humvee 10/20..., and Shipping).  The 2 of the 3 sub tasks have another layer of sub tasks below them.  Any task that does not have children is represented as a bubble for each line item.  We represent the tasks that do have children in two ways.  1st the task is displayed as a column that is expanded with collapse button along with the task name, each line item then represents the sub tasks of that task (Figure 1 & 4 shows all tasks expanded).  2nd the task is displayed collapsed along with a expand button and the task name, then each line item displays a bubble of the collapsed task, only that task is then displayed, not any of its sub tasks (see Figure 3, the Humvee task is collapsed).  Tasks that have grand children are added as a GridGroupColumn, with is sub tasks (column) have a group name of its parent.  Tasks that have children and not grand children are added as a TemplateColumn.  Being that the workflows are dynamic this is done recursively (see code in AddTaskColumns).  The grid is created in OnInit(), after the grid is defined, we then add the task columns 'AddTaskColumns'.  

The problem.  None of the tasks that have grand children are displayed as they were in the previous release.  Figure 4 shows the display as it used to work, Figure 2 shows how it is now displayed.  The names of the columns are changed during the OnGridItemCreated event handler (See code below).  The issue is that the task that has grand children is not replacing the name, and is not adding the collapse button.  Other example documentation I have found is saying that the GridGroupColumn shows up in OnGridItemCreated as a GridGroupHeaderItem, this is not the case, it is showing up as a GridHeaderItem.  Any processing of that item (changing the name, and adding the button) is now showing up in the rendered display.  As you can see in the OnGridItemCreated code below I added an if statement looking for GridGroupHeaderItem, the code never executes.  I am able to change the name of the column by using the RadGridWorkflow.MasterTableView.ColumnGroups finding the correct column then changing it's .HeaderText property, but you can not add additional controls to it since it is not a control.

How can I get the expand/collapse button to be displayed again?

 

        private void AddTaskColumns(WorkflowConfiguration task)
        {
            // Add group column if the task has grand children, acts as the Expanded column for this task.
            if (task.HasGrandChildren())
            {
                // Make this a Group Column
                GridColumnGroup group = new GridColumnGroup();
                // Header Text is the only property of a column common between GridColumnGroup and GridColumn that the value can be determined
                // in the OnItemCreated to be able to properly add the Expand/Collapse button as needed.
                group.HeaderText = "Expanded-" + task.WorkflowID.ToString();
                group.HeaderStyle.VerticalAlign = VerticalAlign.Top;
                group.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
                group.Name = "Group" + task.WorkflowID.ToString();

                RadGridWorkflow.MasterTableView.ColumnGroups.Add(group);
                if (task.ParentWorkflowConfiguration != null)
                {
                    group.ParentGroupName =
                        task.ParentWorkflowConfiguration.WorkflowID.ToString();
                }
                // Add sub workflow tasks
                foreach (WorkflowConfiguration subTask in
                    task.SubWorkflowConfigurations)
                {
                    AddTaskColumns(subTask);
                }
            }            
            // Add expanded column if the task has children.
            else if (task.HasSubTasks())
            {
                AlpsGridTemplateColumn expColumn = new AlpsGridTemplateColumn();
                expColumn.ItemTemplate = new TaskButtonsTemplate(_workflowConfig, task, _functions, "Expanded");
                expColumn.UniqueName = "Expanded" + task.WorkflowID.ToString();
                expColumn.HeaderStyle.VerticalAlign = VerticalAlign.Bottom;
                expColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
                // Header Text is the only property of a column common between GridColumnGroup and GridColumn that the value can be determined
                // in the OnItemCreated to be able to properly add the Expand/Collapse button as needed.
                expColumn.HeaderText = "Expanded-" + task.WorkflowID.ToString();
                expColumn.AllowSorting = false;
                expColumn.AllowFiltering = false;
                expColumn.Groupable = false;
                expColumn.Reorderable = false;

                // Do some decent sizing for the amount of tasks/bubbles to show.
                switch (task.SubWorkflowConfigurations.Count)
                {
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        expColumn.HeaderStyle.Width = Unit.Pixel(100);
                        break;

                    case 7:
                    case 8:
                    case 9:
                        expColumn.HeaderStyle.Width = Unit.Pixel(100 + (task.SubWorkflowConfigurations.Count - 4) * 20);
                        break;
                    default:
                        expColumn.HeaderStyle.Width = Unit.Pixel(220);
                        break;
                }

                if (task.ParentWorkflowConfiguration != null)
                {
                    expColumn.ColumnGroupName = "Group" + task.ParentWorkflowConfiguration.WorkflowID.ToString();
                }
                RadGridWorkflow.MasterTableView.Columns.Add(expColumn);
            }

            // Every task will have a Collapsed column, this will add the collapsed column.
            AlpsGridTemplateColumn colColumn = new AlpsGridTemplateColumn();
            colColumn.ItemTemplate = new TaskButtonsTemplate(_workflowConfig, task, _functions, "Collapsed");
            colColumn.UniqueName = "Collapsed" + task.WorkflowID.ToString();
            colColumn.HeaderStyle.VerticalAlign = VerticalAlign.Bottom;
            colColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
            colColumn.HeaderStyle.Width = Unit.Pixel(100);
            colColumn.HeaderText = "Collapsed-" + task.WorkflowID.ToString();
            colColumn.AllowSorting = false;
            colColumn.AllowFiltering = false;
            colColumn.Groupable = false;
            colColumn.Reorderable = false;

            if (task.ParentWorkflowConfiguration != null)
            {
                colColumn.ColumnGroupName = "Group" + task.ParentWorkflowConfiguration.WorkflowID.ToString();
            }
            RadGridWorkflow.MasterTableView.Columns.Add(colColumn);
        }

 

        void OnGridItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridGroupHeaderItem)
            {                

                System.Diagnostics.Debug.WriteLine("GridGroupHeaderItem");
            }
            if (e.Item is GridHeaderItem)
            {
                GridHeaderItem ghi = e.Item as GridHeaderItem;
                foreach (GridTableHeaderCell tc in ghi.Cells)
                {
                    int delimiterIndex = tc.Text.IndexOf('-');
                    int wfid;

                    if (delimiterIndex > -1 && int.TryParse(tc.Text.Substring(delimiterIndex + 1, tc.Text.Length - (delimiterIndex + 1)), out wfid))
                    {
                        WorkflowConfiguration task = _workflowConfig.FindTaskWithWorkFlowID(wfid);
                        if (task != null)
                        {
                            string state = tc.Text.Substring(0, delimiterIndex);
                            tc.Text = task.Name;
                            System.Web.UI.HtmlControls.HtmlGenericControl
                                createDiv = new System.Web.UI.HtmlControls.
                                    HtmlGenericControl("div");
                            createDiv.Style.Add(HtmlTextWriterStyle.Width, "100%");
                            createDiv.Style.Add(HtmlTextWriterStyle.TextAlign,
                                "center");
                            createDiv.InnerHtml = task.Name;
                            if (task.HasSubTasks())
                            {
                                createDiv.Controls.Add(CreateHeaderButton(task, state));
                            }
                            tc.Controls.Add(createDiv);
                        }
                    }
                }

            }
        }

 

        protected virtual void CreateGrid()
        {
            RadGridWorkflow.ID = "AlpsRadGridWorkflow";
            RadGridWorkflow.AllowCustomPaging = true;
            RadGridWorkflow.AllowFilteringByColumn = true;
            RadGridWorkflow.PageSize = 25;

            RadGridWorkflow.ClientSettings.Selecting.AllowRowSelect = true;
            RadGridWorkflow.ClientSettings.EnableAlternatingItems = true;
            RadGridWorkflow.EnableViewState = true;

            RadGridWorkflow.MasterTableView.NoDetailRecordsText = "No Records to Display";
            RadGridWorkflow.MasterTableView.DataKeyNames = new string[] { "OperationalWorkflowItemID" };
            RadGridWorkflow.MasterTableView.ClientDataKeyNames = new string[] { "OperationalWorkflowItemID" };
        }

 

        protected RadButton CreateHeaderButton(WorkflowConfiguration task, string state)
        {
            RadButton button = new RadButton();
            button.AutoPostBack = true;
            button.Image.ImageUrl = "~/Images/Menu/Empty.png";
            button.Image.IsBackgroundImage = true;
            button.CommandArgument = task.WorkflowID.ToString();
            button.CausesValidation = false;
            button.ButtonType = RadButtonType.StandardButton;

            if (state == "Expanded")
            {
                button.ID = String.Format("RadButton{0}Collapse", task.WorkflowID);
                button.CommandName = "Collapse";
                button.ToolTip = String.Format("Collapse {0}", task.Name);
                button.Icon.PrimaryIconCssClass = "rbPrevious";
            }
            else
            {
                button.ID = String.Format("RadButton{0}Expand", task.WorkflowID);
                button.CommandName = "Expand";
                button.ToolTip = String.Format("Expand {0}", task.Name);
                button.Icon.PrimaryIconCssClass = "rbNext";

            }

            button.Click += RadButtonExpandCollapse_Click;

            return button;
        }

We have two classes derived from the base page, here is the code that is adding the grid columns that are not part of the hierarchy.

        protected override void AddGridColumns()
        {
            AlpsGridBoundColumn terminalColumn = new AlpsGridBoundColumn();
            terminalColumn.DataField = "Name";
            terminalColumn.UniqueName = "Name";
            terminalColumn.HeaderText = "Serial Number";
            terminalColumn.HeaderStyle.VerticalAlign = VerticalAlign.Bottom;
            terminalColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
            terminalColumn.HeaderStyle.Width = 150;
            AlpsRadGridWorkflow.MasterTableView.Columns.Add(terminalColumn);

            AlpsGridBoundColumn subComponentColumn = new AlpsGridBoundColumn();
            subComponentColumn.DataField = "SubComponent";
            subComponentColumn.UniqueName = "SubComponent";
            subComponentColumn.HeaderText = "Sub-Component";
            subComponentColumn.HeaderStyle.VerticalAlign = VerticalAlign.Bottom;
            subComponentColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
            subComponentColumn.HeaderStyle.Width = 100;
            AlpsRadGridWorkflow.MasterTableView.Columns.Add(subComponentColumn);

            AlpsGridBoundColumn organizationColumn = new AlpsGridBoundColumn();
            organizationColumn.DataField = "Owner";
            organizationColumn.UniqueName = "Owner";
            organizationColumn.HeaderText = "Owning Organization";
            organizationColumn.HeaderStyle.VerticalAlign = VerticalAlign.Bottom;
            organizationColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
            organizationColumn.HeaderStyle.Width = 180;
            AlpsRadGridWorkflow.MasterTableView.Columns.Add(organizationColumn);

            AlpsGridBoundColumn gainingOrganizationColumn = new AlpsGridBoundColumn();
            gainingOrganizationColumn.DataField = "GainingOrganization";
            gainingOrganizationColumn.UniqueName = "GainingOrganization";
            gainingOrganizationColumn.HeaderText = "Gaining Organization";
            gainingOrganizationColumn.HeaderStyle.VerticalAlign = VerticalAlign.Bottom;
            gainingOrganizationColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
            gainingOrganizationColumn.HeaderStyle.Width = 180;
            AlpsRadGridWorkflow.MasterTableView.Columns.Add(gainingOrganizationColumn);
            
            AlpsGridDateTimeColumn startColumn = new AlpsGridDateTimeColumn();
            startColumn.DataField = "StartDate";
            startColumn.UniqueName = "StartDate";
            startColumn.HeaderText = "Capture Date";
            startColumn.HeaderStyle.VerticalAlign = VerticalAlign.Bottom;
            startColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
            startColumn.DataFormatString = Constants.Format.DATE_FORMAT;
            startColumn.Display = false;
            AlpsRadGridWorkflow.MasterTableView.Columns.Add(startColumn);

            AlpsGridDateTimeColumn endColumn = new AlpsGridDateTimeColumn();
            endColumn.DataField = "EndDate";
            endColumn.UniqueName = "EndDate";
            endColumn.HeaderText = "Completion Date";
            endColumn.HeaderStyle.VerticalAlign = VerticalAlign.Bottom;
            endColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
            endColumn.CurrentFilterFunction = GridKnownFunction.IsNull;
            endColumn.DataFormatString = Constants.Format.DATE_FORMAT;
            AlpsRadGridWorkflow.MasterTableView.Columns.Add(endColumn);

            AlpsGridCheckBoxColumn activeColumn = new AlpsGridCheckBoxColumn();
            activeColumn.AllowFiltering = true;
            activeColumn.DataField = "Active";
            activeColumn.UniqueName = "Active";
            activeColumn.HeaderText = "Active";
            activeColumn.HeaderStyle.VerticalAlign = VerticalAlign.Bottom;
            activeColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
            activeColumn.HeaderStyle.Width = Unit.Pixel(75);
            activeColumn.CurrentFilterFunction = GridKnownFunction.EqualTo;
            activeColumn.CurrentFilterValue = "true";
            activeColumn.Display = false;
            activeColumn.Visible = false;
            AlpsRadGridWorkflow.MasterTableView.Columns.Add(activeColumn);

            AlpsGridBoundColumn commentColumn = new AlpsGridBoundColumn();
            commentColumn.DataField = "Comments";
            commentColumn.UniqueName = "Comments";
            commentColumn.HeaderText = "Comments";
            commentColumn.HeaderStyle.VerticalAlign = VerticalAlign.Bottom;
            commentColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
            commentColumn.HeaderStyle.Width = 150;
            commentColumn.Display = false;
            AlpsRadGridWorkflow.MasterTableView.Columns.Add(commentColumn);
        }

John
Top achievements
Rank 1
 answered on 15 Jun 2016
5 answers
181 views

Hello,

I am adding many MapLayer and RadClientDataSource controls dinamically from server side like this: 

 

RadClientDataSource newDataSource = new RadClientDataSource();
newDataSource.DataSource.WebServiceDataSourceSettings.ServiceType = ClientDataSourceServiceType.GeoJSON;
newDataSource.DataSource.WebServiceDataSourceSettings.Select.Url = "GeoJsonConverter.ashx?id=" + SessionID;
newDataSource.DataSource.WebServiceDataSourceSettings.Select.DataType = ClientDataSourceDataType.JSON;
newDataSource.ID = SessionID;
Map.Controls.Add(newDataSource);

 

MapLayer mapLayer = new MapLayer();
mapLayer.Shape = "redMarker";
mapLayer.Type = LayerType.Shape;
mapLayer.Opacity = 1;
mapLayer.ClientDataSourceID = newDataSource.ID;
Map.LayersCollection.Add(mapLayer);

 

Everything is working as i expect but one thing, the CSS class for the markers being created are "pinTarget" and not my custom "redMarker"

In firebug i can see the css class for the markers added to every mapLayer is: "k-marker k-marker-pin-target"

when i was expecting: "k-marker k-marker-red-marker"

What am i doing wrong? 

 

Thanks for the support!

 

 

 

 

 

Casto
Top achievements
Rank 1
 answered on 15 Jun 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?