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

Combo box events are firing two times

$
0
0

Hi,

i am facing issue with Kendo Combo boxes, where the Change event is getting fired two times, please find the below code.

<table>
                            <tr id="controls">
                                <td>
                                    <label id="lbl1">Config Type:</label>
                                </td>
                                <td>

                                    @(Html.Kendo().ComboBox()
                                        .Name("cmb_configType")
                                        .HtmlAttributes(new { @class = "fieldentertext", required = "required", style = "width:85%;", validationmessage = "" })
                                        .Placeholder("Select Config Type...")
                                        .DataTextField("ConfigTypes")
                                        // .DataValueField("Names")
                                        .Filter(FilterType.Contains)

                                                .Events(e =>
                                                {
                                                    e.Change("OnChange_ConfigType");
                                                    //.Select("OnSelect_Config")
                                                    //.Open("OnOpen_Config")
                                                    //.Close("OnClose_Config")
                                                    //.DataBound("OnDataBound_Config")
                                                    //.Filtering("OnFiltering_Config");
                                                })
                                                                            )


                                </td>
                                
                                <td>
                                    <label id="lbl3">Config Name:</label>
                                </td>
                                <td>
                                   
                                    @(Html.Kendo().ComboBox()
                                .Name("cmb_confignames")
                                .HtmlAttributes(new { @class = "fieldentertext", required = "required", style = "width:85%;", validationmessage = "" })
                                .Placeholder("Select Config Name...")
                                .DataTextField("ConfigNames")
                                // .DataValueField("Names")
                                .Filter(FilterType.Contains)

                                        .Events(e =>
                                        {
                                            e.Change("OnChange_ConfigNames");
                                            //.Select("OnSelect_Config")
                                            //.Open("OnOpen_Config")
                                            //.Close("OnClose_Config")
                                            //.DataBound("OnDataBound_Config")
                                            //.Filtering("OnFiltering_Config");
                                        })
                                                                    )
                                </td>
                                <td>
                                    <button class="btn-brdr" id="btnctrl">+</button>
                                </td>
                                
                            </tr>
                        </table>

 

i am creating two combo boxes 1. Config Type 2. Config Name

when user clicks on first combo, based on the selection i am loading data to second combo box.

when User clicks on Second Combo box(Config Name), It is firing the event for(Config Type) once again and then it is firing event for(Config Name), Why it is firing event for First combo box, when i select on Second combo box?

And also i observed that, if i click on any where in the page these two events are firing, What is wrong in this code?

Here are my fucntions which gets hit on event.

function OnChange_ConfigType(obj)

{

---------------------

}

function OnChange_ConfigName(obj)

{

--------------------

}

 

Please help on this.

 


How to remove item from Grid without triggering datasource destroy()

$
0
0
Hello, Grant,

Thank you for the details.

Based on the description I can assume that the filter approach will be the best one as it will use a built-in API.

If possible please provide the Grid configuration and any accompanying JavaScript functions, and I will try to test why the JavaScript error occurs. In general, in the described case, the Grid should be filtered as expected with no errors:

https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/configuration/filter

I will be expecting the additional details.

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

SlideDrawer working in Android but not in iOS Simulator

$
0
0

it worked but only after i did the following:

cleaned solution

rebuilt solution (still had build errors)

unloaded android/ios/uwp apps leaving just the XAML app...

rebuilt...still got build errors...something relating to using the <OnPlatform> type argument to set the FontSize property of a few <Label> controls. Once those removed. the XAML app builds.

reloaded android. built...success

reloaded ios built....success...

 

super weird.

Excel-like available filter off

$
0
0
Hello, Вадим,  

Thank you for writing back. 

The provided clarification is greatly appreciated. You can handle the FilterPopupInitialized and hide the desired items in the RadListFilterPopup. Here is demonstrated how to hide the "Available Filters" menu item: 


private void radGridView1_FilterPopupInitialized(object sender, Telerik.WinControls.UI.FilterPopupInitializedEventArgs e)
{
    RadListFilterPopup popup = e.FilterPopup as RadListFilterPopup;
    if (popup != null)
    {
        foreach (RadItem item in popup.Items)
        {
            if (item.Text== Telerik.WinControls.UI.Localization.RadGridLocalizationProvider.CurrentProvider.GetLocalizedString(RadGridStringId.FilterMenuAvailableFilters))
            {
                item.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
            }
        }
    }
}

Following a similar approach you can hide all the items you wish.

I hope this information helps. If you have any additional questions, please let me know. 

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

In Cell Grid Edit/Cancel Error

$
0
0

I've been trying to implement cell-based editing into my grid. It does work in a fashion, in that I can edit the current values present in the grid and they do save when clicking the Save Changes button. However, it does not appear to be firing the Update function correctly, which points to a function in the Controller. I know the grid is able to fire events for Read since I've applied a filter which uses a function in the Controller, and it's able to call that function without problems. It just doesn't seem to fire the Update function.

Below is the code for the table;

@{Layout = null;}
 
 
@(Html.Kendo().Grid<FiveSReporting.Models.ViewModels.SchedulingViewModel>()
      .Name("Schedule")
      .Columns(columns =>
      {
          columns.Bound(c => c.LineName);
          columns.Bound(c => c.WeekOfFirst);
          columns.Bound(c => c.WeeksBetweenEach);
      })
      .ToolBar(t => { t.Save(); })
      .Pageable()
      .Editable(e => e.Mode(GridEditMode.InCell))
      .Sortable(sortable =>
      {
          sortable.SortMode(GridSortMode.SingleColumn);
      })
      .Scrollable(scrollable => scrollable.Enabled(false))
      .DataSource(dataSource => dataSource
          .Ajax()
          .Batch(true)
          .ServerOperation(false)
          .Events(e => e.Error("error_handler"))
              .Model(m => { m.Id(s => s.ID); m.Field(s => s.LineName).Editable(false); })
          .Update(update => update.Action("Schedule_Write", "ScheduleAdminTwo"))
          .Read(read => read.Action("Schedule_Read", "ScheduleAdminTwo")
          .Data("getSchedule"))
      )
      .AutoBind(false)
)

 

I've also found that when clicking on the Cancel Changes button that it will throw an error to the console, and subsequent attempts to navigate on the grid also throw errors.This occurs when you click the Cancel Changes button just after clicking the Save Changes button. See attached screenshot for details.

Thank you ahead of time for your assistance.

Disable auto calculation of summary tasks

$
0
0

Hi,

is it possible to diable the automatic calculation of a summary task. My goal is it to have a specifiv start and end for the summary task not depending on the start and end of the child-tasks.

best regards

Thorsten

Undefined in DropdownList

$
0
0
Hello Michael,

Note, that when the widget is bound to the data by using the BindTo method or by passing the model in the constructor, the data is bound by local data binding. This means that the binding is one-way and no editing is possible. 

When the widget is bound to remote endpoints, such as Controller in MVC, all CRUD operations could be defined. Currently, if you need to bind data remotely, you will need to reference a service, that is not located in the Razor Page. 

On the following link from our repo, you will find an example of Grid with Razor Pages (local-data-binding).

In case you have additional questions related to the implementation and configurations in Grid, I would suggest you to open a separate thread. 

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

Editor template and resource editor

$
0
0
Hello Rami,

I have prepared a Dojo example, where a similar scenario to the one described is demonstrated (Opening the Gantt resource editor from a custom editor template).

To achieve the desired result, I have followed these steps:

1) Configure the custom editor template through the Gantt's editable option:
editable: {
  template: $("#editor").html()
}

2) Add the required resources markup to the template:
<script id="editor" type="text/x-kendo-template">
  ...          
  <div>
    <label for='resources'>Resources:</label>
    <div class='k-gantt-resources' style='display: none;'></div>
    <div class='k-edit-field' data-container-for='resources'>
      <a class='k-button' href='\\#'>Assign</a>
    </div>
  </div>
</script>

3) Subscribe to the Gantt edit and save events:
edit: onEdit,
save: onSave

4) Handle the edit event, to get a reference to the editor popup and attach a click handler that will programmatically open the resource editor through the _createResourceEditor() method. Upon saving the data call the _updateAssignments() method to update the item resources:
<script>
  var resoucesdEdited = false;
 
  function onEdit(e)
  {
    var gantt = e.sender;
    resoucesdEdited = false;
 
    if (e.task) {
      e.container.on('click', 'div[data-container-for="resources"] > a', function (event) {
        event.preventDefault();
        resoucesdEdited = true;
        gantt._createResourceEditor(e.container.find('div.k-gantt-resources'), e.task);
      });
    }
  }
 
  function onSave(e) {
    if (e.task && resoucesdEdited) {
      this._updateAssignments(e.task.get("id"), e.task.get(this.resources.field));
    }
  }
</script>

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

FiddlerCore - SSL Prompt every program launch

$
0
0

hey telerik,

 

I have been using fiddler core for a while now and the problem I've been having (which only recently started happening) is that when I try to capture/decrypt SSL with 'CertMaker.TrustRootCert();' it prompts me each time to install the certificate. I have used this code before and this has never happened.

 

This is my startup code if you need it >

            CertMaker.trustRootCert();
            FiddlerApplication.Startup(8877,FiddlerCoreStartupFlags.Default);
            oSecureEndpoint = FiddlerApplication.CreateProxyEndpoint(iSecureEndpointPort, true, sSecureEndpointHostname);
            FiddlerApplication.BeforeRequest += encodeOnReq;

 

thanks, xev

RadDataGrid with specific Columns, Aggregation and Grouping in C#

$
0
0
Hello, Pierre,

It seems that my percentage of correctly attached projects is quite low, need to work on it :). Sorry for that, here is the actual project.

Regards,
Stefan Nenchev
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

Filtering on multiple values

$
0
0
Hi Martina,

A suggestion is to use conditional statement for the filterValue. For example, you could assign a value to 'filterValue' only if ev.filter is not undefined. Otherwise, you could set it to an empty string. 
var filterValue = ev.filter != undefined ? ev.filter.value : ''

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

Dropdownlistfor Displaying [object Object] when selecting items

$
0
0

Hello Nencho,

Apologies for the delayed response. Just a quick update. I figured out what the issue was, and it's to do with including the "kendo.mobile.min.js" file with the bundle. Even those it doesn't produce any errors, I assume there must be some sort of conflict or something. Either way, removing the file from the bundle has fixed the issue. Thanks for the assistance.

Regards

Filtering on multiple values

$
0
0

Hi Neli,

This works a treat thanks so much!

Stacked area series on Uwp throws out of range exception

$
0
0
Hi Michel,

You are absolutely right. The control should either predict this and handle it gracefully or throw a dedicated exception. I have logged it here. I have also updated your Telerik points.

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

Focus first invalid - custom editor template

$
0
0
Hello Simon,

To make this work with the Scheduler's built-in Validator, you can subscribe to the Scheduler's edit event, where the Validator's instance can be retrieved. Then, by using the setOptions() method the Validator's options can be changed dynamically according to the requirements:
@(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.TaskViewModel>() 
  ...
  .Events(e =>
  {       
      e.Edit("onSchedulerEdit");       
  })
)
 
<script>
  function onSchedulerEdit(e) {
    var validator = e.container.data("kendoValidator");
             
    validator.setOptions({
      validate: function(){
        $(".k-invalid:first").focus();
       }
     });
  }
</script>

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

Pager not refreshing when updating grid.

$
0
0
Hello, Doug,

The main reason for this is the discussed issue in the private ticket:

https://github.com/telerik/kendo-ui-core/issues/4000

Also, this post is from 2013, and the endless scrolling was introduced in 2017 and the suggested approach is not considering the endless scrolling scenario as the feature was not implemented yet.

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

selected item TextCellTextColor not changing

$
0
0
Hi, Shalin,

Thank you for the additional information. When testing with the ListViewTextCell, the behavior seems correct in Android and UWP. However, in iOS indeed there is a big spacing between the items and their width is equal. Still, using a ListViewTemplateCell instead of a ListViewTextCell seems to achieve the desired behavior. Please have a look at the attached sample. You can use the template cell in combination with one of the approaches I have provided in my original reply.

Have a great rest of the week.

Regards,
Stefan Nenchev
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

kendo ui datasource make several delete calls each time

$
0
0
Hello, Alex,

Yes, it will be helpful to provide some example or more details.

In general, the Grid is designed to delete, update or create records only when the server return success. Returning an error and still deleting the records will collide with the standard practices when handling CRUD operations with a server and a database.

Please advise a scenario, when the server should return an error but the record should be removed anyway?

I will be expecting more details and gladly assist.

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

Form control inside grid

$
0
0

Hi all,

i want to have a repeated table with forms. One guy sayd, that i should use grid for this. So i want to create something like:

<grid ID="Grid1" runat="server" DataSourceID=???>

<MasterTableView  DataKeyNames="fldId" DataSourceID=??? AutoGenerateColumns="False">

<form runat="server" ID=??? DataSourceID=??? DataKeyNames="fldId">

</form>

</MasterTableView >

</grid>

The form is created with fields from DB based on the fldId and i want to have repeated forms with all fldId's. I hope your can understand my idea.

 

Thank you in advance!

Preview button not appearing on iPad

$
0
0

Hi,

The Preview button that is at the bottom of the report parameter side bar is not showing on iPads.

Has anyone experienced this before?

TIA

Paul

Viewing all 94857 articles
Browse latest View live


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