Telerik Forums
UI for ASP.NET MVC Forum
1 answer
386 views
I'm migrating an application from the old Telerik Mvc controls to the latest UI for ASP.NET MVC wrappers.

I have a bunch of unit tests that validated the controller actions that the grid calls for data.  A simple example would be:

<TestMethod()>
Public Sub GetLogEntryData_Passes_Through_Filters_On_Multiple_Columns()
  Dim passedCmd As GridParameters = Nothing
  _adminLogService.Setup(Function(s) s.GetLogEntries(It.IsAny(Of GridParameters))).Returns(_validLogEntries).Callback(Sub(p) passedCmd = p)
  Dim target As New AdminLogController(_adminLogService.Object, Nothing)
  Dim cmd As GridCommand = GridCommand.Parse(1, 10, Nothing, Nothing, "UserName~eq~'test'~and~ControllerName~startswith~'Users'")
  target.GetLogEntryData(cmd)
  Assert.IsNotNull(passedCmd)
  Assert.AreEqual(2, passedCmd.Filters.Count)
End Sub

Now that I have replaced the grids and I'm passing a DataSourceRequest instead, I don't suppose there's a similarly handy function that can replace the GridCommand.Parse statement?

Cheers,
Nick
Rosen
Telerik team
 answered on 26 Feb 2015
2 answers
684 views
Hi,

When i add or edit one grid and at the same time try to edit another grid, its  foreign key is not showing its template. I need to know how to get a id unique for my editor template. Now I show you the secene


I have two views, in the first view I call to the second view

@(Html.Kendo().TabStrip()
   .Name("service_details_tabstrip_#=ServiceID#")
   .Items(items => { items.Add().Text("Detall Residus")
   .Selected(true)
  .LoadContentFrom("Waste", "Serveis", new { id = "#=ServiceID#" });
})
 .ToClientTemplate()


In the second view I have next sentence:

string serviceID = ViewBag.ServiceID.ToString();



The grid on the second view:

@(Html.Kendo().Grid<ServiceDetailViewModel>()
  .Name("waste_details_" + serviceID)
  .ToolBar(t =>{
   if (User.IsInRole("Modify")){
       t.Create().Text("Afegir Residu");
       t.Custom().Text("Afegir Residus Contracte").HtmlAttributes(new { id = "wasteContract_" + serviceID });
  }
})
 .Columns(columns =>
{
 columns.Bound(f => f.DetailID);
 columns.ForeignKey(f => f.Reference, (System.Collections.IEnumerable)ViewBag.CatalegResidus, "Value","Text").EditorTemplateName("GetWasteByServeis").Width(400);

The template "GetWasteByServeis" needs something to be unique:

@(Html.Kendo().DropDownList()
   .Name("Reference_@serviceID") <=== this it's not ok
   .DataTextField("Text")
   .DataValueField("Value")
   .Filter(FilterType.Contains)
   .OptionLabel("-please select-")
   .ValuePrimitive(true)
   .AutoBind(false)
   .DataSource(source =>
{
 source.Read(read =>
    {
         read.Action("SearchWaste", "Serveis").Data("filterSearchWaste");
    }) .ServerFiltering(true);})
)


In this thread I find information relationed.
http://www.telerik.com/forums/grid-foreign-key-field-sometime-shows-textbox



Thanks in advance.


Xavier.
Xavier
Top achievements
Rank 1
 answered on 26 Feb 2015
5 answers
264 views
Hi,

How can i add combobox to some cell in the Edit mode? Is there example for this?
Alexander Popov
Telerik team
 answered on 26 Feb 2015
1 answer
168 views
Hi,I'm trying to define individual business hours for the scheduler. The scheduler only uses a single start/end time for each work day. I want to define start/end times for each day specifically (ie. Monday has different times than Tuesday). 
Eg: 
Sunday working hours @ 10:00 to 12:00 
Monday working hours @ 9:00 to 16:00 
Tuesday working hours @ 10:00 to 18:00 
Wednesday working hours@ 06:00 to 12:00 
Thursday working hours @ 08:00 to 14:00 
Friday working hours @ 11:00 to 12:00 
Saturday working hours @ 11:30 to 13:00Can anyone resolve my problem.Thanks in advance
Vladimir Iliev
Telerik team
 answered on 26 Feb 2015
1 answer
201 views
I have a model with ID and and array of values, I need each of the array value to be displayed in separate column in kendo grid and all this should be editable fields.

public int Id { get; set; }
public double[] List { get; set; }

I have tried the following way however it display all values in one cell.


@model IEnumerable<HoursModel>

<div id="PlanningGrid">
    @(Html.Kendo().Grid(Model)
          .Name("Grid")
          .Columns(columns =>
          {
             //// columns.AutoGenerate(true);
              
              columns.Bound(c => c.Id).HeaderHtmlAttributes(new {@class = "grid-header-cell"}).HtmlAttributes(new {@class = "grid-row-cell planningoverview-grid-cell1"});

              columns.Bound(p => p.List).ClientTemplate("#=generateTemplate(HoursList)#");
              //// columns.Bound(m => m.EmployeeId).ClientTemplate("# for (var i=0;i<4;increment(i)) { console.log(i) } #");
              
          })
          .Sortable())
    
</div>

<script type="text/javascript">
    function generateTemplate(Wetness) {
        var template = "<ul>";
        for (var i = 0; i < Wetness.length; i++) {
            template = template + "<li>" + Wetness[i] + "</li>";
        }
        return template + "</ul>";
    }
 
</script>
Rosen
Telerik team
 answered on 25 Feb 2015
2 answers
1.7K+ views
I want to have the dropdown default select a value.  I have the value is in a ViewData.  How can I access this from javascript?

@(Html.Kendo().DropDownList()
                       .Name("locationCode")
                       .HtmlAttributes(new { style = "width:200px" })
                       .DataValueField("Code")
                       .DataTextField("Name")
                       .DataSource(source =>
                                    {
                                        source.Read(read =>
                                        {
                                            read.Action("GetUserGlobalDimensions", "RequestPONumber");
                                        });
                                    }

                                  )
                        .Events(e => { e.DataBound("onLocationDataBound"); })

In js file:
function onLocationDataBound() {
    this.value('ViewData["defaultLocationValue"]');
}

Thanks in advance.



Greg
Top achievements
Rank 1
 answered on 24 Feb 2015
1 answer
193 views
Hi,

I am trying to export a form created with kendo panel. See the first attach file.
So, it's work very well but each input field are empty. Maybe because i user razor components like this:

@Html.TextBoxFor(m => m.CNom, new { @placeholder = "Nom", @class = "form-control form-decouverte form-nom ChampsObligatoire" })

I attach the pdf file for showing you the results.

So i you have an idea about this prolem.

Thanks,

Ludovic



Mihai
Telerik team
 answered on 24 Feb 2015
1 answer
711 views
Hi,

I'm trying to implement the Kendo Editor in an application i'm working on. I'm trying to use the editor to allow the user to insert an image with text around it. I have attempted 2 different methods and neither are acceptable.

I can't find any tool/option for wrapping the text around the image. E.g. i want an image on the right and text on the left.

I can insert a table and put the image in the right column and text in the left column but i am unable to drag the table column to size around the image. At the moment it just appears to remain at 50%.

Any help is much appreciated.

Thanks

Anthony

Dimo
Telerik team
 answered on 24 Feb 2015
4 answers
2.2K+ views
I have a number of Kendo Editor's used in my application.  Much of the text entered via the Editor will be displayed in a Kendo Grid.  I am using the Black theme, so the background color in the grid is a gray, which is fine.  The background color of the Kendo Editor text area is white.  I want to change that from white to a gray, or the same color as the grid background.  This way you will be able to enter the text as it will appear in the grid
Alex Gyoshev
Telerik team
 answered on 24 Feb 2015
1 answer
689 views
I am using the following menu 

    $("#settingsmenu").kendoMenu({
        dataSource: [{
            text: 'Settings',
            items: settingOptions
        }],
        openOnClick: true,
        closeOnClick: false,
        open: function () {
            /...../
        },
        select: function () {
            /..../
        }
    });


Following is my menu 
    <ul id="settingsmenu" class="pull-right">
        <li>
            <span class="glyphicon glyphicon-cog"></span>
        </li>
    </ul>


Now what is get is a down arrow next to settings text. 
I need to show a bootstrap glyph icon(a span essentially).
Any way that I can achieve this ?
Iliana Dyankova
Telerik team
 answered on 24 Feb 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
Security
ColorPicker
DateRangePicker
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
DropDownButton
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
LLM Kit
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?