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

Accessing the Selected DataText and DataValue withing an Event Script

$
0
0
Hello Kevin,

I already provided an answer to the same question in a ticket.

I will share the approach in the thread, so more people can benefit from it:

"
The desired result can be achieved on the change(or another custom) event, by retrieving first the selected element, and then based on the selected element to retrieve the information for the dataItem associated with that line:

function onChange(e) {
    var element = e.sender.select();
    var dataItem = e.sender.dataItem(element[0])
    console.log(dataItem)//In the application dataItem.AccountID should return the desired value
}


http://docs.telerik.com/kendo-ui/api/javascript/ui/listbox#methods-select

http://docs.telerik.com/kendo-ui/api/javascript/ui/listbox#methods-dataItem
"


Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.

RowDetail height problem

$
0
0

Did some additional investigation starting from the 'Self-Reference Hierarchy' example in the telerik UI for WPF Demos.

Instead of generating the data in code, we used a database to get our data from.

It seems there is a hardcoded maximum rowheight for each row?

 

The only code we've added is the following code in the DataLoading function as we need more then 1 hierarchical level

TableRelation r = newTableRelation();
r.IsSelfReference = true;
r.FieldNames.Add(newFieldDescriptorNamePair("LocationID", "UpperLocationID"));
dataControl.ChildTableDefinitions.Add(newGridViewTableDefinition() { Relation = r });

Code Example

voidRadGridView1_RowLoaded(objectsender, RowLoadedEventArgs e)
{
    GridViewRow row = e.Row asGridViewRow;
    TblLstLocation employee = e.DataElement asTblLstLocation;
 
    if(row != null&& employee != null)
    {
        row.IsExpandable = this.HasSubordinates(employee);
    }
}
 
privateboolHasSubordinates(TblLstLocation employee)
{
    return
    (from emp in(IEnumerable<TblLstLocation>)this.RadGridView1.ItemsSource
     where emp.UpperLocationID == employee.LocationID
     select emp).Any();
}
 
privatevoidRadGridView1_DataLoading(objectsender, GridViewDataLoadingEventArgs e)
{
    GridViewDataControl dataControl = (GridViewDataControl)sender;
    if(dataControl.ParentRow != null)
    {
        dataControl.BorderThickness = newThickness(0, 1, 0, 1);
        dataControl.GridLinesVisibility = GridLinesVisibility.None;
        dataControl.ShowGroupPanel = false;
        dataControl.AutoGenerateColumns = true;
        dataControl.CanUserFreezeColumns = false;
        dataControl.IsReadOnly = true;
        dataControl.ChildTableDefinitions.Clear();
 
        TableRelation r = new TableRelation();
        r.IsSelfReference = true;
        r.FieldNames.Add(newFieldDescriptorNamePair("LocationID", "UpperLocationID"));
        dataControl.ChildTableDefinitions.Add(new GridViewTableDefinition() { Relation = r });
 
        //GridViewDataColumn column = new GridViewDataColumn();
        //column.DataMemberBinding = new Binding("EmployeeID");
        //dataControl.Columns.Add(column);
 
        //column = new GridViewDataColumn();
        //column.DataMemberBinding = new Binding("FirstName");
        //dataControl.Columns.Add(column);
 
        //column = new GridViewDataColumn();
        //column.DataMemberBinding = new Binding("LastName");
        //dataControl.Columns.Add(column);
 
        //column = new GridViewDataColumn();
        //column.DataMemberBinding = new Binding("Title");
        //dataControl.Columns.Add(column);
    }
}

MVC Kendo Treemap Data

$
0
0
Hello Stefan,

The Kendo UI TreeMap can be used with the standard C# List.

For example, if we have a model with value and text, the TreeMap can receive the following:

public static List<TreeMapValue> treeMapValue = new List<TreeMapValue>();
 
        static HomeController()
        {
            treeMapValue.Add(new TreeMapValue { ID = 1, Value = 10, text = "custom" });
        }
......
 
public ActionResult GetTreeMapValues([DataSourceRequest] DataSourceRequest dsRequest)
        {
            var result = treeMapValue.ToDataSourceResult(dsRequest);
            return Json(result);
        }

I hope this is helpful.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.

Bar Series does not redraw in iOS, Is there any method that can be used to refresh/redraw?

$
0
0
Hi Ram,

Please, use the following approach -- clear the series source explicitly before assigning the new one:
chart.Series[0].ItemsSource = null;
chart.Series[0].ItemsSource = GetCategoricalData();
chart.VerticalAxis = new NumericalAxis();

In addition, please make sure you use the latest release -- version 2017.2.626.

Best regards,
Ves
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

Property Editor textChanged event in angular

$
0
0
Hi Nick,

Indeed this downloading all available addresses from Google Place API will not be an appropriate solution.

Regarding that, I have logged new feature request about implementing functionality, which allows handling text changing. You could keep track on it for further info.

Best Regards,
nikolay.tsonev
Progress Telerik
Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.

HTML 5 finding elements

$
0
0
Hello Nithya,

Generally speaking if the element has an ID - it is always best property to use in the find logic. If the element does not have one there a two approaches here:

 - to find a set of properties that uniquely describe the element 
 - to create a chained find logic using the closes to this element that has an ID

There is an exception message that indicates the reason for the step failure that you could check in the execution log after the test completes.

I hope these pointers are useful to you.

Kind Regards,
Nikolay Petrov
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!

RowDetail height problem

$
0
0

Did the same with the telerik example;

 

Changed the following code (TableRelation) to add hierarchy in the child items.

privatevoidRadGridView1_DataLoading(objectsender, GridViewDataLoadingEventArgs e)
{
    GridViewDataControl dataControl = (GridViewDataControl) sender;
    if(dataControl.ParentRow != null)
    {
        dataControl.BorderThickness = newThickness(0, 1, 0, 1);
        dataControl.GridLinesVisibility = GridLinesVisibility.None;
        dataControl.ShowGroupPanel = false;
        dataControl.AutoGenerateColumns = false;
        dataControl.CanUserFreezeColumns = false;
        dataControl.IsReadOnly = true;
        dataControl.ChildTableDefinitions.Clear();
 
        TableRelation r = newTableRelation();
        r.IsSelfReference = true;
        r.FieldNames.Add(newFieldDescriptorNamePair("EmployeeID", "ReportsTo"));
        dataControl.ChildTableDefinitions.Add(newGridViewTableDefinition() { Relation = r });
 
 
        GridViewDataColumn column = newGridViewDataColumn();
        column.DataMemberBinding = newBinding("EmployeeID");
        dataControl.Columns.Add(column);
 
        column = newGridViewDataColumn();
        column.DataMemberBinding = newBinding("FirstName");
        dataControl.Columns.Add(column);
 
        column = newGridViewDataColumn();
        column.DataMemberBinding = newBinding("LastName");
        dataControl.Columns.Add(column);
 
        column = newGridViewDataColumn();
        column.DataMemberBinding = newBinding("Title");
        dataControl.Columns.Add(column);
    }
}

 

Changed some data in the example. More hierarchical levels. Even in this example the row is adding a scrollviewer after a specific height.

 

 

Load template with german umlaut

$
0
0

Hi Tsvetina,

Thank you for response. Indeed Html.Raw works. I was displaying something from a model property and did not realize that was coming also from resources. I manage to "solve" my issue by printing the template before rendering and saw there the # character that was not escaped.


Using same template on template

$
0
0

Hi!, i'm trying to use a template into the same template. This is the code:

<script id="nestedTemplate" type="text/x-kendo-template">
    <li><b>#: _folderName #</b>
    <ul data-template="nestedTemplate" data-bind="source: _folders"></ul>
    <ul data-template="filesTemplate" data-bind="source: _files"></ul>
    </li>
</script>

json (remote)

{
        "_folderName": "Dpto CGE",
        "_folders": [
          {
            "_folderName": "Informes Test",
            "_folders": [
              
            ],
            "_files": [
              {
                "OriginalPath": "Comparativa de Planificación Mensual con Producción Hasta Marzo 2013.sql"
              },
              {
                "OriginalPath": "Comparativa de Planificación Mensual con Producción.sql"
              },
              {
                "FullPath": "\\\\192.168.10.6\\pfolder$\\jgperez\\Control De Gestión\\Informes Gema\\Obras.xls"
              }
            ]
          }

So, the template is calling itself each _folders is found but it doesn't works: : e.bind is not a function

Can i use nested templates with MVVM?

Thanks.

 

Changing the TimeZone of the DateTime fields

$
0
0
Hello Silviu,

The Grid by design displays the dates as is. Changing the dates on the client would require JavaScript implementation, similar to the one suggested in GridDateTimeColumn to localtime forum thread. 

For an alternative solution, you could consider using, is suggested in the following resources: 
Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.

Labels are not visible in BarSeries when DataTemplate for lables is defined.

$
0
0

Hello. I use a DataTemplate for labels in BarSeries. Please see XAML below:

<telerik:RadCartesianChartGrid.Row="0"Grid.Column="0"Visibility="{Binding IsAbsoluteBarChartVisible}">
    <!--Annotation line-->
    <telerik:RadCartesianChart.Annotations>
        <telerik:CartesianGridLineAnnotationAxis="{Binding ElementName=verticalAxis}"Value="{Binding AnnotationValue}"Label="{Binding AnnotationLabel}"Stroke="Red"
                                         StrokeThickness="2"DashArray="8 2"Visibility="{Binding IsAnnotationVisible}">
            <telerik:CartesianGridLineAnnotation.LabelDefinition>
                <telerik:ChartAnnotationLabelDefinitionLocation="Inside"  VerticalAlignment="Bottom"  HorizontalAlignment="Center">
                    <telerik:ChartAnnotationLabelDefinition.DefaultVisualStyle>
                        <StyleTargetType="TextBlock">
                            <SetterProperty="FontSize"Value="14"/>
                            <SetterProperty="FontWeight"Value="DemiBold"/>
                            <SetterProperty="Foreground"Value="Red"/>
                        </Style>
                    </telerik:ChartAnnotationLabelDefinition.DefaultVisualStyle>
                </telerik:ChartAnnotationLabelDefinition>
            </telerik:CartesianGridLineAnnotation.LabelDefinition>
        </telerik:CartesianGridLineAnnotation>
    </telerik:RadCartesianChart.Annotations>
    <!--X - axis-->
    <telerik:RadCartesianChart.HorizontalAxis>
        <telerik:CategoricalAxis/>
    </telerik:RadCartesianChart.HorizontalAxis>
    <!--Y - axis-->
    <telerik:RadCartesianChart.VerticalAxis>
        <telerik:LinearAxisx:Name="verticalAxis"Title="{Binding Title_Y}"  Minimum="{Binding AbsoluteMinimum_Y}"Maximum="{Binding AbsoluteMaximum_Y}"MajorStep="{Binding AbsoluteStep_Y}"/>
    </telerik:RadCartesianChart.VerticalAxis>
    <!--Here is bar chart itself-->
    <telerik:RadCartesianChart.Series>
        <telerik:BarSeriesShowLabels="True"CategoryBinding="Category"ValueBinding="Value"ItemsSource="{Binding Data}">
            <telerik:BarSeries.LabelDefinitions>
                <telerik:ChartSeriesLabelDefinitionMargin="0 20 0 0">
                    <telerik:ChartSeriesLabelDefinition.Template>
                        <!-- !!! HERE IS PROBLEMATIC TEMPLATE !!! -->
                        <DataTemplate>
                            <TextBlockForeground="White"/>
                        </DataTemplate>
                    </telerik:ChartSeriesLabelDefinition.Template>
                </telerik:ChartSeriesLabelDefinition>
            </telerik:BarSeries.LabelDefinitions>
        </telerik:BarSeries>
    </telerik:RadCartesianChart.Series>
</telerik:RadCartesianChart>

But the labels are not visible in Bars in the chart in this case!

But when I comment the following code:

<!--telerik:ChartSeriesLabelDefinition.Template>
       <DataTemplate>
             <TextBlockForeground="White"/>
       </DataTemplate>
</telerik:ChartSeriesLabelDefinition.Template-->

Then the labels are visible nice. Why this has plase. Please help.

Checkbox Styling with DataSource

$
0
0

I see in the GitHub issue that a fix has been implemented. Do you have an update as to when this might be released?

 

Thanks

FiddlerCore Auto-respond with sessions loaded from SAZ file-

$
0
0

Hi,

Got the answer. used - oS.utilSetResponseBody(loadedResponseBody)

To set the response of the session where loadedResponseBody is a string from the session which is stored in SAZ file.

Regards,

Kallol

FiddlerCore -Store session in HAR File

$
0
0

Hi,

I am using fiddlercore to analyze network traffic. Now I want to store the session recorded in a HAR file and load it later from the HAR file itself.

I am able to save the session in a SAZ file and load the same session later from SAZ file.

So, is there a way to convert SAZ file to HAR file.

OR

Store all session as HAR file.

And, load the session recorded from HAR file.

Thanks in advance !!

Regards,

Kallol Ghose

RadStacked100DataBar animation on value change

$
0
0
Hi Rosca,

The stacked data bar control doesn't support animations out of the box. However, you can achieve your requirement by writing some custom code. For example, when you set a new value, you can start a DisptacherTimer and update the value with smaller step until it gets to the newly set value. This way it will look like the value is animated smoothly. Check this approach in the attached project.

Additionally, you can consider using RadProgressBar. This way you will need to manage only one value, instead of one for each bar.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.

Is there a way to filter the grid using a single text box?

$
0
0
Hello Vassilis,

One option to achieve the desired functionality is using the Grid client-side API as suggested in how to filter a grid manually from external textbox? forum thread. 

Another option is to rebind the Grid and use the TextBox value as a Where clause of the Select statement as suggested in Filter RadGrid on external textbox key press Code Library project and Filter radgrid on button click forum thread.

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.

Changing Default Font and Size

$
0
0

Hello,

This topic is driving me mad!! I have been trying to get a default font and size for the RadTextBoxEditor for 3 days. I tried each and every piece of code that is described below but until now not with the desired result.

I know this is already an old topic, and it seems to be solved since the last post was of 2015, but I don't get the control to behave as I want.

I need the RichTextBoxEditor because of the MailMerge possibilities, but I don't want the user to change font size, type, colors or nothing, as the output will be a text file.

Due to company rules, I need a default font and size in the application.

To be short: I want the control to behave as a normal textbox, except for the mailmerge fields.

Scenario 1:
Set the default font family and size.
I load a document from Xaml with the XamlFormatProvider, OK.
I select the entire document, change the font family and font size. OK.
Now the user starts to type after the loaded text: to my horror font size 12 and original family again....

Scenario 2:
I don't load any document. Set the default font family and size.
The user starts to type, OK.
The user reconsiders, types Ctrl-A, Delete, starts typing again -> back to font size 12 and original family again...

I'm using version 2017 Q1...

What am I overlooking?

Multiple deletes/trying to perform first delete again....

$
0
0

Could really do with some help with this. I've tried a number of different approaches now and nothing will work.

I tried firing the following on the .Remove grid event -

 

function refreshList_Remove(e) {
    //alert("Refreshing_R");
    $('#Article').data('kendoGrid').dataSource.read();
    $('#Article').data('kendoGrid').refresh();
    //alert("Refreshed_R");
 
}

 

Again, no luck.

I've also tried the inline editing option here - inline delete with no success.

This is incredibly frustrating.

 

 

RadStacked100DataBar animation on value change

$
0
0

Hi Martin,

Thank you for your response. The timer/task approach is what I have implemented so far, and I am changing the LeftPercentage and RightPercentage of the DataBarShape -  the problem is that the control needs to be first updated and then I am able to simulate the required animation behaviour. I will take into consideration the ProgressBar appraoch as well.

Shows Grid's data with optional selection in Dropdownlist

$
0
0
Hi Redfield,

I would suggest using JSON.stringify on the data.

Additionally, I believe that you might be interested in checking these forum posts:
Regards,
Preslav
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Viewing all 84751 articles
Browse latest View live


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