Telerik Forums
Kendo UI for jQuery Forum
1 answer
143 views
Hi,

I am building a grid with inline editing and custom editors. I am wondering how to set the value of a field in this scenario. I don't think I want to use model.set in the change handler of my control, because I don't want to commit the data until the user clicks the "Save" button. Do I have to handle the save and cancel events myself to commit the entered data to the model (or not in the case of a cancel)? Or is there a built-in way to do this?

Thanks,
Steve
Stephen
Top achievements
Rank 1
 answered on 29 Oct 2013
2 answers
1.7K+ views
Hi,

I am using the e.model.isNew() to change the Title of the popup depending on whether Edit or Save is pressed.
That's working fine, I am however having an issue with then pressing the edit button to the added item.
The pop up is shown but with "Add", not "Edit" as the title.

If I refresh the page then it works as expected.

Code:
function onEdit(e) {
        if (e.model.isNew()) {
            // add
            $(".k-window-title").text("Add");
        } else {
            // edit
            $(".k-window-title").text("Edit");
        }

    }

Is there a way on the save event to specify that the model is no longer new?

    function onSave(e) {
        // set the model no longer as new ??
        
    }
Elliott
Top achievements
Rank 1
 answered on 29 Oct 2013
3 answers
1.9K+ views
Is it possible to remove the grid grouping programmatically? 
Jason
Top achievements
Rank 1
 answered on 29 Oct 2013
5 answers
487 views
I'm using CRUD for my scheduler with an aspx web service.  For the create and update event I am returning the created/updated event with the identifier in the json response, yet it is firing a second time as though something failed.  The response from the service is OK, so I'm not sure what could be causing this. 

What can I look at in the create/update complete event to tell if it added/updated the event?  Or is there a check somewhere in the javascript that if failed will cause it to fire again where I can put a break point and see what is happening?

Thanks.

Cyndie
Top achievements
Rank 1
 answered on 29 Oct 2013
1 answer
797 views
I have a grid that I have added the ColumnMenu to that allows the user to pick which columns they would like to see.  I am creating a "Reset" button that will restore the grid to its original state.  How do I reshow ALL of the columns that are part of the datasource?

I need to somehow have an "ALL" because this grid is being built dynamically and different users will have different columns so I can't hard code the values in here...

Basically I just need to have something like this...

...
var grid = $('#ListAccountsGrid').data('kendoGrid');
grid.showColumn('ALL or *');
...

Anyone have any ideas?
Ignacio
Top achievements
Rank 1
 answered on 29 Oct 2013
2 answers
57 views
Hi,
    I have multiple grids on a page which share the same change function. Is there a way to find which grid has triggered the event. I need to get the id of that grid and I am using plain HTML and jquery to implement all the grids.
Regards,
Vijay
Ignacio
Top achievements
Rank 1
 answered on 29 Oct 2013
5 answers
119 views
If I set data-transition="slide" on a view that contains a footer, and then navigate to that view via app.application.navigate() triggered by a drawer link, then the footer disappears and does not come back.

I don't really need a solution, just thought I'd put it out there.
Petyo
Telerik team
 answered on 29 Oct 2013
3 answers
252 views
http://jsbin.com/otImETiQ/20/

 I want for have two separate ScrollViews on a page but there seem to be some glitches:

  1. When the page first loads, an extra portion of the component is visible. I had to work around this with window.trigger('resize'); If there's a smarter way please let me know.
  2. If I apply padding to the scrollview, the div does not position itself correctly initially. It snaps into position after you attempt to interact with the widget.  (I found a workaround to by setting a translate param to the first child div) 
  3. The bottom scrollview isn't visible initial until the user starts to interact.
  4. For the bottom scrollview. With 3 data items, I'd expect to be able to page swipe to the 2nd page. That doesn't seem to work. The 3rd item doesn't appear to have been created.
  5. The pager for both show the number of items in the data source rather than the number of page.
Please any suggestions are welcome.

Thank you

Alexander Valchev
Telerik team
 answered on 29 Oct 2013
2 answers
632 views
Project Details:
ASP.NET MVC 4
Kendo UI Server Wrappers
C#
Twitter Bootstrap 2.3.2

We're the Kendo UI grid to show grouped results for our data.  Since we're using the server wrappers, one of the groups uses a Foreign Key column to show the value of a group instead of the id of the group.  I found a way to insert html into the group so that we can customize how it looks, and we're using the Bootstrap popover widget to display detail information when hovering over the group.  I found out that in our data, some of the values that will be displayed in the group contain the hash (#) symbol in it, which causes the kendo controls to give an error saying invalid template.  I know you can escape the hash with "\\", but this doesn't work correctly when trying to escape it in C# code.  If I do a ".Replace("#", "\\#"), what happens is it shows up in the grid like "\#Some more Text" instead of "#Some more Text".  How do we escape this in code?  The way I'm displaying the code is below:

C# Code:
GeneticModificationName = string.Format("{1} <span class='StrainDetailToolTipClass' data-placement='right' data-toggle='popover' data-content='<div>{0}</div>' title='Strain Description'><i class='icon-info-sign'></i></span>"
                + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style='color: #245fac; font-size: 10px !important; font-weight: bold;'>Genotype Order: ({2})</span>",
                ugStrain.Strain.Description != null ? Server.HtmlEncode(ugStrain.Strain.Description.Replace("#", @"\\#")) : "No Strain Description Available.",
                Server.HtmlEncode(ugStrain.Strain.Name.Replace("#", @"\\#")), sb.ToString())


Grid Column Snippet from Server Wrapper:
columns.ForeignKey(m => m.UserGroupStrainId, (System.Collections.IEnumerable)ViewData["Strains"], "StrainId", "GeneticModificationName").Title("Strain").Hidden();
Jim
Top achievements
Rank 1
 answered on 29 Oct 2013
1 answer
206 views
MVC, Razr

I've got a model Event.  Event has children Participants.  

On the detail page for Event I am trying to display a list of participants for the currently viewed event and give the user the option to select participants.  

 I can't figure out how to display the participants for the currently selected Event using JSON bound grid.  I did manage to get this working with the events on the index page (selectable events, checkboxes etc), but I can't figure out how to create a JSON request to the controller for the participants for the currently selected Event.  

I did have better luck with binding to the view model (below), but I can't get my checkboxes to display (first column) and even if I get them displaying, I'm not really sure I want to loop through the rows with jscript and process each checked row. 

Thanks in advance

michael

<code>
====== Controller ========
        public ActionResult Details(int id = 0)
        {
            Event evt= db.EventFind(id);
            if (deform == null)
            {
                return HttpNotFound();
            }
            return View(evt);
        }

====== View ========
@model Application.Models.Event
...
@(Html.Kendo().Grid(Model.Participants).Name("participantsGrid")
      .Columns(c =>
          {
              c.Template(@<text></text>).ClientTemplate("<input type='checkbox' #= ApprovedFlag ? checked='checked':'' # class='chkbx' />")
             .HeaderTemplate("<p>Org Approved</p>");
             c.Bound(p => p.FullName).ClientTemplate(@Html.ActionLink("#=FullName#", "Details", new { Id = "#=ParticipantId#" }).ToHtmlString());
             c.Bound(p => p.ParticipantId);
              c.Bound(p => p.OrgApprovedFlag);
          })
            .DataSource(ds => ds
                   .Server()
                    .Model(model =>
                    {
                        model.Id(p => p.ParticipantId);
                    })
            .Read(read => read.Action("GetParticipants", "Event"))
            )
          )
</code>
Petur Subev
Telerik team
 answered on 29 Oct 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Drag and Drop
Application
Map
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
DropDownTree
ListBox
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?