jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Create Grid To open a view
This topic contains 1 reply, has 2 voices, and was last updated by Dimitar 11 years, 7 months ago.
-
Author
-
Hello,
I am creating a project to create and edit tickets, I can’t seem to edit the information directly on the grid to be updated on my local database, so Im trying to get the TicketID Grid to open this actionlink
@Html.ActionLink(“Edit”, “Edit”, new { id = TicketID })
where TickedID should be the ID selected on the Column TicketID
Here is what my table looks like right now:
$(document).ready(function () {
// prepare the data
var source =
{
datatype: “json”,
datafields: [
{ name: ‘TicketID’, type: ‘int’ },
{ name: ‘firstName’, type: ‘string’ },
{ name: ‘Description’, type: ‘string’ },
{ name: ‘CreatedDate’, type: ‘date’ },
{ name: ‘Comments’, type: ‘string’ },
{ name: ‘Severity’, type: ‘string’ },
{ name: ‘Status’, type: ‘string’ }
],
url: ‘Ticket/GetTickets’};
var dataAdapter = new $.jqx.dataAdapter(source);
// initialize jqxGrid
$(“#grid”).jqxGrid(
{
width: 1000,
height: 280,
sortable: true,
source: dataAdapter,
selectionmode: ‘singlerow’,columns: [
{ text: “Ticket ID”, datafield: “TicketID”, width: 80, sortable: true },
{ text: “Developer”, datafield: “firstName”, width: 80, sortable: true, },
{ text: “Description”, datafield: “Description”, width: 250 },
{ text: “Created Date”, datafield: “CreatedDate”, width: 100, cellsformat: ‘d’ },
{ text: “Comments”, datafield: “Comments”, width: 390 },
{ text: “Severity”, datafield: “Severity”, width: 90 },
{ text: “Status”, datafield: “Status”, width: 90 },]
});
});
Hello RickMelara,
Please check out the Create, remove, update (CRUD) examples for either PHP or ASP.NET. We hope they are helpful to you.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.