Ive used DHTMLX before in MVC and it works great, I’m so grateful to have these tools.
But now its a Grid that will replace the built in Gridview in asp.net VB webforms. The grid will need a textbox at the top of each column to filter with, and a way to add a new row at the bottom.
Matching up the data Im trying to solve, sorry for the formatting
<asp:GridView ID=“GridView1” runat=“server” AllowPaging=“True”
CurrentSortField=“” AllowCustomPaging=“True” CellPadding=“4”
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
and then a manual grid frame is defined:
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 875pt">
<col style="mso-width-source: userset; mso-width-alt: 10678;" />
<col style="mso-width-source: userset; mso-width-alt: 10057;" />
<col style="width:48pt" width="64" />
<td class="auto-style3" height="20">Field</td>
<td class="auto-style1">Select One</td>
and 15 more <tr>'s are defined for all of the columns. On the code side, just a standard Page Load query to
SQL to pull in the data, it displays fine. I created a manual sorting method that works, but DHTMLX has
everything in a nicer looking package
protected Sub Page_Load(ByVal sender........)
GridView1.DataSource = myTable
ViewState("tables") = myTable
So the page connects to a SQL connection, ends up with myTable then does the bind and it displays just fine
But how can the DHTMLX grid be put in there instead?
I have what should be the css and .js for the grid in the head section of the page.
The problem is how to format the data from the raw sql output into the? JSON? format the grid needs?
Right now the grid is invisible.
I have the grid showing because the download & instructions did not work. I found other instructions and files from other downloads years ago, now I have the dhtmlx features in the web page
<!-- Latest compiled and minified CSS -->
<link href="Content/codebase/dhtmlx.css" rel="stylesheet" />
<link href="Content/suite.css" rel="stylesheet" />
<link href="Content/common/index.css" rel="stylesheet" />
<link href="Content/Common/grid.css" rel="stylesheet" />
so NOW i have a grid,
< div class="container col-lg-12 />
< div style=“width:90%;nav-left:initial” id=“gridbox”> < /div>
//init grid and set its parameters (this part as always)
mygrid = new dhtmlXGridObject('gridbox');
And I setup the column headers, size, but I still need data. I found an article on .NET CONNECTORS but all code is in c# and this is VB webforms. I have a SQL database that works, but need to somehow get data from there into the DHTMLX grid
Ive read the instructions almost 10 times for a couple days now, I cannot get this to work
HOW TO get SQL data into this grid? I know it has to be JSON format, but I have the table adapter and connection string etc, fills the data table and a data view. how to transfer, translate, move, shift data into this DHTMLX grid?
any ideas, thanks