Telerik Forums
UI for ASP.NET MVC Forum
0 answers
150 views
Hi,

Can anyone send me some sample code for kendo grid with code first approach.
I want to retrieve data from sqlserver not from sql xpress.

i tried with the following example getting error "An exception occurred while initializing the database. See the InnerException for details."

http://www.telerik.com/community/code-library/aspnet-mvc/grid/grid-using-entityframework---code-first.aspx

Thanks
vani
Top achievements
Rank 1
 asked on 12 Nov 2012
1 answer
139 views
I have attached 3 images,

home.png is how my bootstrap-themed website looks like

I added this line of code in my page, right at the bottom

@(Html.Kendo().Window()
.Name("window")
.Title("test")
.Content("loading...")
    .LoadContentFrom("Login", "Authentication")
    .Modal(true)
    .Draggable()        
)

modal1.png is how the site looks like with the modal window

after.png is how the site looks like after I've closed the modal window

I'd like to know what is causing the design of my site to mess up?

When I looked in the page source of the code, this is causing the page to render incorrectly

<div id="window"></div><script>
jQuery(function(){jQuery("#window").kendoWindow({"modal":true,"iframe":false,"draggable":true,"title":"test","resizable":false,"content":"/login","actions":["Close"]});});
</script>

I tried removing kendoui's css from my layout page, but the result is the same.


louis
Top achievements
Rank 1
 answered on 11 Nov 2012
1 answer
126 views
it work!
thanks
Sam
Top achievements
Rank 1
 answered on 10 Nov 2012
1 answer
89 views
textbox and button on Search
On Search click grid not give Search method result  it's give all user in my User list grid.
Haresh
Top achievements
Rank 1
 answered on 09 Nov 2012
5 answers
260 views
working with a MVC4 application, and trying to get the menu to render.  

I've tried the following code, which works fine:

 @(Html.Kendo().Menu()
           .Name("menu")
           .Items(items =>
                      {
                          items.Add().Text("Item 1");
                          items.Add().Text("Item 2");
                      }
           )
)

how can I set properties other than Text?  I would like to be able to reference events by the menu item ID, which I can't seem to set through the html Helpers.
Samuel
Top achievements
Rank 2
 answered on 08 Nov 2012
5 answers
403 views
If I add JQuery 1.7.1 or 1.7.2 to the project, it fails with the following error

TypeError: jQuery("#Menu").kendoMenu is not a function

This is really strange. Even if I add the reference of JQuery 1.7.1 or 1.7.2 to the sample project provided by KENDO UI, it also fails with the same error.

Any suggestions will be appreciated.
Samuel
Top achievements
Rank 2
 answered on 08 Nov 2012
1 answer
1.1K+ views
Hello.
Ive got two comboboxes:
-first one:
@(Html.Kendo().ComboBox()
    .Name("Dim1")
    .DataTextField("Barcode")
    .DataValueField("Barcode")
    .Filter(FilterType.StartsWith)
    .DataSource(action => action.Read(read => read.Action("GetStockLocationsForComboBoxAjax", "StockLocation")).ServerFiltering(true))
    .MinLength(3)
    )
-second one:
<script type="text/javascript">
    function onAdditionalData() {
        return { Barcode: $("#Dim1").val() };
    }
</script>
 
@(Html.Kendo().ComboBox()
    .Name("Dim2")
    .DataTextField("Barcode")
    .DataValueField("Barcode")
    .Filter(FilterType.StartsWith)
    .DataSource(action => action.Read(read => read.Action("GetStockLocationsForComboBoxAjax", "StockLocation").Data("onAdditionalData")).ServerFiltering(true))
    .MinLength(3)
    .CascadeFrom("Dim1")
    )
Here is my read action signature:
[HttpGet]
public JsonResult GetStockLocationsForComboBoxAjax([DataSourceRequest] DataSourceRequest request, string text, string Barcode)

How can I achieve the following:
Im putting some data to Div1 and get it under text parameter. When I put something in Div2 I will get that data under text plus data from Div1 under Barcode parameter.

I hope ive described it  enough clearly.

Thanks!
Radosław
Top achievements
Rank 1
 answered on 08 Nov 2012
0 answers
110 views
I downloaded a trial for Kendo UI.  It has a grid demo which is accessed via this url.

http://localhost:8301/razor/web/grid/index

It shows you the source for the view and the controller on page.

If a developer uses the code for the controller as a guide (which I did) you run into several issues.

The Products_Read action is called from the view for Ajax calls.  However, since its not the same name as the action that displayed the view the grid is on it will instead throw an exception stating you need to use JsonRequestBehavior.AllowGet (which is highly misleading as the developer will now start going down the wrong path).  Changing this behavior will get you a page full of JSON data and no grid.

The issue is that there is no view called Products_Read... the original view with the grid is called from Index action.  The controller action for the ajax call should probably be renamed to Index and, for clarity, should also be decorated with an HttpPost attribute.

This "demo" cost me about 4 hours of time.

Dan A
Top achievements
Rank 1
 asked on 07 Nov 2012
0 answers
154 views
Is it possible to do everything using the Grid and Datasource wrappers that can be done in javascript/html? I made the decision, perhaps unwisely, to use the MVC Wrappers for ASP.Net MVC development. But it is far from obvious what the mapping is from JS to the wrapper and if it is complete.

The examples don't help much. I am trying to put together a grid where some columns are foreign keys on another record. For example, Instead of displaying "Mr.", or "Mrs." or "Ms." etc I would prefer to use key values and then retrieve the value from another table. That is simple. But I want to edit inline and I want that field to be a dropdown list of valid titles.I see an example using javascript but I can't see how to replicate that code in a Wrapper. Also, the example uses local data instead of accessing a database but I can figure out how to get the date from a database.

I don't want to continue trying to get the Wrapper to work if the wrapper only supports a subset of the native functionality.The particular area I am having trouble with is in the definition of Fields.
Martin
Top achievements
Rank 1
 asked on 07 Nov 2012
1 answer
289 views
When refresh() is called, the listview will not postback to server to rebind the data Which function should I call if i want to rebind the data from server? Thanks
Warren
Top achievements
Rank 2
 answered on 06 Nov 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
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
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Security
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
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
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?