Quantcast
Channel: Telerik Forums RSS
Viewing all 94857 articles
Browse latest View live

Evaluating Report tool for WPF

$
0
0

Hi,
I did not manage to find usefull samples explaining how to use reporting with WPF and of course in a mvvm manner.

Can you provide me some urls ?
My first test is to construct a report using CrossTab as recommended by Todor and bind it to the business object used in the screenshot i provided in my initial post and i didn't get it

Regards

Cédric


How can I switch to focus a radtabsrip with a validation error

$
0
0
Hello Jenny,

I'd suggest you use a wizard so the user can't move to the next part of the form until the validation is satisfied: https://demos.telerik.com/aspnet-ajax/wizard/functionality/validation/defaultcs.aspx. You can find more details on how the validation works in the wizard in the following article: https://docs.telerik.com/devtools/aspnet-ajax/controls/wizard/functionality/validation.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.

RC VS 2019 Preview 2

$
0
0

I am trying to use Telerik UI for Blazor with Razor Components in VS 2019 Preview 2 and looks like it doesnt work. I get error:

ErrorCS0103The name 'context' does not exist in the current

When using this:

    <KendoGrid Data=@forecasts Pageable=true PageSize=5 Sortable=true>
        <KendoGridColumn Field=@nameof(WeatherForecast.Date)>
            <Template>
                @($"{(context as WeatherForecast).Date:d}")
            </Template>
        </KendoGridColumn>
        <KendoGridColumn Field=@nameof(WeatherForecast.TemperatureC) />
        <KendoGridColumn Field=@nameof(WeatherForecast.TemperatureF) />
        <KendoGridColumn Field=@nameof(WeatherForecast.Summary) />
    </KendoGrid>

Also if not using Template column the app runs but the grid is not displayed.

Is there any workaround or when is expected to have a version working with VS 2019 Preview 2?

Reccurrent events: How to identify "serie" or "occurrence"

$
0
0

Hi

I'm trying to add different behaviors if the user click "Delete/Edit serie" or "Delete/Edit occurrence". I will like to know if there is a way (I know you have it ;)) to know which option the user select in the "dialog".

Thank you in advance!!

row custom background color disappears on expand/collapse of treelist

$
0
0
Hi,
I am using Kendu TrreList with 4 level data. Now i want to have different row background color for each level.
e.g., If expand parent row then all the child rows background color should be different. And further any child has its own children & expansion of it, all the sub-child rows should be in different color.

Cascading From DropDownListFor to a MultiSelectFor

$
0
0

I figured it out but if you guys come up with a better solution please share.

In the DropDownListFor, define the Cascade event

@(Html.Kendo().DropDownListFor(x => x.AppList[i].SelectedRestrictionId)
             .DataTextField("RestrictionDescr")
             .DataValueField("RestrictionId")
             .OptionLabel("-- Select --")
             .DataSource(source =>
             {
                  source.Read(read =>
                  {
                       read.Action("GetAppRestrictions", "User");
                  })
                 .ServerFiltering(true);
             })
             .Enable(false)
             .AutoBind(false)
             .HtmlAttributes(new { id = "appRestrictionList", style = "width: 100%;" })
             .Events(e =>
             {
                  e.Cascade("RestrictionChange");
             })
)

 

In the MultiSelectFor, define the DataSource

@(Html.Kendo().MultiSelectFor(x => x.AppList[i].SelectedRestrictions)
      .DataTextField("ResValDescr")
      .DataValueField("ResValId")
      .Placeholder("Select Values...")
      .HtmlAttributes(new { id = "RestrictionValueList" })
      .DataSource(source =>
      {
            source.Read(read =>
            {
                   read.Action("GetRestrictionValueList", "User");
            })
            .ServerFiltering(true); ;
      })
      .Enable(false)
      .AutoBind(true)
)

In the script, call the DataSource and enable/disable the MultiSelectFor

function RestrictionChange(e) {
 
        var dataItem = this.dataItem(e.item);
        var multiselect = $("#RestrictionValueList").data("kendoMultiSelect");
        
        // If has a RestrictionId, call the DataSource on the server
        if (dataItem.RestrictionId) {
            multiselect.dataSource.read({ ResId: dataItem.RestrictionId });
            multiselect.enable(true);
        }
        else {
            multiselect.value([]);
            multiselect.enable(false);
        }
}

Delete Account

$
0
0
Hi,

I do not have the ability to delete your data from my side. This is handled by our legal team. In order to make sure we fulfill your request you will need to click on the link provided by Courtney below and then select "GDPR Data Subject Access Request". Once you fill our the request it will be handled appropriately per compliance with GDPR.

Regards,
Christian
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

font of Axes label

$
0
0

I converted:

LinearAxis horizontalAxis = radChartView1.Axes.Get<LinearAxis>(0);
horizontalAxis.Title = "Axis' title";
horizontalAxis.Font= newFont("Arial",12f, FontStyle.Italic);

 

to:

DimHA AsLinearAxis = DashBoard.chtNewDayAvg.Axes.[Get](Of LinearAxis)(0)
DimAL AsAxisLabelElement = DirectCast(HA.Children(1), AxisLabelElement)
AL.ForeColor = Color.White
IfRecHasData(Counts) Then
    'Play with the 30 day rolling avg.
    DashBoard.chtNewDayAvg.ShowLegend = False
    DashBoard.chtNewDayAvg.Series(0).DataPoints.Clear()
    'Not sure about the areas
    ForI AsInteger= 0 ToUB(Counts)
        DimStatuses AsNewList(Of String)
        Statuses.AddRange(Split(GetFromSet(Counts, 1, I), Separator2))
        DimAssetsDown AsInteger= 0
        ForII AsInteger= 0 ToStatuses.Count - 1
            DimVal AsInteger
            Integer.TryParse(Statuses(II).Split(Separator)(AssetTypeSlot), Val)
            SelectCaseStatuses(II).Split(Separator)(0)
                Case"Down"
                    AssetsDown += Val : IfVal > MaxDwn ThenMaxDwn = Val
                Case"Repairing"
                    AssetsDown += Val : IfVal > MaxDwn ThenMaxDwn = Val
            EndSelect
        Next
        DimDT AsString= FMDB(GetFromSet(Counts, 0, I), False).ToShortDateString
        DimP AsNewCategoricalDataPoint(AssetsDown, DT)
        P.Label = AssetsDown
        DashBoard.chtNewDayAvg.Series(0).DataPoints.Add(P)
    Next
    DimHA AsLinearAxis = DashBoard.chtNewDayAvg.Axes.[Get](Of LinearAxis)(0)
    DimAL AsAxisLabelElement = DirectCast(HA.Children(0), AxisLabelElement)
    AL.ForeColor = Color.White
EndIf

HA is nothing, so I get an Object Reference error on the second line where it tries to get the children.

You example was to adjust the font for a specific horizontal label.  I just want to set the ForeColor for all of them.  This is the code I'm using to populate the Graph with data.

 


Use GridBoundColumn value as DefaultInsertValue for Detail Table

$
0
0
Sorry for such a late response, project got pulled in a different direction.  I tested out approach #1 with the links you provided on how to get the relevant information and its working great!  Thanks so much for your help.

Delete Account

$
0
0
Hi,

Hello,

Thank you for contacting us about your GDPR request.  

Progress takes your data privacy very seriously.  We understand that you have certain rights under GDPR and we are committed to helping you exercise those rights.  The link below will take you to our Privacy Center, where you can submit your request in an easy, user-friendly format though our Data Subject Access Rights Request page.  It is important for you to submit your request through this page so we can track it and ensure that we respond appropriately.  

When submitting your request, please be sure to provide complete and accurate information to help us complete your request as efficiently as we can.  In particular, please make sure to provide all names and email addresses that Progress may have for you.

FYI, the Privacy Center also contains more information about Progress’ commitment to protecting your personal data, including our Privacy Policy.

https://www.progress.com/legal/privacy-center 

Thank you. 
 


Regards,
Christian
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

hasChanges not working in IE

$
0
0

I have an issue where a grid's datasource hasChanges function is not working in IE, but does work in Chrome.

When leaving the page, I check to see if there are changes to the grid's data source, and if there are changes I prompt to make sure they want to leave with unsaved changes.  In this example, I save changes successfully and the hasChanges still returns true after the save is complete. 

 

Controller update function:

[AcceptVerbs(HttpVerbs.Post)]
publicActionResult Minimum_Create([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<MinimumsViewModel> records)
{
    try{
        CDIWholesaleServiceClient client = newCDIWholesaleServiceClient();
        if(records.Any())
        {
            foreach(var record inrecords)
            {
                record.contractID = int.Parse(Request["globalContractID"]);
                var input = WholesaleDataMapper.ConvertMinimumRate(record);
                var output = client.InsertMinimumRate(input);
                record.id = output.MinimumID;
            }
        }
 
        returnJson(records.ToDataSourceResult(request, ModelState));
    }
    catch(Exception ex)
    {
        ModelState.AddModelError("Minimum Creation Error", ex.Message);
        returnJson(records.ToDataSourceResult(request, ModelState));
    }
 
}

 

 

Client Code:

functiongoodbye(e) {
    varminimumsGrid = $('#MinimumsGrid').data().kendoGrid;
    if(minimumsGrid.dataSource.hasChanges()
    ) {
        LeavingUnsavedNotify(e);
    }
}
window.onbeforeunload = goodbye;
 
@(Html.Kendo().Grid<WholesaleWeb.Models.MinimumsViewModel>(Model.minimums)
                                                .Name("MinimumsGrid")
                                                .Columns(columns =>
                                                {
                                                    columns.Command(command => command.Destroy()).Width(90);
                                                    columns.ForeignKey(x => x.timeUnitID, Model.minimumsTimeUnits, "Key", "Value").Title("Time Unit").Width(100);
                                                    columns.ForeignKey(x => x.qtyTypeID, Model.minimumsQtyTypes, "Key", "Value").EditorTemplateName("MinimumsQuantityType").Title("Qty Type").Width(100);
                                                    columns.ForeignKey(x => x.unitID, Model.minimumsByTypes, "Key", "Value").EditorTemplateName("MinimumsBy").Title("By").Width(100);
                                                    columns.Bound(x => x.minDollarAmt).EditorTemplateName("PositiveNumber").Title("Min").Width(80);
                                                    columns.Bound(x => x.feePerExam).EditorTemplateName("PositiveNumber").Title("Fee Per Exam").Width(120).Editable("feePerExamEditable");
                                                })
                                                .Editable(editable => editable.Mode(GridEditMode.InCell))
 
                                                .Pageable()
                                                .Navigatable()
                                                .Reorderable(reorder => reorder.Columns(true))
                                                .Sortable()
                                                .Scrollable()
                                                .Editable(editable => editable.DisplayDeleteConfirmation(true))
                                                .Resizable(resize => resize.Columns(true))
 
                                                .ToolBar(toolbar =>
                                                {
                                                    toolbar.Create();
                                                })
 
                                                .DataSource(dataSource => dataSource
                                                    .Ajax()
                                                    .Batch(true)
                                                    .PageSize(10)
                                                    .ServerOperation(false)
                                                    .Events(events => events.Error("error_handler").RequestEnd("MinimumRates_End"))
                                                    .Model(model =>
                                                    {
                                                        model.Id(x => x.id);
                                                    })
                                                    .Create(create => create.Action("Minimum_Create", "Wholesale").Data("getGlobalContractID"))
                                                    .Update(update => update.Action("Minimum_Update", "Wholesale").Data("getGlobalContractID"))
                                                    .Destroy(destroy => destroy.Action("Minimum_Destroy", "Wholesale").Data("getGlobalContractID"))
                                                )
                                                .HtmlAttributes(new{ style = "width:100%"})
                                )

 

Fiddler firewall rule

$
0
0
Thank you for your reply. I appreciate it. Have a great day!

Event for _dataItem bound?

$
0
0

I have a usercontrol as my edit form, and a property called DataItem that gets bound, one item of which is called ItemID and is bound to a HiddenField. 

<asp:HiddenFieldID="itemID"runat="server"Visible="false"Value='<%# DataBinder.Eval(Container, "DataItem.ItemID") %>' />

Everything seems good, form renders. I have two controls I call by button click, and in those handlers I can get the value of the HiddenField ItemID to pass its value along in a url.

"&ItemID=" & itemID.Value.ToString() &

 

The problem comes in when in Page_Load, I want to restrict whether to show these controls or not by the value of ItemID.  In Page_Load, itemID.Value is empty, presumably because the page hasn't loaded yet, and while _dataItem seems to exist, it has no fields yet.  Is there an event I can tie into to say 'run this after _dataItem has been bound'? There is OnDataBound, but the note on the documentation page says only useful with client side data binding and my solution uses NeedsDataSource.

font of Axes label

$
0
0

Nevermind.  Set the forecolor using this:

DashBoard.chtNewDayAvg.Series(0).Axes(0).ForeColor = Color.White

DashBoard.chtNewDayAvg.Series(0).Axes(1).ForeColor = Color.White

textwrap in cardView

$
0
0

Hi, 

Just one more question.

If I want to format item forecolor with condition of its data, for example. I have item that hold a number, if this number is lower than 50 I want to color it with red else black.

Can this be done in CardView?

Best Regards,

Omar

 


Setting mouse pointer style on legend

$
0
0

Hi Rumen,

Thanks for the helpful information. I couldn't get the CSS example to work for me, but the second example worked perfectly.

Best wishes,

Dan

Migration from RadDragDropManager to DragDropManager

$
0
0
I've ready through the migration guide, overview, and DragDropPayloadManager guides, but there is still not enough information to migrate my existing code.Even the migration guide isn't sure which event maps to which event (see attached photo).

Can someone familiar with making the migration help me port over this code since basically everything has changed?

        public void OnDragInfo(object sender, DragDropEventArgs e)
        {
            if (e.Options.Status == DragStatus.DropImpossible && DragCue != null)
            {
                DragCue.Background = DropImpossibleBackground;
                DropIndicator.Opacity = 0;
            }
            else if (DragCue != null)
            {
                DragCue.Background = DropPossibleBackground;

                DropIndicator.HorizontalOffset = e.Options.CurrentDragPoint.X - e.Options.RelativeDragPoint.X;
                DropIndicator.VerticalOffset = e.Options.CurrentDragPoint.Y - e.Options.RelativeDragPoint.Y + DropIndicator.Height;
                Debug.WriteLine(e.Options.CurrentDragPoint);
                DropIndicator.Opacity = 100;
            }
        }

        public void OnDragQuery(object sender, DragDropQueryEventArgs e)
        {
            GridViewRow row = sender as GridViewRow;

            e.QueryResult = RadDragAndDropManager.GetAllowDrag(row) &&
                (e.Options.Destination == null || e.Options.Destination is GridViewRow);

            if ((e.QueryResult ?? false) && e.Options.Status == DragStatus.DragQuery)
            {
                e.Options.Payload = row?.DataContext;
            }
        }

        public void OnDropInfo(object sender, DragDropEventArgs e)
        {
            object item = e.Options.Payload;
            GridViewRow source = e.Options.Source as GridViewRow;
            GridViewRow destination = e.Options.Destination as GridViewRow;

            if (source != null && destination != null && AssociatedObject.Items.Contains(item) && e.Options.Status == DragStatus.DragComplete)
            {
                int index = AssociatedObject.ItemContainerGenerator.IndexFromContainer(destination);

                ((IList) AssociatedObject.ItemsSource).Remove(item);

                ((IList) AssociatedObject.ItemsSource).Insert(index, item);

                if (!ItemsSourceSupportNotifications)
                {
                    AssociatedObject.Rebind();
                }

                DropIndicator.IsOpen = false;
            }

            if (e.Options.Status == DragStatus.DragCancel)
            {
                DropIndicator.IsOpen = false;
            }
        }

        public void OnDropQuery(object sender, DragDropQueryEventArgs e)
        {
            GridViewRow targetRow = e.Options.Destination as GridViewRow;

            if (targetRow != null)
            {
                e.QueryResult = targetRow.GridViewDataControl == AssociatedObject;
            }
            else
            {
                e.QueryResult = false;
            }
        }

Xamarin Forms

$
0
0
Hi Nethra,

There could be a lot of reasons why it doesn't build (missing SDKs, etc), but none of them would be missing Telerik resources as long as you have that specific version of Telerik UI for Xamarin installed (2017.3 is more than a year old) and the Telerik references are resolved. The build output will tell you what went wrong.

Alternatively, if you're using newer version, you can instead use the demo repos to view the code instead - https://docs.telerik.com/devtools/xamarin/sdk-browser-overview#developer-focused-examples

If you wanted to see the app running on your phone, look up "Telerik Xamarin UI" in the App Store, Google Play or Microsoft Store to install the demos from the store.

Regards,
Lance | Technical Support Engineer, Principal
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

Dynamic in cell editing?

$
0
0
Is it possible to use the Edit command API to dynamically change the cell content to my own custom editor?  I would like my datagrid to look like everything is a text cell, but when I double click a cell, I want a custom editor control to appear as the cell content instead.  The user then uses the custom editor control to change the value, and then when he commits the edit, the dynamic custom editor control disappears and I see the text cell again, but with the new value.  I think this is how the normal editing commands work on the data grid, but I want to use my own custom editors instead of the default ones.

Context menu is displaced (two grid, two menus)

$
0
0

Have a grid and context menu defined in a partial view.  When the grid is positioned where the page is scrolled to the top then the context menu opens at point of right mouse click.  But as soon as page is scrolled down and grid is partially moved up and hidden from view, then the context menu is not positioned correctly on the y axis.

 

@using Kendo.Mvc.UI

@using NEP_Deconstruction.Data
@{
    const string ValuesSuffix = "-Values";
}

@(Html.Kendo().Grid<NEP_Deconstruction.Data.Models.ApprovalViewModel>()
                    .Name("approval_grid")
                    .Columns(columns =>
                    {
                        columns.Bound(o => o.ID)
                            .EditorTemplateName("IntegerReadonly");
                        columns.Bound(o => o.ApprovalNumber)
                            .EditorTemplateName("IntegerReadonly");
                        columns.Bound(o => o.SourceCount)
                            // other column definitions
                        columns.Bound(o => o.Comment);

                        columns.Command(command =>
                        {
                            command.Edit().Text(" ").IconClass("k-icon k-i-edit").HtmlAttributes(new { style = "min-width: auto" });
                            command.Destroy().Text(" ").IconClass("k-icon k-i-delete").HtmlAttributes(new { style = "min-width: auto" });
                        }).Width(/*210*/ 125);
                    })
                    .ToolBar(toolbar => { toolbar.Create(); /*toolbar.Save();*/ })
                    .Editable(editable =>
                    {
                        editable.TemplateName("ApprovalPopupEditor");
                        editable.Mode(GridEditMode.PopUp);
                    })
                    .Resizable(c => c.Columns(true))
                    .Reorderable(c => c.Columns(true))
                    .Filterable()
                    .Groupable()
                    .Pageable(p => p.Numeric(false).PreviousNext(false))
                    .Selectable()
                    .Sortable()
                    .Scrollable(scrollable => scrollable.Virtual(true).Endless(true))
                    .ColumnMenu()
                    .HtmlAttributes(new { style = "height:430px;" })
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .Batch(true)
                        .PageSize(100)
                        .ServerOperation(true)
                        .Events(events => events.Error("error_handler")
                                                .RequestStart("approval_grid_requeststart"))
                        .Model(model =>
                        {
                            // ***
                            // various default values set
                        })
                        .Read(read => read.Action("Read", "Approval"))
                        .Create(create => create.Action("Create", "Approval"))
                        .Update(update => update.Action("Update", "Approval"))
                        .Destroy(destroy => destroy.Action("Destroy", "Approval"))
                    )
                    .Events(events => events.Change("approval_grid_change")
                                            .DataBound("approval_grid_databound")
                                            .Edit("approval_grid_edit")
                                            .Save("approval_grid_save"))
)
@(Html.Kendo().ContextMenu()
                    .Name("approval_menu")
                    .Target("#approval_grid")
                    .Filter("tr[role='row']")
                    .Orientation(ContextMenuOrientation.Vertical)
                    .Items(items =>
                    {
                        items.Add()
                        .Text("Refresh");
                        //.ImageUrl(Url.Content("~/shared/web/toolbar/reply.png"))
                        items.Add()
                        .Text("Edit");
                        items.Add()
                        .Text("Delete");
                    })
                    .Events(e => e.Select("approval_menu_select"))
)

 

Viewing all 94857 articles
Browse latest View live