Telerik Forums
UI for ASP.NET MVC Forum
3 answers
72 views

I have set up a asp.net MVC web app and in the layout.cshtml I set a mobilelayout and mobiletabstrip.  The mobile application's server navigation has been set to false, so that the partial views are obtained from the controller via ajax but they are only gotten once (never refreshed).  I have set a couple of events on the view for before show and was thinking that I could go and grab the latest partial view from the controller here.

Is this process a good idea or is there a better way?

Veselin Tsvetanov
Telerik team
 answered on 20 Dec 2017
4 answers
1.1K+ views

Hello,

I would like to fire click Event when already selected tab item is clicked. Looks like OnSelect doesnt get fired if the selected item is clicked again. I tried implementing JavaScript but doesnt get fired

$(function () {
$("#tbAdress .k-tabstrip-items").on("click", "li.k-state-active", function () {
//custom logic
});
});

 

here is my layout

@(Html.Kendo().MobileLayout()
.Name("mobile-tabstrip")
//.Header(obj => NavBarTemplate(this))
.Header(
@<text>
@Menumobile()
</text>
)
.Footer(
@<text>
@(Html.Kendo().MobileTabStrip()
.Name("tbAdress")
.SelectedIndex(999)
.Events(events => events
.Select("onTabSelect")
)
.Items(items =>
{
                   
                    items.Add().Text("Objekt").HtmlAttributes(new { @data_icon = "home" });
items.Add().Text("GoogleMaps").HtmlAttributes(new { @data_icon = "gps-e" });
})
)
</text>)
)

 

How can i achieve this

 

-Anamika

Anamika
Top achievements
Rank 1
 answered on 31 Oct 2017
1 answer
71 views
I am trying to fire an action every time a mobile tabstrip item is selected and not just the first click. This is very common for refreshing the current view or scrolling back to the top on apps like Twitter that are an endless scrolling list. 

data-select="onSelect" only fires when the item is inactive (first time) and data-click="onClick" which I saw here in the forums does nothing nor is it in the api docs (deprecated maybe?). 

I tried simply using jQuery to get (#tabstrip a).click() and then reset the scroller of the current view but this would only fire on subsequent clicks (not the initial) and it wasn't working right on my phone, only in the simulator. 

Please advise on the best way to do this?
Kiril Nikolov
Telerik team
 answered on 24 Jun 2014
3 answers
106 views
Can we use the mobile mvc tabstrip with web?
I cant seem to get any css on my tabstrip

Also when initializing tabstript this messes up bootstrap menu, menu now covers page content.
Where am I going wrong,
Thanks


   
         @code
 Dim mobileTab As Kendo.Mvc.UI.MobileTabStrip = Html.Kendo.MobileTabStrip().Name("mobileTab").Items(Sub(items)
items.Add().Icon("contacts").Text("Products")
items.Add().Icon("cart").Text("Shopping Cart")
 End Sub) _
 .Events(Function(events) events.Select("onSelect"))
 
 
mobileTab.Render()
 End Code
         
      
        @Html.Kendo().MobileApplication().ServerNavigation(true)
Kiril Nikolov
Telerik team
 answered on 04 Apr 2014
0 answers
252 views
I've seen some of the documentation regarding how to create custom icons for Kendo UI Mobile, but can someone please give me an example of how it is applied to the MobileTapStrip in ASP.NET MVC?

Here's what I've tried so far:

<style>
    .km-root .km-pane .km-view .km-home1
    {
        background-image: url("/Images/Icons/home1.png");
    }
</style>

@(Html.Kendo().MobileLayout()
    .Name("mobile-main")
    .Footer(
        @<text>
            @(Html.Kendo().MobileTabStrip()
                .Items(items => {
                    items.Add().Icon("home1").Text("Home").Url("#view-home");
                    items.Add().Icon("cart").Text("Purchases").Url("#view-purchases");
                    items.Add().Icon("bookmarks").Text("Reports").Url("#view-reports");
                })

            )
        </text>
    )
)

OK, I've figured it out:

@(Html.Kendo().MobileLayout()
    .Name("mobile-main")
    .Footer(
        @<text>
            @(Html.Kendo().MobileTabStrip()
                .Items(items => {
                    items.Add().Icon("home1").Text("Home").Url("#view-home");
                    items.Add().Icon("purchases").Text("Purchases").Url("#view-purchases");
                    items.Add().Icon("reports").Text("Reports").Url("#view-reports");
                })

            )
        </text>
    )
)

CSS:

.km-root .km-pane .km-view .km-icon {
    background-size: 100% 100%;
    -webkit-background-clip: border-box;
    background-color: currentcolor;
}

.km-home1 {
    -webkit-mask-box-image: url("/Images/Icons/home1.png");
    background-color: red;
}

.km-purchases {
    -webkit-mask-box-image: url("/Images/Icons/money.png");
    background-color: red;
}

.km-reports {
    -webkit-mask-box-image: url("/Images/Icons/documents.png");
    background-color: red;
}
Steven
Top achievements
Rank 1
 asked on 04 Aug 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
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
DateTimePicker
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
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
Bronze
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?