I followed the instructions for ajax binding to the T and all i get is a dump of the JSON on my screen. All the information is there it is just not being put into a grid. HELP!
Here is the code below:
Here is the code below:
public
ActionResult BulkEdit([DataSourceRequest]DataSourceRequest request)
{
var NewAssets = db.TurnaroundDumps;
DataSourceResult result = NewAssets.ToDataSourceResult(request);
return
Json(result, JsonRequestBehavior.AllowGet);
}
Then on my view:
@(Html.Kendo().Grid<PcInventory_v1_1.Models.TurnaroundDump>()
.Name(
"Grid"
)
.Columns(columns =>
{
columns.Bound(p => p.AssetTag);
columns.Bound(p => p.SerialNumber);
columns.Bound(p => p.DeptId);
columns.Bound(p => p.Location);
})
.DataSource(dataSource => dataSource
.Ajax()
// Specify that the data source is of ajax type
.Read(read => read.Action(
"BulkEdit"
,
"Assets"
))
// Specify the action method and controller name
)
.Pageable()
)
12 Answers, 1 is accepted
0
mike
Top achievements
Rank 1
answered on 18 Aug 2012, 02:39 AM
if anyone looks at this i think its because the request is GET not POST. i have the correct script order soooo... ????
0
Hi Mike,
Atanas Korchev
the Telerik team
Could you show us what the included JavaScript files are?
Regards,Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mike
Top achievements
Rank 1
answered on 20 Aug 2012, 11:33 AM
<
link
href
=
"@Url.Content("
~/Content/bootstrap.min.css")"
rel
=
"stylesheet"
type
=
"text/css"
/><
br
> <
link
href
=
"@Url.Content("
~/Content/bootstrap-responsive.min.css")"
rel
=
"stylesheet"
type
=
"text/css"
/><
br
>
<
link
href
=
"@Url.Content("
~/Content/site.css")"
rel
=
"stylesheet"
type
=
"text/css"
/><
br
>
<
script
src
=
"@Url.Content("
~/Scripts/jquery-1.7.2.min.js")"
type
=
"text/javascript"
></
script
><
br
> <
script
src
=
"@Url.Content("
~/Scripts/bootstrap.min.js")"
type
=
"text/javascript"
></
script
><
br
>
<
script
src
=
"@Url.Content("
~/Scripts/site.js")"
type
=
"text/javascript"
></
script
><
br
>
<!--In the header of your page, paste the following for Kendo UI Web styles-->
<
br
>
<
link
rel
=
"stylesheet"
href
=
"@Url.Content("
~/Content/kendo.common.min.css")"><
br
>
<
link
rel
=
"stylesheet"
href
=
"@Url.Content("
~/Content/kendo.default.min.css")"><
br
>
<
script
src
=
"@Url.Content("
~/Scripts/jquery.min.js")"></
script
><
br
>
<
script
src
=
"@Url.Content("
~/Scripts/kendo.web.min.js")"></
script
><
br
>
<
script
src
=
"@Url.Content("
~/Scripts/kendo.aspnetmvc.min.js")"></
script
>
These are all the css and javascript in order. I had removed the first 3 to see if it works but it did not.
i also attached 2 screen shots.
0
Hello,
Atanas Korchev
the Telerik team
There are two versions of jquery. Leave only one of them.
Regards,Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mike
Top achievements
Rank 1
answered on 20 Aug 2012, 12:00 PM
Doesn't change anything.
0
Hi,
Atanas Korchev
the Telerik team
This is very strange. Is there a chance to send us your project? You can attach it to this forum thread.
Regards,Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mike
Top achievements
Rank 1
answered on 20 Aug 2012, 12:11 PM
I cannot. the max file size is 2 MB my project is 4
0
Hi,
Atanas Korchev
the Telerik team
You can remove the Kendo files from the project if it will reduce its size.
All the best,Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mike
Top achievements
Rank 1
answered on 20 Aug 2012, 12:28 PM
im sending it in 2 parts. this is the code and sln files. next is the packages for the project,
0
mike
Top achievements
Rank 1
answered on 20 Aug 2012, 12:29 PM
heres part 2
0
Hi,
Atanas Korchev
the Telerik team
I checked the project and I couldn't find any action method which renders the BulkEdit view. The BulkEdit method returns JSON for the grid. You need to create an action method which should render the BulkEdit.cshtml view.
I have fixed the project for you - find it attached.
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mike
Top achievements
Rank 1
answered on 20 Aug 2012, 02:08 PM
WOW. noob moment or what!!!! Thank you soo much. i cannot believe i didn't see this.