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

adjust the width to the grid

$
0
0
Hello Andre,

Thank you for writing.

The width of the group row is calculated dynamically while printing the control. The print layout can be customized with a custom renderer if you override the GetRowSize method: 
private void radButton1_Click(object sender, EventArgs e)
{
    MyGridPrintStyle style = new MyGridPrintStyle();
    this.radGridView1.PrintStyle = style;
    this.radGridView1.PrintPreview();
}
 
public class MyGridPrintStyle : GridPrintStyle
{
    protected override BaseGridPrintRenderer InitializePrintRenderer(RadGridView grid)
    {
        return new MyTableViewDefinitionPrintRenderer(grid);
    }
}
 
public class MyTableViewDefinitionPrintRenderer : TableViewDefinitionPrintRenderer
{
    public MyTableViewDefinitionPrintRenderer(RadGridView grid)
        : base(grid)
    { }
 
    Size rowSize = Size.Empty;
 
    protected override Size GetRowSize(GridViewRowInfo row, TableViewRowLayout rowLayout)
    {
        if (!(row is GridViewGroupRowInfo))
        {
            return base.GetRowSize(row, rowLayout);
        }
 
        if (this.rowSize == Size.Empty)
        {
            int width = 0;
            int height = rowLayout.GetRowHeight(row) + this.GridView.TableElement.RowSpacing;
 
            foreach (GridViewColumn col in rowLayout.RenderColumns)
            {
                if (col is GridViewRowHeaderColumn || col is GridViewIndentColumn)
                {
                    continue;
                }
 
                TableViewCellArrangeInfo info = rowLayout.LayoutImpl.GetArrangeInfo(col);
 
                if (info == null)
                {
                    continue;
                }
 
                int cellWidth = rowLayout.GetColumnWidth(col);
 
                if (width != 0)
                {
                    cellWidth += this.GridView.TableElement.CellSpacing;
                }
 
                width += cellWidth;
            }
 
            this.rowSize = new Size(width, height);
        }
 
        return this.rowSize;
    }
}

Generally speaking the group row in your screenshot should have a width equalling the width of the data row. In case you will be needing further assistance, please provide me with more information about your local setup and with details how the behavior on your end can be reproduced.

Regards,
Hristo
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.

Evaluating Report tool for WPF

$
0
0

I will post my question in this thread to not pollute the forums with all my problems.

First, the wpf component reportviewer is not enabled in my solution :(
During the installation of the trial, i first unchecked the 'visual studio integration' because in general i prefer to keep my visual studio installation as light as possible, but may be it's reason of my problem.

I've added the following reference to my project: Telerik.Reporting.dll, Telerik.Reporting.Wpf.dll and Telerik.ReportViewer.Wpf.Themes (all 3 are pointing on the 2019 trial installation)

But when in my Xaml, i start to write

<telerik:RadReport

or <telerik:Report the intellisense finds nothing.

There are already some telerik components on the test window but they are 2017 Telerik IU for wpf and the namespace currently declared is this one: xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"         

So, i made a try by using the Component Toolbox, but of course because of my choice during the installation, no telerik's components are registered. So i restart the Telerik Reporting installer and check the 'visual studio integration', but the toolbox stay empty.
So, i try to follow the procedure written there : https://docs.telerik.com/reporting/wpf-report-viewer-manual-setup#how-to-add-the-wpf-reportviewer-to-the-toolbox
But, the Telerik.ReportViewer.Wpf assembly is not listed in the components (i can see all the telerik UI for wpf ones but none for reporting). If i try to use the Browse  button to select the Telerik.ReportViewer.Wpf in my fresh installation of TelerikReporting, i have an error message saying :'There are no components in 'C:\Program Files (x86)\Progress\Telerik Reporting R1 2019\Bin\Telerik.ReportViewer.Wpf.dll' that can be placed on the toolbox.'

Ok it seems i have messed up my installation or there's something i don't understand.

What can i do ?

 

Regards,
Cédric Connes

RadEditor in Sitecore - pasteHtml changing the html

$
0
0
Hi Rumen,
Thanks for the reply. Unfortunately, disabling the filter did not solve the issue.

Kind Regards,
Maciej

Resign Keyboard of Autocomplete Textview

$
0
0
Hello,

I have an issue with keyboard,

I have a scenario like send Message to the Recipients, 

When i select any Token, keyboard will appear, and then i can not disappear keyboard with the *Return key*. I have to compulsory delete that Token for disappear the keyboard,

Even, AutocompleteTextView.ResignFirstResponder() not disappearing Keyboard.

So, If any one can help me on this, will be appreciated.

Thanks,

Evaluating Report tool for WPF

$
0
0

It'seems i have a conflict between the 2017 UI For WPF  and the 2019 Reporting dll : when i run the application i have an error saying : Inner Exception 1:
FileLoadException: Impossible de charger le fichier ou l'assembly 'Telerik.Windows.Controls.Navigation, Version=2019.1.116.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' ou une de ses dépendances. La définition trouvée du manifeste de l'assembly ne correspond pas à la référence de l'assembly. (Exception de HRESULT : 0x80131040)'

Is it possible to test the 2019 reporting without migrate the all the application ?

Regards,
Cédric

Reporting webapi report never stops loading

$
0
0
Hello Daniel,

We have previously observed a similar issue with Windows Server 2008 R2. We have related it to the worker threads on IIS.
In general, the requests to the REST Service initiating the report rendering and the actual report rendering are performed in different threads. On older IIS versions this may actually lead to the reporting thread being executed under the windows account running the IIS Worker Process instead of the account configured in the site App Pool. My guess is that the account running the IIS Worker Process does not have adequate permissions for the cache storage.
From the description, I infer that you use File storage. Could you test with another storage type?

The endless Get Document Info request may indicate that the reporting engine has stopped, for example, due to an unhandled Internal Server Error. I suggest attaching a Trace Listener to the Telerik Reporting REST Service project. It may give further insights into the problem.
You may consider opening a support ticket and attaching the generated log for local investigation.

Regards,
Todor
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

Span Spacing in Button Text

$
0
0
Hi Gregg,

The provided markup does not contain Kendo classes or widgets and as such should not be affected by our stylesheets. In the following dojo I see the expected behavior where the buttons are as wide as their texts and this is not related to the Kendo styles: https://dojo.telerik.com/@bratanov/ijukawUV and here's the same code with the R1 2019 version: https://dojo.telerik.com/@bratanov/ePoHUWEl. I'm also attaching below a screenshot that shows the expected results as a reference and so you can confirm if I am missing something.

With this in mind, it seems to me that there is a site-specific stylesheet that controls the layout of the buttons and this is the most likely place where a change has occurred - perhaps a teammate has made some changes there.

If this is not the case, could you modify the dojo above to showcase the way the Kendo codebase is used and the problem, so I can take a look?

On a side note, depending on the desired effect, the white-space rule may be a useful alternative to margins for rendering spaces as-is in the markup:

.tcov-button {
  white-space: pre-wrap;
   
}

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.

return multiple dataValueFields from single selction

$
0
0
Hello Gerald,

If the user has not selected anything, then there is no data the widget can provide. This is what the option label and required field validation avoid.

As soon as the user makes a selection, you can capture the secondary field.

If there is value pre-selected (e.g., because it comes as the value of the widget, or the value attribute of the DOM element), using the .dataItem() method of the dropdownlist widget in its dataBound event will give you the corresponding information. Here's a modification of the first example that showcases this: https://dojo.telerik.com/@bratanov/ojInOfuW/2.


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.

Multiselect. Part of string is hidden.

$
0
0

Step to reproduce:

1. Visit https://www.telerik.com/kendo-react-ui/components/dropdowns/multiselect/

2. Type in multiselect input "WWWWWWW" in upper case

 

Expected result: "WWWWWWW" is visible
Actual result: Part of string is hidden.

Lost mouse movement of RadRangeSelector during real time updating

$
0
0
Hi Kun,

Thank you for writing. The observed behavior is caused by the range selector which is trying to change the pan/zoom factors of the chart while at the same time it is being updated. In this kind of setup, I can suggest setting the UpdateMode property of the range selector to Deferred. With this setting, it will update the chart only one time upon releasing the mouse: 
Me.RadRangeSelector1.UpdateMode = RangeSelector.InterfacesAndEnum.UpdateMode.Deferred

You can also check the following documentation article providing additional information: https://docs.telerik.com/devtools/winforms/controls/rangeselector/properties-and-events.

I hope this will help. Let me know if you need further assistance.

Regards,
Hristo
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.

How to get arrow heads on x and y axis?

$
0
0
Hello, Rudi,        

By default, the axis in RadChartView doesn't show arrows. However, you can create a custom CartesianRenderer and add your custom drawing for the axis in the CartesianAxisDrawPart. You can find below a sample code snippet. Note that this is just a sample approach and it may not cover all possible cases. Feel free to modify it in a way which suits your requirement best: 



public RadForm1()
{
    InitializeComponent();
 
    this.radChartView1.CreateRenderer += new ChartViewCreateRendererEventHandler(radChartView1_CreateRenderer);
 
    LineSeries lineSeries = new LineSeries();
    lineSeries.DataPoints.Add(new CategoricalDataPoint(20, "Jan"));
    lineSeries.DataPoints.Add(new CategoricalDataPoint(22, "Apr"));
    lineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Jul"));
    lineSeries.DataPoints.Add(new CategoricalDataPoint(19, "Oct"));
    this.radChartView1.Series.Add(lineSeries);
    LineSeries lineSeries2 = new LineSeries();
    lineSeries2.DataPoints.Add(new CategoricalDataPoint(18, "Jan"));
    lineSeries2.DataPoints.Add(new CategoricalDataPoint(15, "Apr"));
    lineSeries2.DataPoints.Add(new CategoricalDataPoint(17, "Jul"));
    lineSeries2.DataPoints.Add(new CategoricalDataPoint(22, "Oct"));
    this.radChartView1.Series.Add(lineSeries2);
}
 
private void radChartView1_CreateRenderer(object sender, ChartViewCreateRendererEventArgs e)
{
    e.Renderer = new CustomCartesianRenderer(e.Area as CartesianArea);
}
 
public class CustomCartesianAxisDrawPart : CartesianAxisDrawPart
{
    public CustomCartesianAxisDrawPart(CartesianAxis axis, IChartRenderer renderer) : base(axis, renderer)
    {
    }
 
    int arrowOffset = 50;
 
    protected override RectangleF GetClipRect()
    {
        RectangleF rect = base.GetClipRect();
        if (rect.Height < rect.Y)
        {
            return new RectangleF(rect.X, rect.Y - arrowOffset, rect.Width, rect.Height * 4);
        }
        return rect;
    }
 
    protected override void DrawAxis()
    {
        AxisModel model = this.Element.Model;
        RadRect slot = model.LayoutSlot;
        float x1, x2, y1, y2;
 
        // update line points
        if (model.Type == AxisType.First)
        {
            x1 = this.ViewportOffsetX + (float)slot.X;
            x2 = this.ViewportOffsetX + (float)slot.Right;
 
            if (model.VerticalLocation == AxisVerticalLocation.Bottom)
            {
                y1 = this.ViewportOffsetY + (float)slot.Y;
                y2 = this.ViewportOffsetY + (float)slot.Y;
            }
            else
            {
                y1 = this.ViewportOffsetY + (float)slot.Bottom;
                y2 = this.ViewportOffsetY + (float)slot.Bottom;
            }
        }
        else
        {
            y1 = this.ViewportOffsetY + (float)slot.Y;
            y2 = this.ViewportOffsetY + (float)slot.Bottom;
            if (model.HorizontalLocation == AxisHorizontalLocation.Left)
            {
                x1 = this.ViewportOffsetX + (float)slot.Right;
                x2 = this.ViewportOffsetX + (float)slot.Right;
            }
            else
            {
                x1 = this.ViewportOffsetX + (float)slot.X;
                x2 = this.ViewportOffsetX + (float)slot.X;
            }
        }
 
        CartesianRenderer renderer = (CartesianRenderer)this.Renderer;
        RadGdiGraphics radGraphics = new RadGdiGraphics(renderer.Graphics);
        RectangleF rect = ChartRenderer.ToRectangleF(model.LayoutSlot);
 
        SizeF offset = ((CartesianRenderer)this.Renderer).GetAxisOffset((CartesianAxis)this.Element);
 
        GraphicsPath borderPath = new GraphicsPath();
        borderPath.AddLine(x1 + offset.Width, y1 + offset.Height, x2 + offset.Width, y2 + offset.Height);
 
        if (y1 == y2)//the horizontal axis
        {
            int arrowOffset = 50;
 
            radGraphics.DrawLine(Color.Black, x2 + offset.Width - arrowOffset / 2, y2 + offset.Height + arrowOffset / 4, x2 + offset.Width, y1 + offset.Height);
            radGraphics.DrawLine(Color.Black, x2, y1, x2 - arrowOffset / 2, y2 - arrowOffset / 4);
        }
 
        BorderPrimitiveImpl border = new BorderPrimitiveImpl(this.Element, null);
        border.PaintBorder(radGraphics, null, borderPath, rect);
    }
}
 
public class CustomCartesianRenderer : CartesianRenderer
{
    public CustomCartesianRenderer(CartesianArea area) : base(area)
    {
    }
 
    protected override void InitializeAxes()
    {
        // base.InitializeAxes();
        IEnumerator<Axis> axisEnumerator = this.Area.Axes.GetRenderEnumerator();
        while (axisEnumerator.MoveNext())
        {
            this.DrawParts.Add(new CustomCartesianAxisDrawPart((CartesianAxis)axisEnumerator.Current, this));
            this.DrawParts.Add(new AxisLabelDrawPart(axisEnumerator.Current, this));
            this.DrawParts.Add(new AxisTitleDrawPart(axisEnumerator.Current, this));
        }
    }
}

Off topic, note that most of the forum threads are reviewed by Telerik representatives and sometimes we address the questions asked by our customers in the forums as well. However, a post in the forum doesn't guarantee you a response from the Telerik support team. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
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.

unable to get report parameters iis

$
0
0

Hello Todor

OutOfProcess or InProc same result

SetCompatibilityVersion(CompatibilityVersion.Version_2_1) same result

Use the report as a trdp file in wwwroot/reports same result

the only think that works is to use a report server

unable to get report parameters iis

$
0
0

Hello Todor

OutOfProcess or InProc same result

SetCompatibilityVersion(CompatibilityVersion.Version_2_1) same result

Use the report as a trdp file in wwwroot/reports same result

the only think that works is to use a report server

Move ListBox items on double click

$
0
0
Hi, I think I might now have been clear above.  I'm good with the double click confirmation, that works fine.  My issues now is I also want to add the remove button to the ListBox, but it seems as though the item is removed before I can even ask for the user to confirm.  I tried using e.preventDefault in a function I call from the .Remove() method, but then it won't remove it at all no matter what the user chooses on the confirm, and it also then won't allow the Remove from the double click.

Treelist - Repeated rend tempalte after filtering

$
0
0
Hello Wei,

As the Kendo UI for Vue are wrappers, there might be certain scenarios where utilizing native Vue templates through single-file components is not possible. In such cases, you could use the standard kendo templates to workaround this limitation. Here is an updated Dojo example where the issue with the duplicated buttons is resolved by using kendo templates:


The above scenario will work with a native Vue implementation of the components. We have released a beta version of native Vue Grid with the 2019 R1 release which you could check out here: 


I would encourage you to vote for the Native Vue Components Feedback Item and leave your feedback so that we are able to determine the demand for implementing a fully featured native Vue suite.

Regards,
Dimitar
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

WPF Aplication - handling dialog

$
0
0

Hi, 

My problem concerns handling OpenFileDialog. I have a TestMethod that consists of 3 separate methods (e.g. A,B and C) which are doing next steps of whole process. Step C should handle OpenFileDialog and it does this when acts as a separate test but when I run everything in one test, the step C can't handle OpenFileDialog. Sometimes it happens that it will catch and handle this window, but in most cases it throws a exception (System.TimeoutException:...). I tried to use in different combinations Thread.Sleep but it doesn't work. Can it depend on the duration of the test? When I run each test individually, everything is fine all works as it should. 

var dialog = OpenFileDialog.CreateOpenFileDialog(Manager.Current.ActiveApplication, button, path, windowTitle);

Manager.Current.DialogMonitor.AddDialog(dialog);
Manager.Current.DialogMonitor.Start();
ClickAndWait(buttonClickName);
dialog.WaitUntilHandled();
Manager.Current.DialogMonitor.Stop();

 

I would like to emphasize once again that everything works when it performs as a single test
Best Regards

Datagridview selected row to Radgridview

$
0
0
Hello, George,        

If I understand your requirement correctly, you need to set the same selected row in RadGridView as the selection in DataGridView. For this purpose I can suggest you to extract a unique cell's value from the selected row in the DataGridView, e.g. ID column. Then, iterate the Rows collection in RadGridView and compare the respective cell's value with the extracted one. If you find the relevant row in RadGridView, you can mark it as selected. The following help article is quite useful about selecting rows in RadGridView: https://docs.telerik.com/devtools/winforms/controls/gridview/rows/selected-rows-and-current-row 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
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.

RadEditor in Sitecore - pasteHtml changing the html

$
0
0
Hi Maciej,

In this case, I can see two different approaches:
  • contact Sitecore support and ask them how you can upgrade the Telerik.Web.UI.dll to the latest version in their CMS system - this is the recommended approach since we can implement fixes for the upcoming versions only. Please check out this article: Bug Fixes.
  • or override the applyFix or _fixNestedParagraphs functions on your own and resolve the issue in the older version:


    <script>
        var BLOCK_ELEMENTS = "div,table,ol,ul,h1,h2,h3,h4,h5,h6,hr";
        var PARAGRAPH = "p";
        var ANCHOR = "a";
        var browser = Telerik.Web.Browser;
        var $T = Telerik.Web.UI;
        var $E = $T.Editor;
     
        $E.NestedElementsFix.prototype.applyFix = function (elements) {
            alert(1)
            var that = this;
     
            that.blockElements = elements || that.getBlockElements();
     
            // for example comment out some of the functions
            //that._fixNestedParagraphs();
            //that._unwrapBlockElements();
        }
     
        //or override the functionality inside the _fixNestedParagraphs one
        $E.NestedElementsFix.prototype._fixNestedParagraphs = function () {
            var context = this.context;
            var paragraphs = null;
            if (utils.isEditorContentArea(context)) {
                paragraphs = context.getElementsByTagName(PARAGRAPH);
            }
            else {
                var parentBlockElement = this._getParentBlockElement(context);
                if (utils.isTag(parentBlockElement, PARAGRAPH)) {
                    paragraphs = [parentBlockElement];
                }
            }
     
            if (!paragraphs) {
                return;
            }
     
            for (var i = paragraphs.length - 1; i >= 0; i--) {
                var parentParagraph = paragraphs[i],
                    $childParagraphs = this._getParagraphs(parentParagraph);
                for (var j = $childParagraphs.length - 1; j >= 0; j--) {
                    this._unwrapElement($childParagraphs[j], parentParagraph);
                }
                if ($childParagraphs.length && utils.isNodeEmptyRecursive(parentParagraph)) {
                    this._removeBlockElement(parentParagraph);
                }
            }
        }
    </script>
    <telerik:RadEditor ID="RadEditor1" runat="server">
        <Content>
            <blockquote>
                <p>Quote Text</p>
            </blockquote>
            <cite>Quote Author</cite>
        </Content>
    </telerik:RadEditor>


Regards,
Rumen
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.

Cascading From DropDownListFor to a MultiSelectFor

$
0
0

I have found many examples of cascading from DropDownListFor to DropDownListFor using the CascadeFrom() event. However, I need to get a similar effect from using a DropDownListFor to a MultiSelectFor. Since the MultiSelectFor does not have the CascadeFrom() event,  how would I go about making it work? 

Example
- The user selects an item from the DropDownListFor.
- The MultiSelectFor DataSource will be updated based on the selected item of the DropDownListFor.
- The MultiSelectFor will be enabled/disabled based on DropDownListFor.

Found the following JS sample but it does not seem to really apply to asp.net core.
https://docs.telerik.com/kendo-ui/controls/editors/multiselect/how-to/cascade/cascade-from-ddl


Any help will be greatly appreciated.

EditForm Template editedItem FindControl doesn't work

$
0
0

Hi,

I am still not able to resolve my problem of getting new values in the textbox (OPR COUNT) of edit form template. It keeps giving me the actual value instead of user entered or new value. Below is my code. I also attached the ASPX side of the page. 

If e.CommandName = "Update" Then
            Try
                If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then
                    Dim editedItem As GridEditableItem = TryCast(e.Item, GridEditableItem)
                    Dim OprCount As TextBox = CType(editedItem.FindControl("txtOprCount"), TextBox)
                    Dim strRcvCount As String = OprCount.Text

                    Dim strUserName As String = Session("USERNAME")
                    Dim strSYSID As String = rgRtnDetail.MasterTableView.DataKeyValues(e.Item.ItemIndex)("SYS_ID")

                    strSQlData = "EXECUTE SP_IB_RETURNS_DET_UPDATE '" & strUserName & "' ,'" & strSYSID & "', '" & strRcvCount & "'"

                    Dim errcode As String
                    Dim nRecCount As Integer

                    Dim myCommand As New SqlCommand(strSQlData, oConn)
                    Dim da = New SqlDataAdapter(strSQlData, oConn)
                    Dim ds = New DataSet
                    da.Fill(ds, "ERROR")
                    dt = ds.Tables(0)
                    nRecCount = dt.Rows.Count

                    Response.Redirect(Request.RawUrl)
                End If
            Catch ex As Exception
                RadWindowManager1.RadAlert("Problem Updating the Record!", 250, 150, "ERROR", "")
            End Try
        End If

Viewing all 94857 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>