Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
devextreme-aspnet-data
Advanced tools
This extension enables DevExtreme client-side widgets to consume data from the server in ASP.NET applications. A widget communicates with the server in the following manner: the widget sends data loading options (filtering, grouping, sorting, and other options) to the server, the server processes data according to these options and then sends processed data back to the widget. In this way, you delegate all intensive data operations from the client to the server, thus significantly improving the performance of DevExtreme widgets. This extension can be used directly with the widgets as well as with ASP.NET MVC Controls.
The server-side part of the extension is the DevExtreme.AspNet.Data.dll
assembly. Install it from NuGet with the following command.
Install-Package DevExtreme.AspNet.Data
The client-side part is the dx.aspnet.data.js
script. You can install it in one of the following ways.
Using npm.
Run the following command in the command line.
npm install devextreme-aspnet-data
Using bower.
Run the following command in the command line...
bower install devextreme-aspnet-data
... or add devextreme-aspnet-data
to the bower.json file into the dependencies
section.
"dependencies": {
...
"devextreme-aspnet-data": "^1"
}
After installation, link the dx.aspnet.data.js
script after the DevExtreme scripts on your page.
<!-- if you have used npm -->
<script src="/node_modules/devextreme-aspnet-data/js/dx.aspnet.data.js"></script>
<!-- if you have used bower -->
<script src="/bower_components/devextreme-aspnet-data/js/dx.aspnet.data.js"></script>
The server needs a custom model binder that will receive data loading options from the client and bind them to the model. The following links show how to implement it.
NOTE: If you use DevExtreme.AspNet.Data
along with DevExtreme ASP.NET MVC Controls, you do not need to implement the custom model binder, because it is already done in the ASP.NET MVC Controls library.
To reach the controller from the client side, use the DevExpress.data.AspNet.createStore
method. It accepts an object with the following fields.
key
- the key property;loadUrl
- the URL used to load data;loadParams
- additional parameters that should be passed to loadUrl
;updateUrl
- the URL used to update data;insertUrl
- the URL used to insert data;deleteUrl
- the URL used to delete data;updateMethod
- the HTTP method for update requests; "PUT" by default;insertMethod
- the HTTP method for insert requests; "POST" by default;deleteMethod
- the HTTP method for delete requests; "DELETE" by default;onBeforeSend
- a function that customizes the request before it is sent; accepts the following parameters:
operation
: stringjQueryAjaxSettings
: objectYou can find an example here.
DevExtreme ASP.NET MVC Controls call the DevExpress.data.AspNet.createStore
method internally. To configure the parameters, use the lambda expression of the DataSource()
method.
@(Html.DevExtreme().DataGrid()
.DataSource(ds => ds.WebApi()
.Controller("NorthwindContext")
.Key("OrderID")
.LoadAction("GetAllOrders")
.InsertAction("InsertOrder")
.UpdateAction("UpdateOrder")
.DeleteAction("RemoveOrder")
)
)
FAQs
DevExtreme data layer extension for ASP.NET
The npm package devextreme-aspnet-data receives a total of 2,604 weekly downloads. As such, devextreme-aspnet-data popularity was classified as popular.
We found that devextreme-aspnet-data demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.