Telerik Forums
Kendo UI for jQuery Forum
0 answers
116 views
I have a grid which is set up for master/detail rows.

One or two of the fields in the master row displays fields based on the sum of fields in the detail rows. This is all working nicely, but I need to be able to update the information displayed in the master row when the detail is changed.

I'd rather not resort to refreshing the entire grid when somebody adds or deletes a new details row.

I know I can grab the master row data using the detailInit event, but how can I update this data and make the grid display the new data?

Thanks
M
Top achievements
Rank 1
 asked on 27 Oct 2012
0 answers
70 views
Hi,

I am using kendo ui tree view. I have designed the tree view with parent nodes loading from database. 
And i want a unique grid to each of the parent. How can i able to do that dynamically using kendo ui.

Please provide me a sample or an example 

Thanks and Regards,
Srinivas
srinivas
Top achievements
Rank 1
 asked on 27 Oct 2012
2 answers
153 views
Hi all,
I have problem while update listview. 2 parameter: CreateDate and LastUpdate are miss when send by POST or GET.
CardLevelIID 1
CardLevelName Member
ConditionID 1
ConditionName Khi mua đặt từ 5 bàn trở lên
CreateBy 1
Description Only Member
DiscountPolicyID 1
Note Chú ý chỉ áp dụng cho những thành viên VIP
RestaurantID 4
UpdateBy 2

Please let me know where is problem. Thank so much!

Model:
public partial class spGetCardPolicyByDiscountIDAndResID_Result
    {
        public short ConditionID { get; set; }
        public string ConditionName { get; set; }
        public string Note { get; set; }
        public System.DateTime CreateDate { get; set; }
        public long CreateBy { get; set; }
        public System.DateTime LastUpdate { get; set; }
        public long UpdateBy { get; set; }
        public long RestaurantID { get; set; }
        public int DiscountPolicyID { get; set; }
        public byte CardLevelIID { get; set; }
        public string CardLevelName { get; set; }
        public string Description { get; set; }
    }
Controller:
public ActionResult Update([DataSourceRequest] DataSourceRequest request, spGetCardPolicyByDiscountIDAndResID_Result card, string discountID, string restaurantID)
        {
            AccountSession accsession = (AccountSession)Session["UserTGNH"];
            bool success = ResCardDataAccess.GetInstance().Update(card, discountID, restaurantID, accsession.AccountID);
            if (success)
            {
                return Json(ModelState.ToDataSourceResult(), JsonRequestBehavior.AllowGet);
            }
            else return null;
}
View:
---Template
@model IEnumerable<TGNH.Models.spGetCardPolicyByDiscountIDAndResID_Result>
@{
    string[] parameter = ViewBag.Parameter;
}
<div class="k-toolbar k-grid-toolbar">
    <a class="k-button k-button-icontext k-add-button" href="#"><span class="k-icon k-add"></span>Add new record</a>
</div>


<script id="card-list-view-template" type="text/x-kendo-template">
    <div class="product-view">
            <dl>
                <dt>Card Name</dt>
                <dd>${CardLevelName}</dd>
                <dt>Description</dt>
                <dd>${Description}</dd>
                <dt>Condition</dt>
                <dd>${ConditionName}</dd>
                <dt>Note</dt>
                <dd>${Note}</dd>
            </dl>
            <div class="edit-buttons">
                <a class="k-button k-button-icontext k-edit-button" href="\\#"><span class="k-icon k-edit"></span>Edit</a>
                <a class="k-button k-button-icontext k-delete-button" href="\\#"><span class="k-icon k-delete"></span>Delete</a>
            </div>
        </div>
</script>


                    @(Html.Kendo().ListView<TGNH.Models.spGetCardPolicyByDiscountIDAndResID_Result>(Model)
                        .Name("cardlistView" + @parameter[0])
                        .TagName("div")
                        .ClientTemplateId("card-list-view-template")
                        .DataSource(dataSource => dataSource
                            .Model(model => model.Id("CardLevelIID"))
                            .PageSize(6)
                            .Create(create => create.Action("Create", "ResCard", new { discountID = @parameter[0], restaurantID = @parameter[1] }))
                            .Read(read => read.Action("GetCardPolicyByDiscountIDAndResID", "ResDiscountPolicy", new { discountID = @parameter[0], restaurantID = @parameter[1] }))
                                    .Update(update => update.Action("Update", "ResCard", new { discountID = @parameter[0], restaurantID = @parameter[1] }).Type(HttpVerbs.Post))
                            .Destroy(destroy => destroy.Action("Editing_Destroy", "ListView"))
                        )
                        .Editable()
                    )


<script>
    $(function () {
        var listView = $("#cardlistView").data("kendoListView");


        $(".k-add-button").click(function (e) {
            listView.add();
            e.preventDefault();
        });
    });
</script>
---EditorTemplate
@model TGNH.Models.spGetCardPolicyByDiscountIDAndResID_Result
<div class="product-view">
    <dl>
        <dt>Card Name</dt>
        <dd>
            @(Html.EditorFor(p=>p.CardLevelName))
            <span data-for="ProductName" class="k-invalid-msg"></span>
        </dd>
        <dt>Description</dt>
        <dd>
            @(Html.EditorFor(p=>p.Description))
            <span data-for="UnitPrice" class="k-invalid-msg"></span>
        </dd>
        <dt>Condition</dt>
        <dd>
            @(Html.EditorFor(p=>p.ConditionName))
            <span data-for="UnitsInStock" class="k-invalid-msg"></span>
        </dd>
        <dt>Note</dt>
        <dd>@(Html.EditorFor(p=>p.Note))</dd>
    </dl>
    <div class="edit-buttons">
        <a class="k-button k-button-icontext k-update-button" href="\\#"><span class="k-icon k-update"></span>Save</a>
        <a class="k-button k-button-icontext k-cancel-button" href="\\#"><span class="k-icon k-cancel"></span>Cancel</a>
    </div>
</div>
Troy
Top achievements
Rank 1
 answered on 27 Oct 2012
1 answer
221 views
Hi:

I am getting the following error message:
   Microsoft JScript runtime error: 'uid' is undefined
The line in the dynamic code is as follows:
function anonymous(data) {
var o,e=kendo.htmlEncode;with(data){o='<tr data-uid="'+(uid)+'"><td >'+(e(name))+'</td><td >'+(e())+'</td></tr>';}return o;
}
I have an id defined in my model.

Phil
Phil
Top achievements
Rank 2
 answered on 27 Oct 2012
2 answers
551 views
How can i create an event that selects a specific item from a combobox and trigger the change event with that item?
Patrick Rioux
Top achievements
Rank 1
 answered on 26 Oct 2012
8 answers
499 views
Hi,

Is it posible to automaticly select current row after arrow keys is pressed?
I have 2 grids Master/Detail and pressing spacebar every time when arrow key was pressed is little annoying.
Dan
Top achievements
Rank 1
 answered on 26 Oct 2012
8 answers
106 views
Hi,
I test a sample in it as follows 
http://jsfiddle.net/7WVqL/106/ 
When kendo bind model , switch show abnormal 

Thanks
Max 
John Bowyer
Top achievements
Rank 1
 answered on 26 Oct 2012
0 answers
119 views

Hi

      We are trying to have a model binding within  a window.. I have a form A where on click of a button, form B opens in a kendo window with the model bound from form 1(Partial View rendered). Now when i click on submit button of form A. Whatever i typed in form A are bound and recieved as model in controller but whatever i used in form B throws null...please help kendo team..

Regards

RAJ

raj
Top achievements
Rank 1
 asked on 26 Oct 2012
0 answers
144 views
Hi,

I am trying to check the selected file sizes using IE8.

ie. Javascript as below:

 $(document).ready(function () {
            $("#attachments").kendoUpload({
                select: onSelect
            });
        });

Then when trying to retrieve the size in an onSelect javascript event of the selected files,  null is returned for the size of the file.
See attached jpg of IE8 javascript debugger.

Is there any workaround for this IE8 issue? 

Thanks,

Matt
Matt Meleski
Top achievements
Rank 1
 asked on 26 Oct 2012
1 answer
266 views
Hi,

I am relatively new to kendo UI, sorry if this is a very basic question..

I am using kendo data grid to get the data from a json webservice using AJAX call.

I have created a template which will open a tabstrip when the name field is clicked in data grid..

columns: [{
    field: "Name",
    title: "Name",
    width: 100,
    template:"<span onclick='tabStrip.append([{text: \"#=Name#  <a href onclick=DeleteTabs(this);>x</a> \",encoded: false,content:\"#=Name#\" }]);'>#= Name#</span>"
    //template: "<span onclick='tabStrip.append([{text: \"#= Name#\", contentUrl: \"/apps/dataelement?uid=#= Uid#\"}]);'>#= Name#</span>"
},

When I click the name value in data grid it opens a new tab strip and populates a default content.

Now I have another function which gets the UID as input and returns back the detail corresponding to a particular name in data grid, I am trying to populate the result from that function inside this tab but I am not sure on how to do that... Can someone please help....

Thanks,
BB
Barani
Top achievements
Rank 1
 answered on 26 Oct 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
Date/Time Pickers
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)
SPA
Filter
Drawing API
Drawer (Mobile)
Globalization
Gauges
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
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
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
Popover
DockManager
FloatingActionButton
TaskBoard
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?