Telerik Forums
UI for ASP.NET MVC Forum
2 answers
108 views

Hello All,

         i have attach a file to this thread which is based on the VSflexgrid control in asp technology.

the same functionality i want to achieve using telerik treelist control with asp.net mvc.

In the attach file there are two horizontal parts.

the above part display the treeview in left side and the associated grid that to with editable cell like excel into it towards the right side.

if we write anything on the grid cell say a number i type there the below part where there are also a grid with dynamic row and column description

gets added the value into it.

 Kindly let me know if this functionality is achievable .

Please go through the attach file screenshot and kindly let me know.

Kiril Nikolov
Telerik team
 answered on 18 Sep 2015
5 answers
410 views

Hello,

I am wondering why the highlightings (k-header-column-menu k-state-active) of filtered columns are not automatically restored by the framework after the settings have been loaded.

The settings are stored and loaded using setOptions and getOptions. But if you do so, the k-state-active class is not set to columns with active filters.

Is this missing behavior a known bug or "as designed"? And how can it be solved?

 

Thanks in advance,

Holger

License
Top achievements
Rank 1
 answered on 18 Sep 2015
1 answer
57 views

I hate bringing this up, because DST can be such a mind #$%$. But here we go: 

I have declared a Kendo datetimepicker like so:

 

@(Html.Kendo().DateTimePicker()
.Name("StartDatePicker")
.Format("yyyy/MM/dd HH:mm zzz")
.TimeFormat("HH:mm")
)​

 

I'll be using MST as my example timezone, ie. -6:00 or -7:00. On November 1st @ 2:00 AM time goes backwards 1 hour. So basically the time one second after 1:59:59 AM (-06:00) becomes 1:00:00 AM (-07:00)

The KendoDateTimePicker seems to be smart enough to recognize the timezone change. For example, selecting November 1st 00:30 (pre-time change) will show a timezone of (-06:00), and selecting November 1st 02:00 (post time change) will show a timezone of (-07:00)

The tricky part with the November time change is that there are two occurrences of 01:00:00 - 01:59:59 during that day. The first occurrence has a timezone of -06:00 and the second has a timezone one less, of -07:00. So the question is, how do I select one occurrence or the other, without having to manually input the timezone?

The expectation is that the clients current timezone is used. So if the current local time is before the time change (-06:00), then if I select November 1st 01:30 I expect the timezone to be (-06:00). If the current local time is after the time change (-07:00), then if I select November 1st 01:30 I expect the timezone to be (-07:00).

 At the moment the KendoDateTimePicker doesn't match those expectations, and instead defaults to the pre-time change timezone of (-06:00) regardless of what the timezone of the web server or the client is. It is therefore impossible to select time between 01:00:00 - 01:59:59 (-07:00).

Is this a bug or is there someway of making the datetimepicker aware of the client's current timezone?

Georgi Krustev
Telerik team
 answered on 18 Sep 2015
1 answer
107 views

I have a search form which will get a list of records.
I would like to bind the search results on pressing submit after performing some initial ​checks on the entered data. How do i bind my action result to the Kendo Grid ?
 My JS File is 
function validateDataForSearch() {
        var empNo = $("#empNo").val();
        var empName = $("#empName").val();
        var empMgr = $("#empMgr").val();
        var clientName = $("#ClientName").val();

        var noValues = empNo.length + empName.length + empMgr.length + clientName.length;

        if (noValues <= 0) {
            alert("Please enter at least one value to be able to search.");
        }
        else {
            if (empNo.length <= 0)
                empNo = 0;
            $.ajax({
                type: "POST",
                url: 'Home/Search',
                data: { empNo: empNo, empName: empName, empMgr: empMgr, clientName: clientName },
                success: function (response) {                
                        $("#pmtSearchResult").getKendoGrid().dataSource.data(response);
                        }
            });
        }​;

 

  function get​EmpLink(project) {
        var action = '@Url.Action("Index","PMP", new { ​emp= '+ ​emp +')';
        var ​empLink = kendo.format("<a href='{0}'>{2}</a>", action, ​emp.empNo);
        return empLink;
    }

 var validator = $("#searchForm").kendoValidator().data("kendoValidator");

    $("#btnSearch").click(function (e) {        
        if (!validator.validate()) {
            e.preventDefault();
        }
        else
            validateDataForSearch();
    });

 

 

 

My CSHTML is as follows

@model IEnumerable<PMT.Models.EmpData> 
<div id="kendoGrid">
    @(Html.Kendo().Grid(Model)
    .Name("SearchResult")
    .Columns(columns =>
    {
        columns.Bound(p => p.empNo).ClientTemplate("#= getEmpLink(data) #");
        columns.Bound(p => p.empName);
        columns.Bound(p => p.empMgr);
        columns.Bound(p => p.ClientName);

        columns.Bound(p => p.empSal).hidden(true);

    })
    .Pageable()
    .Sortable()
    .Scrollable(scr => scr.Height(430))
    .Filterable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)
        .ServerOperation(false)
     )
    )​

 

I cant seem to render the grid to hide the empSal column or to show  the emloyeeid column as a hyperlink column

Rosen
Telerik team
 answered on 17 Sep 2015
1 answer
133 views

 Please find the below code as i want to set default value of dropdown instead of optionlable from  JSON data which is returned from controller .

Please find the below code

 

 

@(Html.Kendo().DropDownList()
              .Name("DropDownList1")
                                       
              .HtmlAttributes(new { style = "width:300px" })
              .OptionLabel("Select ...")
              .DataTextField("District_Id")
              .DataValueField("Location_ID")
            
             
                      .DataSource(source =>
           {
               source.Read(read =>
                  {
                      read.Action("GetOrders", "IDTDashboard");
                  })
                  .ServerFiltering(true);
           })
           .AutoBind(false)

 

public ActionResult GetOrders()
       {
           List<usp_IDQ_GetLicenseDistrictsVO> objresult1 = new List<usp_IDQ_GetLicenseDistrictsVO>();
           objresult1 = objConnection.usp_IDQ_GetLicenseDistricts(User.Identity.Name, true).ToList();
           return Json(objresult1, JsonRequestBehavior.AllowGet); ;
       }

Georgi Krustev
Telerik team
 answered on 17 Sep 2015
1 answer
199 views

Hi,

We have a combobox and a button inside a form (all HTML helper) and when we submit (its just a search form) two querystring items are appended to the forms destination - one with the name of the "Combobox" giving the value and one with "ComboBox_input" giving the text.

We're using a combobox so we can have the Text and the Value separate.

How can we stop both the Text AND Value being added as a querystring value?

I know we can do an on change event and window.location, but we've a requirement for an actual button to click and I thought this would work ...

01.@using (Html.BeginForm("Details", "Property", FormMethod.Get))
02.    {
03.     
04.    @(Html.Kendo().ComboBox()
05.    .Name("PropertyId")
06.    .DataTextField("Searchable")
07.    .DataValueField("PropertyRef")
08.    .Placeholder("Search for property by ref or name ...")
09.    .Filter(FilterType.Contains)
10.    .AutoBind(false)
11.    .MinLength(4)
12.    .DataSource(source =>
13.    {
14.        source.Read(read =>
15.        {
16.            read.Action("PropertySearch_Read", "Search");           
17.        })
18.    .ServerFiltering(false);
19.    })
20.   .HtmlAttributes(new { style = "width:100%" })
21.    )
22. 
23. 
24.    @(Html.Kendo().Button()
25.        .Name("btnSubmit")
26.        .HtmlAttributes(new { type = "submit" })
27.        .Content("Search")
28.    )
29.}

Thanks,

Daniel

Georgi Krustev
Telerik team
 answered on 17 Sep 2015
1 answer
507 views

I have the following grid

<div class="actualGrid" id="actualGrid">
        @(Html.Kendo().Grid<AVNO_KPMG.Models.Bench>()
            .Name("grid")
 
        .Columns(columns =>
        {
            columns.Bound(p => p.name).Title("Bench").Filterable(ftb => ftb.Cell(cell => cell.Operator("contains"))).Width(125);
            columns.Bound(p => p.freeSeats).Title("Free Seats").Width(350);
 
            columns.Command(command => { command.Custom("checkBench1 ").Text(" AM ").Click("doCheckIn"); command.Custom("checkBench 2").Text(" PM ").Click("doCheckIn"); command.Custom("checkBench3").Text("All Day").Click("doCheckIn"); }).Width(250).Title("Check in");
 
        })
 
 
        //.Editable(editable => editable.Mode(GridEditMode.PopUp))
        .Pageable()
        .Sortable()
 
        .Scrollable()
                .Filterable(ftb => ftb.Mode(GridFilterMode.Row))
        .HtmlAttributes(new { style = "height:530px;" })
                .Events(events => events.DataBound("onDataBound"))
        .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)
        .Events(events => events.Error("error_handler"))
        .Model(model => model.Id(p => p.id))
                        .Read(read => read.Action("GetBenches", "Home"))
 
 
                )
        )
    </div>

 I would like to know if there is a way to change the size of the grid according to the number of results i have when i use filter

for Example if i filter first column and get 1 result grid would be small, and if i had 10 results i would be larger.

Radoslav
Telerik team
 answered on 17 Sep 2015
1 answer
129 views

Hello,

 

Could you please let me know how one can control the placement of the slider tooltip? By default it is to bottom and the ask is to have it placed above.

 

Thanks!

Petyo
Telerik team
 answered on 17 Sep 2015
4 answers
120 views

Hello, I'm currently evaluating the MVC controls. I've created a custom control panel where the user can filter  or create new items on the table.  Currently the filter is working perfectly using javascript. The create button is not.  I added the class k-grid-add but no luck. I look at the link the grid creates when using the standard create button in the toolbar and it looks something like this: tblAgents_Read?grid-mode=insert  . I've tried adding this link to my custom link but it will return all data in a json file.  Any help?

 

MiracleMan
Top achievements
Rank 1
 answered on 17 Sep 2015
1 answer
183 views

Hi,

we need to bind datatables to a grid. For that we found the following example code:

http://www.telerik.com/support/code-library/binding-to-datatable-0191a594e359

This is working fine with the following exception:

We need a custom popup editor. But this requires a model we do not have because the grid is <dynamic>. What can we do?

 Best regards,

Thomas

 

Boyan Dimitrov
Telerik team
 answered on 16 Sep 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
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
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?