Telerik Forums
Kendo UI for jQuery Forum
1 answer
109 views
 How to add 'Menu' next to title of 'Window' Component or on hover of custiom icon how to populate a menu with 4 items

Thanks,
Chetan 
Dimo
Telerik team
 answered on 21 Sep 2012
0 answers
136 views
Hi there

I am using the following code, which renders the correct brand (from a list of brands) and all the appropriate ranges applicable to that brand, with the correct brand selected. All good so far :)

<div class="formElement">   
    <label for="brands">Brand:</label>
    <input id="brands" value="@(Model.BrandID)" />
</div> 
 
<div class="formElement">   
    <label for="ranges">Ranges:</label>
    <input id="ranges" value="@(Model.RangeID)" />
</div>
 
<script type="text/javascript">
    var brandSource,
    rangeSource;
 
    $(document).ready(function () {
 
        brandSource = new kendo.data.DataSource({
            error: handleError,
            transport: {
                read: {
                    url: "@Url.Action("Brands ", "DropDown ")",
                    type: "POST"
                }
            },
            batch: false,
            schema: {
                model: {
                    id: "Value",
                    fields: {
                        Value: {
                            type: "number"
                        },
                        Text: {
                            type: "string"
                        }
                    }
                }
            }
        })
 
        rangeSource = new kendo.data.DataSource({
            error: handleError,
            transport: {
                read: {
                    url: "@Url.Action("Ranges ", "DropDown ", new { brandId = Model.BrandID })",
                    type: "POST"
                }
            },
            batch: false,
            schema: {
                model: {
                    id: "Value",
                    fields: {
                        Value: {
                            type: "number"
                        },
                        Text: {
                            type: "string"
                        }
                    }
                }
            }
        })
 
 
        $("#brands").kendoComboBox({
            placeholder: "Select brand...",
            dataTextField: "Text",
            dataValueField: "Value",
            dataSource: brandSource
        });
 
        $("#ranges").kendoComboBox({
            //cascadeFrom: "brands",
            placeholder: "Select range...",
            dataTextField: "Text",
            dataValueField: "Value",
            dataSource: rangeSource
        });
 
    });
</script>

I would like to be able to select a different brand and for it to reload the ranges as appropriate, but as soon as I uncomment the 'cascadeFrom' line the whole thing falls apart:

1) The appropritae Brand is not selected
2) The range is disabled, but even if I select a brand is returns zero results

I presume this is something to do with the datasource having the @Model.BrandID defined as a parameter and needing to clear this? :-/ Any advice would be greatly received. Thank you.
Rich
Top achievements
Rank 1
 asked on 21 Sep 2012
2 answers
77 views
When you add a modalview inside a view in a pane of a splitview:
1) the modalview can only be opened if the parent view is active (no way to share it across views via a layout navbar),
2) the modalview opens in that pane, which means the width is limited by the size of the pane.

I would like:
1) to open the modalview on top of the splitview, in the center of the screen
2) share a button in header through a layout an be able to open the modalview whatever view is displayed in teh background

A bug? a design trade-off? my mistake and in this case any sample available?
Josh
Top achievements
Rank 1
 answered on 21 Sep 2012
1 answer
372 views
My code is like below this.I am trying to replace content URL and title for my current tabs.I am not able to do that successfully and it is showing me same view.Am I doing something wrong or please show me example so I can able to do that.

src  = /Account/Register

 var tabStrip = $("#tabs").data("kendoTabStrip");
            $($('#tabs').find('k-link')).data('contentUrl', src);
            $($('#tabs').find('k-link')).data('text', title);           
            tabs.select(tab.index());        
            tabStrip.reload();
Iliana Dyankova
Telerik team
 answered on 21 Sep 2012
3 answers
136 views
Hello,

I've noticed a bug with the the grid scroll when working with the virtualization of remote data.

When I try to scoll until the last row of the grid, sometime the last rows won't be displayed.  Sometimes, I'll be able to see only the top part of the last row, sometime 1 to 5 rows won't be displayed at all and sometime, everything will be displayed correctly.

I did check on the server to make sure that all the data was returned and I looked carefully at my code to make sure there was no bug on the client side.  Then I tried your virtualization of remote data demo and to problem occurs in your demo too.

To reproduce the bug on the Demo, sort the grid by OrderID in DESC order (For some reason, the bug won't occur in the ASC order)

Then take your mouse and scroll all the way down to the last row.  The last OrderID is suppose to be 10248 and 50% of the time, it is.  Then start to scroll up and down mutiple time and then go see the last row's OrderID.  Do this 10+ times and you'll see a couple of different results.

Best regards,

Simon

Alexander Valchev
Telerik team
 answered on 21 Sep 2012
0 answers
294 views
Hi...I saw some examples on the internet regarding data binding using json in ListView but those things are not working in my case. I have a Controller named "Contact" and there is method named "Read", in Read () method I get the Contact list which I want to show in ListView in Mobile. Here is my View Code...


<div data-role="view" id="tabstrip-profile" data-title="Dashboard" data-layout="mobile-tabstrip"
    data-init="initListView">
    <ul data-role="listview" data-style="inset" data-type="group">
        <li>
            <ul id="contactList">
            </ul>
        </li>
    </ul> 

</div>
<script type="text/javascript">
var deviceJDS = new kendo.data.DataSource({
            transport: {
                read: {
                    contentType: "application/json; charset=utf-8",
                    type: "GET",
                    data: "{}",
                    dataType: "json",
                    url: "/Contact/Read"
                }
            },
            schema: {
                data: "d" 
            }
        });


        function initListView(e) {
            e.view.element.find("#contactList").kendoMobileListView({
template: "<strong>#:data.DisplayName#</strong>",
            dataSource: deviceJDS
            });

}

var app = new kendo.mobile.Application(document.body);

</script>
Mayank
Top achievements
Rank 1
 asked on 21 Sep 2012
2 answers
144 views
I have a following scenario: Mobile view renders blocks of data based on view model array using MVVM and templating.
I have also add and remove button to add and remove elements to/from array.

To reproduce my issue:
1. Suppose you have 3 elements that fit in your mobile view complete, so scrolling is not needed. (screenshot_1)
2. Push "Add" button and forth element appears on mobile view, scrolling now is active, scroll down to see buttons (screenshot_2)
3. Push "Remove" button, last element is removed from DOM, but view remains "scrolled" and the worst is - I could not scroll it up (screentshot_3)

Is it possible somehow to scroll view back? After some clicks It goes back, but on iPad I could not do anything, it stays as "scrolled up".

I prepared fiddle, I can this reproduce on Windows / Chrome, and iPad also, see also screenshots
http://jsfiddle.net/KuYTL/18/ 

Alex
Top achievements
Rank 1
 answered on 21 Sep 2012
0 answers
201 views
Hi,

I am a new programmer with Kendo UI on MVC, I have a question to ask supporter.
I am using Kendo Grid call popup window when I edit button click like code below :

@(Html.Kendo().Grid<tblAttachFile>()
    .Name("tblAttachFile")
    .BindTo(Model.tblAttachFiles)
    .Columns(col =>
    {
        col.Bound(p => p.Attach_File_Name).Title("File Name");
        col.Bound(p => p.Attach_File_Path).Title("File Path");
        col.Bound(p => p.Attach_File_Description).Title("File Description");
        col.Command(cmd => cmd.Edit());
    })
        //.ToolBar(toolbar => toolbar.Create())
    .Editable(ed => ed.Mode(GridEditMode.PopUp).Window(w => w.Name("winEdit").Title("My Test").Content("Loading").LoadContentFrom("Edit", "AttachFile", new { id = 1 })))
    .Pageable()
    .Sortable()
    .Scrollable()
    .DataSource(ds => ds
        .Server()
        .Model(m => m.Id(p => p.Attach_File_ID))
        .Update("Edit", "AttachFile")
        )
)

I want to get Attach_File_ID in to route value in this line 
.Editable(ed => ed.Mode(GridEditMode.PopUp).Window(w => w.Name("winEdit").Title("My Test").Content("Loading").LoadContentFrom("Edit", "AttachFile", new { id = Attach_File_ID })))
When I enter id number like (1, 2, 3) it is work correct.

How can I get dynamic ID in route value ?

This code below is my controller that I want to do :
// GET: /tblAttachFiles/Edit/5
[Authorize]
public ActionResult Edit(int id)
{           
    tblAttachFile tblattachfile = tblattachfileRepository.GetOne(id);
    ControllerHelper.filePath = tblattachfile.Attach_File_Path;
    return View(tblattachfile);
}
 
//
// POST: /tblAttachFiles/Edit/5
 
[AcceptVerbs(HttpVerbs.Post), Authorize]
public ActionResult Edit(int id, FormCollection collection)
{
    tblAttachFile tblattachfile = tblattachfileRepository.GetOne(id);
    try
    {
        tblattachfile.Attach_File_Path = ControllerHelper.filePath;
        ControllerHelper.filePath = "";
 
        tblattachfile.Updated_Date = DateTime.Now;
        tblattachfile.Updated_By = User.Identity.Name;
 
        UpdateModel(tblattachfile);
        tblattachfileRepository.Save();
        return RedirectToAction("Detail", new { id = tblattachfile.Attach_File_ID });
    }
    catch
    {
        ModelState.AddRuleViolations(tblattachfile.GetRuleViolations());
        return View(tblattachfile);
    }
}

Thank advanced,
Sorry For my bad English !
KHUN
Khieu Kim Khun
Top achievements
Rank 1
 asked on 21 Sep 2012
1 answer
164 views
I'm testing my new Kendo Upload tool in an MVC site. I've found in our XP QA machine, using any version of IE, I'm not able to upload any images (I've set to only allow .jpg). I get a permission denied error in my XMLHttpRequest response.

I believe this is because we're showing the MVC site inside of an iframe of another site, and we're getting some kind of cross-domain issue. However if this were the case, would it only be happening in an XP environment, or all of them? Does anyone know enough about Kendo to point me in the right direction?

    @(Html.Kendo().Upload()
        .Name("images")
        .Async(async => async
            .Save("Save", "Upload")
            .Remove("Remove", "Upload")
            .AutoUpload(true)
        )
        .Events(events => events
            .Select("onSelect")
            .Remove("onRemove")
            .Error("onError")
            .Upload("onUpload")
            .Success("onSuccess")
        )
    )
T. Tsonev
Telerik team
 answered on 21 Sep 2012
1 answer
121 views

Dear Kendo support team,

I use Kendo UI grid within a Bootstrap Responsive Layout and  would like to add 2 items to the grid's column menu.

One for increasing the current column width by a certain amount and one for the shrinking the width. Ideally I would like to have an icon as menuitem.

Please give me some advise how to manage this.

Thank you in advance

Petur Subev
Telerik team
 answered on 21 Sep 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?