Javascript, HTML and CSS Grid - javascript

I am ASP.NET MVC to develop my application on web. This app requires a grid to display, sort, and modify the data. User can perform all crud operation using this grid and needs to hide any column as per need. I have searched a lot on internet to find any free HTML based control which fulfill this requirement but I did not find.
I just want to have a grid which fulfill the above requirement either that only based on java script or it have some dependencies on ASP.NET MVC frame work like other grids which are based on server side scripting which generates HTML on run time.
Any kind of help will be appreciated.

You may take a look at the Telerik Grid.

Here are some links that may help:
Ext Js - Javascript solution... maybe a little overkill, but tons of stuff out of the box.
Tutorial - Using CRUD Operations with jQuery igGrid, Entity Framework and ASP.Net MVC3
StackOverflow - Some more javascript solutions here.

Related

.NET Core Web UI that best supports vanilla javascript with DOM manipulation

I have created a very interactive svg element with hundreds of individual components and many types of user interactions, right click menus, etc with vanilla javascript because it was so much faster than any framework.
It works great, the only problem is I now need to inject this into a website build with individual user logins, a database, a nice dashboard of past projects, etc. I need to have a button associated with the svg "save" the status and write to the database. I want to use ASP.NET for its friendliness with Microsoft products like Excel (I need to read user Excel uploads and parse Excel files).
My question is which ASP.NET core UI choice is going to allow me to build this full stack easiest, quickest, while injecting this svg with all of it's vanilla javascript functions.
I've watched youtube tutorials and read a lot of the microsoft docs on ASP.NET core and the UI choices. I don't think webassembly with Blazor would be the way to go because it's too reliant on C#, and may slow down my javascript calls if I have to go through the c# middleman. I really don't want to have to learn react or angular and do the SPA from the ground up, but if its what will maintain my quick vanilla javascript I'll forge ahead. I think MVC might be the quickest way to build a website up quickly, but I"m not sure it will support my vanilla js with dom manipulation of the svg.

Kendo UI Alternative to MVC

I have successfully developed a simple grid using MVC 4 and kendo UI. Everything works as expected and I dont have an issue with it. The other day, I was talking to another developer who told me that I could completely bypass MVC and just use a Javascript to read from SQL Server(my data source) and call it on my HTML page. There, I could use Kendo UI helpers to display the page the way I wanted.
My question is, is that possible? And if it is possible, is it advisable? I primarily work only with databases and this is the first time I am playing with MVC, Kendo and HTML as such, so please bear with me.
Thanks for the help.
Your colleague is absolutely right. You can use the client version of Kendo UI and write jQuery code on HTML/.cshtml/aspx... files and connect to your MVC/Web API controllers or a RESTFul/HTTP service using Ajax calls. This will work like a charm.
This is advisable only if you are good with Javascript/jQuery. This method will provide better user experience and you can easily build Single Page Applications which is the future of web apps.
if you see Kendo UI demos, all the examples are built on pure HTML pages using jQuery.
I hope I answered your question clearly, but in case you need any clarifications, feel free to ask.

How can I use custom javascript in Spring Roo generated pages?

I have been working on a spring roo project and I've hit a wall in terms of being able to customize the web page.
The main thing I want to do is be able to dynamically hide certain fields as the client is filling out the web form. I have a drop down list driven by enumerations that has 4 options and a fifth "other" option. If the user selects "other" I want a text box to appear so the user can fill out their own selection.
I was talking to someone and they said "This really depends on the UI you choose. In case of MVC scaffolding you can use javascript to drive these relationships". I am indeed using MVC scaffolding so I guess I have to use javascript. I don't really know that much javascript but the problem lies in that I don't even know where the javascript code would go in term of my project files. And then the second problem of course is how to use javascript to hide the fields dynamically in Spring.
Thanks
Spring MVC scaffolding uses dojo by default as its javascript framework.
You are able to use standard dojo functions when you attach events to DOM elements. You can simply use the <script/> tag to contain your own custom javascript methods within a generated .jspx page.
Additionally, you can integrate another existing javascript framework such as jQuery. At the moment you can include jQuery manually, but it can possibly be expected in a future Spring Roo version.
You can play safe with dojo for now.

asp.net mvc vs javascript build whole site

i am building a site. There are two choices for me.
asp.net mvc 3.0 + ajax.
build whole site with ajax(javascript). Firstly, use ajax to get data with json format, and then fill the whole page with the data. In this way, the page will be produced only via javascript.
Could anyone tell me the advantages and disadvantages of these two ways?
Thanks in advance.
Javascript is not for building entire markup and rendering it. Don't shoot yourself in the foot.
Use ASP.Net MVC to build your site. Along side of ASP.Net MVC use jQuery/javascript to build ajax functionality.
If you choose the second option, it won't work in browsers with no JavaScript support. This may not seem all that important to you, but consider: most search engines don't support JavaScript. If search engines can't get the content on your site, it won't get ranked well.

Javascript Tablemodel Widget

I am looking for a JavaScript MVC table widget similar to Java Swing TableModel
I would also like to have two models, one totally local and one remote (XMLHttpRequest)
I would also like the view to accept text columns (and maybe HTML columns) and have these text columns HTML or CSS formatted depending the cell contents (just like you would be able in a Java Swing JTable)
Do you know of any implementation?
I guess you could make it up yourself using these components which all partially solve your problem
http://jamal-mvc.com/ -> lightweight MVC
Jamal is a set of conventions and
small javascript libraries to archieve
a complete separation of html, css and
javascript in your web application.
Jamal is built on jQuery and inspired
by MVC frameworks like Ruby on Rails,
CakePHP and its derivatives.
The MVC concept is easy to adopt for
javascript
Controller: Interaction with the user interface (events)
Model: Business Logic and AJAX calls
View: DOM, CSS modifications
ActiveRecord JS -> DB connector
ActiveRecord.js is a cross browser,
cross platform, stand-alone object
relational mapper. It shares a very
similar vocabulary to the Ruby
ActiveRecord implementation, but uses
JavaScript idioms and best practices
-- it is not a direct port. It can operate using an in memory hash table,
or with a SQL back end on the Jaxer
platform (SQLite and MySQL), Adobe's
AIR (SQLite) and Google Gears
(SQLite). Support for the HTML 5 SQL
storage spec is planned.
jQuery tablesorter Plugin -> display table data (maybe you need to check if it supports or can be made to easily support editable cells)

Categories