Telerik Forums
UI for ASP.NET MVC Forum
2 answers
111 views
Hello,
i tried to use HtmlAttributes method on a grid command column,with the following
....
command.Edit().Text(" ").HtmlAttributes(new {@class = "min-width-class" });
and nothing happened.

Is this possible, can i put a class to this button?

Regards,
Daniel
Daniel
Top achievements
Rank 1
 answered on 12 Apr 2013
12 answers
123 views
Hello,
In IE9,sometimes,i get the pagination for the grid,without round buttons,insteed they are square,could you tell me why?

Regards,
Daniel
Daniel
Top achievements
Rank 1
 answered on 12 Apr 2013
11 answers
608 views
Hello!
I have DropDownList with OptionLabel
If I create new data, first element in my DropDownList  , it's text from OptionLabel
And I push SaveButton! But I don't get error : "you have not chosen 'here name of field'"!
what am I doing wrong?

Thanks for help!
Vladimir Iliev
Telerik team
 answered on 12 Apr 2013
3 answers
186 views

So may be it has no idea of the container?

Can you pass to your support team for a quick answer?

 

@(Html.Kendo().Grid<PGE.MCRM.RDC.Web.ViewModel.TCA.CustomNotionalValueVM>()

    .Name("grid")       

    .Columns(columns =>

    {       

        columns.Bound(p => p.TRADE_KEY).Title("Trade Key").Width(80);

        columns.Bound(p => p.SYS_NAME).Title("PG&E System").Width(120);

       

        columns.Command(command => command.Destroy()).Width(110);

    })

    .ToolBar(toolbar =>

    {

        toolbar.Create();

        toolbar.Save();

    })   

    .Editable(editable => editable.Mode(GridEditMode.InCell))

    .Sortable()

    .Scrollable()

        .Filterable()

     .Events(e => e.Edit("gridEdit"))

    .DataSource(dataSource => dataSource

        .Ajax()       

        .Batch(true)

        .ServerOperation(false)

        .Events(events => events.Error("error_handler"))

        .Model(model => {

            model.Id(p => p.TRADE_KEY);

            model.Field(p => p.TRADE_KEY).Editable(false);        }

            )       

                .Create(update => update.Action("SaveNotionalValues", "TCA"))

            .Read(read => read.Action("GetNotionalValues", "TCA", new { sysID = "17", userID = "", tradeKey = "" }))

                .Update(update => update.Action("SaveNotionalValues", "TCA"))

            .Destroy(update => update.Action("DestroyNotionalValues", "TCA"))

 

    )   

 

//edit event and I check it is calling this function when I click on the new created row second column

function gridEdit() {

        //handle the grid edit event to get the dropdownlist show up

                $('<input  id="SYS_NAMEID" name="SYS_NAMEID" required />').appendTo(container).kendoDropDownList({

                autoBind: false,

                dataSource: pgeSystemsDataSource,

                dataTextField: "SYS_NAME",

                dataValueField: "SYS_NAME",

                });

                $('<span class="k-invalid-msg" data-for="SYS_NAME"></span>').appendTo(container); 

            

    }

Yun
Top achievements
Rank 1
 answered on 12 Apr 2013
2 answers
97 views
Hi,

I have person details model and has address, city, state, postal code fields. Out of them the state and postal code are optional. I have not applied any external validations.
[Display(Name = "Address")]
[DataType(DataType.Text)]
[StringLength(200)]
[Required]
public string Address { get; set; }
 
[Display(Name = "State")]
[DataType(DataType.Text)]
[StringLength(100)]
public string State { get; set; }
 
[Display(Name = "Postal Code / Zip")]
[DataType(DataType.Text)]
[StringLength(10)]
public string ZipPostalCode { get; set; }

When I perform the add/edit operation through screen, i get address, state, postalcode are mandatory validation error in IE8. It works perfectly fine in IE9 and Chrome. I am using latest Kendo ASP.Net MVC build Q1 2013.

The same thing happens with my nullable foreign key. It excepts null value in IE9 and Chrome whereas gives validation error in IE8.

Thanks,
Nirav
Daniel
Telerik team
 answered on 12 Apr 2013
2 answers
139 views
Hello!
I have one questons!

I use help from 
http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/listview/editing

and why if I use "public ActionResult Editing_Create"
 I need return 
return Json(new [] { product }.ToDataSourceResult(request, ModelState));
but if I use public ActionResult Editing_Update
I need return 
return Json(ModelState.ToDataSourceResult());

In my project,when I use 
return Json(ModelState.ToDataSourceResult());
for my Update Method...I get "ModelState.ToDataSourceResult = null", and if I use first example, I get what I need

Please help!
Give me please some explanation
And sorry for my bad English
Ernesto
Top achievements
Rank 1
 answered on 11 Apr 2013
3 answers
357 views
Are there any client side events available for events related to the filter popup menu of the grid?

We are currently using jquery Globalize(https://github.com/jquery/globalize) as a solution to our globalization requirement for our web app.

To keep number and date formats consistent accross the application we would like to use the plugin for the kendo ui grid as well (we're currently evaluating kendo ui as a replacement for the grid that we currently use). 

Our current grid exposes events such as FilterPopUp and FilterRequest. We need such client side events so that when a user interacts with the filter menu, we can format/unformat numbers/dates that the user interacts with in order to keep a standard format within the grid but display globalized values to users.

1) Does the Kendo UI Grid filter menu expose such events?

2) Has anyone successfuly implemented globalization without using the built in kendo globalization?


Thank you,
Daniel
Telerik team
 answered on 11 Apr 2013
1 answer
369 views
Hello I have searched everywhere I can think of and cannot find any guidance on how to do a Full Text Search Filter.
I need to filter on ANY Word, ALL Words or EXACT phrase selected from a combo box.
Your built in filter thing is impractical for 90% of all my filter needs so I have to create my own filters using $filter.push 
One of the fields in my database ( which is obviously not displayed in the grid) contains many thousands of words, so a normal
$filter.push({ field: "Chapter", operator: "contains", value: $SearchString });
would be unsuitable

Please can you help me find the relevant documentation on how to filter with Full Text Search on a field that does not appear in the grid.
If FTS is not possible, would you suggest that I forget about using an MVC wrapper and try learning  about your basic Kendo UI ( or whatever you call it)

Many thanks.
Atanas Korchev
Telerik team
 answered on 11 Apr 2013
6 answers
580 views
I am using the Autocomplete control on an asp.net MVC3 razor page.  I bound the autocomplete to a list of measurements in my model.  The Datatextfield is a property on a measurement with a datatype of decimal ex. 1.25.  However, I get an error Object doesn't support this method 'ToLowerCase'.  Can I not use a DataTextField which is not a string?  My datasource is a list of numbers, not strings.

The error 'object doesn't support this method toLowerCase' happens on the code below:

function anonymous(d, __f, __o) {
return (d.measurement.toLowerCase().lastIndexOf('1', 0) == 0)
}


Here is my configuration:

@(Html.Kendo().AutoComplete()
.Name("measuresautocomplete")
.BindTo(Model.measures)
.DataTextField("measurement")
.Filter(FilterType.StartsWith)
)
Timothy
Top achievements
Rank 1
 answered on 11 Apr 2013
3 answers
1.9K+ views
I'm following the basic model of displaying a window from an action in a Kendo Grid. The content of the window needs to be loaded via a Partial View from an Action but I cannot figure out how to pass data to the Window so that when it loads the View it can pass that data along. I need to accomplish something akin to the code below.

@(Html.Kendo().Grid<ActivationModel>()
   .Name("activationGrid")
        .Columns(columns =>
   {
            columns.Bound(p => p.RawMessageId).Hidden();
            columns.Command(command => command.Custom("SendActivation").Text("Re-send Activation Email").Click("sendActivation"));
        })
.DataSource(dataSource => dataSource
            .Ajax()
            .ServerOperation(false)
            .PageSize(20)
            .Read(read => read.Action("Activations", "Activation"))
            .Model(model => model.Id(k => k.RawMessageId))
        )
)
    @(Html.Kendo().Window().Name("ActivationWindow")
    .Title("Customer Details")
    .Visible(false)
    .Modal(true)
    .Draggable(true)
    .Width(300)
    .LoadContentFrom("Activation", "ResendActivation", new { rawId = [NEED TO INSERT DATA HERE] })
)

<script type="text/javascript">
    function sendActivation(e) {
        e.preventDefault();
        var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
        var wnd = $("#ActivationWindow").data("kendoWindow");
        wnd.center().open();
    }
</script>
Petur Subev
Telerik team
 answered on 11 Apr 2013
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
ColorPicker
DateRangePicker
Security
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
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
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?