Telerik Forums
Kendo UI for jQuery Forum
2 answers
203 views
I am creating a grid, and the object each row is bound to contains a complex object that I want to be able to edit and update. The object has a property that is just a number, and I want to be able to see/edit/update that number in the grid. I can make the number visible easily enough using a template, but does the grid know how to allow edits/updates to the original data source?

As an example, the object the row is bound to may look like:

data = {
    ListPrice: {
        value: 8.99
    }
}

So, I want to show "8.99" in the grid, which I can do by defining my columns like so:

columns: [
    {
        field: 'ListPrice',
        title: 'List Price',
        template: '#= ListPrice.Value #'
    }
]

But, will I be able to edit this value in the grid? And how will the grid know to update the Value property when I do the edit?

Thanks
G_P
Top achievements
Rank 1
 answered on 03 Aug 2012
0 answers
318 views
I'm writing an app to allow users to create/modify XML strings.  I'd like to use the editor for that.

    var editor = $("#templateEditor").data("kendoEditor");
    editor.paste("paste in a string" + "<xmlNode>inner text</xmlNode>");

with the above I will get the "paste in a string" and "inner text" but not the node tags.  is there a way to allow this so the user can just modify everything as text string?
Eric
Top achievements
Rank 1
 asked on 03 Aug 2012
2 answers
186 views
I have a requirement where the application has to allow the users to not enter or select any date in the DatePicker control that is present in the grid. If no date is selected the value goes back to the database as null and also shows up as null in the grid.I do not want null to show up in the grid, is there a way to override the null value with something more meaningful like 'TBD' or just leave it empty and not display anything in that field.
Kavitha
Top achievements
Rank 1
 answered on 03 Aug 2012
6 answers
199 views
I think I just encountered a strange bug. I am running on both the Android 4.0.3 Emulator and an Android 4.0.3 Device (Samsung Galaxy S II).

If I initialize my application like so:
app = new kendo.mobile.Application($(document.body));
<input> html elements seem to not function. As in I can not edit text in text boxes and buttons don't fire any bound click events.

However, If I initialize the application in the following manner:
app = new kendo.mobile.Application($(document.body), {platform: "android"});
then I have no problems at all. Obviously, I would like to use the first initialization for cross-platform styling. 

This does not happen if I use the 2012.1.515 version of Kendo's styles, <inputs> will work either way with them.
I would also like to use the newer styles since I think they look better on the android platform.

I have already looked at this documentation: http://docs.kendoui.com/getting-started/mobile/forms
But using the css at the bottom has had no effect.
RodEsp
Top achievements
Rank 2
 answered on 03 Aug 2012
2 answers
270 views
Hi,
I'm working with kendo listview and datasource.
Dates from Json data are returned as "\/Date(1338364370930)\/".
This is my current date part template:
<dt>@FieldNames.CreateDate :</dt>
<dd>#= (CreateDate == null) ? ' ' : kendo.toString(new Date(parseInt(CreateDate.substr(6))), "d") #</dd>

I've had to add the "new Date(parseInt(CreateDate.substr(6)))" part in order to show correctly the date.
Without this code the date appear \/Date(1338364370930)\/ without conversion. This is my first issue. Why kendo datasource or listview cannot process or convert directly json dates?

My second issue is I'm converting the date to a short format with "d", currently my culture is spanish and the date appears as "5/30/2012" (m/dd/yyyy). This is wrong, in spain it must be "30/5/2012" (dd/m/yyyy). I've checked my internet explorer and the language is set to spanish. Tried with Chrome and with the same result. Any idea? 

Regards
Jose
Jayson
Top achievements
Rank 1
 answered on 03 Aug 2012
1 answer
263 views
Hi everyone!

i have a little problem, i made a kendo ui grid, and i added a Columns Template (checkbox), and agregates function, sum and avarage, it works perfectly.

but i wanna do the fallowing: the user will enable some checkbox , the grid has to refresh , i mean the agregate needs to recalculate again, when the user selects checkboxes.

so, i have 3 rows A , B , C. by default all are selected and agregate are calculated, but it happends that the user removes B, so the grid needs to recalculate de "sum" and "avarage" again for A and C.

this is my code so far: i wanna basicly wanna refresh my agregates with help of a checkbox.  im using Kend ui with razor. any help will be super appriciate!


 @(Html.Kendo().Grid(Model)
                 .Name("Grid")
        
                 .Navigatable()
                 .Columns(columns =>
                              {
                                  columns.Template(@<text>
                                                        <input name="LstModelSel" type="checkbox" title="LstModelSel"  onclick="Refresh(@item.TotalOutstanding)" value="@item.ExposureNummer"
                     
                                                            @if (Model.Any(p => p.ExposureNummer == item.ExposureNummer))
                                                            {
                                                                @("checked=checked")
                                                            }
                        
                                                            />
                                                    </text>)
                                      .HeaderTemplate(@<text>
                                                           <input id="LstModelSel" type="checkbox"   title="LstModelSel"
                          
                                                               @if (Model.Any())
                                                               {
                                                                   @("checked=checked")
                                                               }
                                                               onclick="return LstModelSel_onclick()" />
                                                       </text>)
                                      .Width(50)
                                      .HtmlAttributes(new { style = "text-align:center" })
                                      .HeaderHtmlAttributes(new { style = "text-align:center" });

                                  columns.Bound(p => p.ExposureNummer);

                                  columns.Bound(p => p.GroupNummer);
                                  columns.Bound(p => p.Name);
                                  columns.Bound(p => p.TypeofLoan);
                                  columns.Bound(p => p.TotalLimit);
                                  columns.Bound(p => p.TotalOutstanding).GroupFooterTemplate((@<text>  <div> Total: @item.Sum  </div>   <div> Average: @item.Average   </div>    </text>));


                                  columns.Bound(p => p.ArpovalDate);
                                  columns.Bound(p => p.Status);
                                  columns.Bound(p => p.Rating);
                                  columns.Bound(p => p.EL);
                                  columns.Bound(p => p.LostProvision).GroupFooterTemplate((@<text>  <div> Total: @item.Sum  </div>   <div> Average: @item.Average   </div>    </text>));

                              })
                 .Pageable()
                //.Events(e => e.DataBound("Refresh()"))
                                    

                 .DataSource(dataSource => dataSource
                                               .Server()
                                               .PageSize(20)

                                               .Aggregates(ListModel =>
                                                               {

                                                                   ListModel.Add(p => p.TotalOutstanding).Average();
                                                                   ListModel.Add(p => p.TotalOutstanding).Sum();
                                                                   ListModel.Add(p => p.LostProvision).Average();
                                                                   ListModel.Add(p => p.LostProvision).Sum();

                                                               })
                                               .Group(groups => groups.Add(p => p.ExposureNummer)
                                               )/*Agregates*/))
  }  
   
 
}


<script type="text/javascript">
    $(document).ready(function () {
        $('#LstModelSel').click(function () {
            $("#Grid tbody input:checkbox").attr("checked", this.checked);
        });
    });

    function Refresh(V) {
        var sum = 0;
        var val = V;
    
        
        document.getElementById('re').value = val;
    }



    function LstModelSel_onclick() {

    }

</script>

Jose
Top achievements
Rank 1
 answered on 03 Aug 2012
0 answers
102 views
HI,

Im using Kendo q2 latest version. I have implemented listview. I have a button for EDIT mode and in my edittemplate , I have defined

editTemplate: kendo.template($("#editTemplate").html())

But when I click on this Edit button, its not entered into Edit mode.

Can u just suggest any help for this?

Thanks and regards,
Durga bhavani.G 

 

 

durga bhavani
Top achievements
Rank 1
 asked on 03 Aug 2012
0 answers
84 views
Hi friends,how to install windows 7 can anyone tell me step by step..
Alex
Top achievements
Rank 1
 asked on 03 Aug 2012
0 answers
81 views
Hi all,

I am just wondering is there any way to find record status  in data source , when we are doing CRUD operation ??
I mean so and so record is inserted / updated / deleted ...

Thanks in advance.

 
Ambica
Top achievements
Rank 1
 asked on 03 Aug 2012
3 answers
217 views
Hi,
My Popup Issue

 @(Html.Kendo().Window()
        .Name("roleRightsWindow")
        .Width(600)
        .Height(500)
        .Title("Rights List")
        .Actions(actions => actions.Close())
        .Visible(false)
        .Modal(true)
.LoadContentFrom("_DARoleRightsAssignedAllForPopUp", "DataAccess", new { roleId = 4, roleTypeId = 1 })
)
The above works just fine upon page load (for basic testing), but I want to call the same controller and action but with various values for the parameters gotten from one column in a grid and upon a button click of another column in the same grid.
I tried to find an example but could not.
Help would certainly be appreciated.
Thanks,
Murph
Alex Gyoshev
Telerik team
 answered on 03 Aug 2012
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
Application
Map
Drag and Drop
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
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?