How to connect asp.net SQL data to a GRID?


#1

I have a Visual Basic webforms project. WAS using the standard GridView control. there is a SQL database, on page load it queries the db and fills the GridView.

But now Ive added the DHTMLX Grid. Set the columns.

added a data source to the page,

     LinqDataSource - LinqDataSource1 and tied that in to the database and picked the columns

The Grid never fills with data even though it has a data source. Any examples of getting data from sql into the grid are appreciated!


#2

You may use the asp. net. dhtmlxConnector to for the better integration of your dhtmlxGrid with the backend.
Here you can find the package containing different examples:
https://files.dhtmlx.com/30d/b7af7a9922053b332b390832db1a9cda/connector-net-20170811.zip


#3

Thank you I will try this out and see if it can be applied and write back


#4

Thank you so much for helping and posting this! I have tried and tried and cant make it work. Also the .CHM help files, am not able to show the content, can see the items but theres no content in what I have or its not opening.

Do I register something by way of NuGet? There are alot of items, and will like to customize this Grid and do updates back to the DB

thanks again


#5

Here you can find the documentation about the asp .net connector:
https://docs.dhtmlx.com/connector__net__index.html


#6

Have been trying this even where the document does not give clear details. Got the error:

Server Error in ‘/’ Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The directive ‘webhandler’ is unknown.

Server side

  1. Create ASP.NET Generic Handler, inherited from the dhtmlxRequestHandler class.
<%@ WebHandler Language="C#" 
    CodeBehind="gridConnector.ashx.cs" 
    Class="dhtmlxConnector.gridConnector" %>
 
public class gridConnector : dhtmlxRequestHandler
{
}
```   This part I assumed where things 'might' go and got past errors, but its not clear;
Second, 
### If you need just load data from database (with or without data preprocessing)

      1. Specify connector file in the  *load*  method of a component.

 //index.html
 myGrid = new dhtmlXGridObject("someContainer");// initializes grid
 ...
 myGrid.load("myconnector.ashx")
     myconnector?  what is this? its not defined in the documentation, you may know how
 to wire it all up but when its not in the details, how are we supposed to ad-lib this?  

Time for  the monkeys and coffee.  100 monkeys chained to 100 desks with typewriters with endless paper, coffee and cigarettes hitting keys at random, collectively writing the entire volume of 'War and Peace' without
a single error?  Maybe with time and enough random combinations some pattern might be
found to work to load the grid too.  What other choice is there?

#7

Sematik, thank you for the link but it IS INCOMPLETE, there is MISSING INFORMATION, it does not show how to use DHTMLx grid data connection. I followed every step listed, it DOES NOT WORK. There is at least a page of information MISSING from the steps.

You know how its done, so you may not notice important details missing from the documentation, Ive done alot of procedure writing, manufacturing instructions, etc. You let someone who’s never used this try the instructions and see if they make it work, you find they get stuck because steps are omitted. You say oh, well you must do THIS first, or download THAT first, then you add it to the procedure and another new person runs it with no issues.

Using DHTMLx grid with .net and a SQL data source?

There are NO complete instructions in your link or anywhere on your site or anywhere on the internet I could find so far.

There are only a few steps listed, it doesnt take long to do it all, then step thru javascript, it doesnt work, Please show me a working example! perhaps I could write up the step by step when the mystery is solved of how to use the grid, thank you