﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - WebGrid Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Data/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>WebGrid Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Data/</link><pubDate>Tue, 15 Mar 2016 09:51:48 GMT</pubDate><dc:creator>erwinintersoft</dc:creator><description>&lt;p&gt;You are welcome, John. Should you find any other difficulties, we are here to help.&lt;/p&gt;</description></item><item><title>WebGrid Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Data/</link><pubDate>Fri, 11 Mar 2016 11:46:01 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>Hi Erwin,&lt;br&gt;&lt;br&gt;&amp;nbsp; Thank you, I will look at Client Binding.&lt;br&gt;</description></item><item><title>WebGrid Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Data/</link><pubDate>Fri, 11 Mar 2016 11:32:30 GMT</pubDate><dc:creator>erwinintersoft</dc:creator><description>&lt;p&gt;Hello again John,&lt;/p&gt;&lt;p&gt;I've discussed your issue with our development team regarding your question about getting all the data in WebGrid without having to load all the rows, and unfortunately there's no way to do this at the moment.&lt;/p&gt;&lt;p&gt;However, you could do a client data binding through a WebService and get all the WebGrid data from the JavaScript for your JSON.&lt;/p&gt;&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;p&gt;Best Regards,&lt;br&gt;Erwin Sanders&lt;/p&gt;</description></item><item><title>WebGrid Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Data/</link><pubDate>Thu, 10 Mar 2016 11:45:23 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>Hi Erwin,&lt;br&gt;&amp;nbsp;Thank you for the sample, I will take a look at it.&amp;nbsp; &lt;br&gt;&lt;br&gt;Since I first ask this question a few things have changed.&amp;nbsp; What I am trying to do is based upon the records selected in the grid, take those records and display them on a map.&amp;nbsp; Originally I was using an jquery ajax to call a webmethod that would get the records from the grid and return a JSON string, but since you can't pass an object to a webMethod I needed to change course.&amp;nbsp; So I tried to do it on the client side and it worked somewhat.&amp;nbsp; The gird is using Virtual Loading with a PageSize of 25, so when I try to use the getCells function to get the cells of a row it fails on the 26 record since it hasn't been loaded yet, if I load all rows than its works.&amp;nbsp; So to modify my question is there a way, client side, to get all data associated with the grid without having the user load all rows first or increase my pagesize to some large number?&amp;nbsp; &lt;br&gt;&lt;br&gt;I'm currently getting the data with this function:&lt;br&gt;&lt;pre&gt;function getWebGridData() {            var WebGrid1 = wgGetGridById("WebGrid1");
            var totalRows = WebGrid1.TotalRows;
            var sb = '';  

            for (var i = 0; i &amp;lt; totalRows; i++) {
                sb += '{';
                var _Row = WebGrid1.RootTable.GetRow(i);
                var cells = _Row.GetCells();
                
                sb += '"DOT_NUMBER" : "' + cells.GetNamedItem('DOT').Value + '", "PHY_LAT" : "' + cells.GetNamedItem("pLat").Value + '", "PHY_LONG" : "' + cells.GetNamedItem("pLong").Value + '", "TYPE" : "' + cells.GetNamedItem("AuditTypeDesc").Value + '"' ;
                sb += '},';
            }
            sb = sb.substring(0, sb.length - 1);
            //alert(sb);
            return sb;
        }&lt;/pre&gt;&lt;p&gt;thanks&lt;br&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>WebGrid Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Data/</link><pubDate>Thu, 10 Mar 2016 04:20:56 GMT</pubDate><dc:creator>erwinintersoft</dc:creator><description>&lt;p&gt;Hi John,&lt;/p&gt;&lt;p&gt;Sorry for the late reply. Based on your questions, I made a sample that has a button that gets the desired data you requested. The code behind is using c# though, but it does the job. Feel free to evaluate on the sample.&lt;/p&gt;&lt;p&gt;Best Regards,&lt;br&gt;Erwin Sanders&lt;/p&gt;</description></item><item><title>WebGrid Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Data/</link><pubDate>Wed, 03 Feb 2016 18:45:03 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;I'm trying to get to the underlying data of the webGrid in order to create a JSON string for use later. &lt;br&gt;&lt;/p&gt;&lt;p&gt;I have no problem getting the column header names but can't get the value for each column for each row.&lt;/p&gt;&lt;p&gt;I'm using something like:&lt;/p&gt;&lt;pre&gt;Public Shared Function GetWebJSONString(ByVal Dt As WebGrid) As String
            Dim count As Integer = Dt.RootTable.Columns.GetVisibleColumnsCount()
            Dim StrDc As String() = New String(count - 1) {}
            Dim HeadStr As String = String.Empty
            For i As Integer = 1 To count - 1
                StrDc(i) = Dt.RootTable.Columns(i).Name
                HeadStr += ("""" &amp;amp; StrDc(i) &amp;amp; """ : """) + StrDc(i) + i.ToString() &amp;amp; "¾" &amp;amp; ""","
            Next
            HeadStr = HeadStr.Substring(0, HeadStr.Length - 1)
            Dim Sb As New StringBuilder()
            For i As Integer = 0 To count - 1
                Dim TempStr As String = HeadStr
                Sb.Append("{")
                For j As Integer = 1 To Dt.RootTable.Rows.Count - 1
                    Dim zzzz As String = Dt.RootTable.Rows.GetItem(j).ToString
                    Dim zzzza As String = Dt.RootTable.GetUngrouppedRows().GetRowByKeyValue("2075246").Cells.GetNamedItem("CarrierName").Text.ToString()
                    'Dim rows As WebGridRowCollection = Dt.RootTable.GetUngrouppedRows()

                    'Dim keyValue As String = Dt.RootTable.GetUngrouppedRows().Item(j).KeyValue
                    'Dt.RootTable.GetUngrouppedRows().GetRowByKeyValue(keyValue).Cells.GetNamedItem("CarrierName").Text.ToString()
                    'Dim z As String = Dt.RootTable.GetUngrouppedRows().GetRowByKeyValue(keyValue).Cells.GetItem(j).ToString()
                    'TempStr = TempStr.Replace(Dt.RootTable.Columns(j).Name.ToString + j.ToString() &amp;amp; "¾", Dt.Rows(i)(j).ToString())
                Next
                Sb.Append(TempStr &amp;amp; "},")
            Next
            Sb = New StringBuilder(Sb.ToString().Substring(0, Sb.ToString().Length - 1))
            Return Sb.ToString()
        End Function&lt;/pre&gt;&lt;p&gt;I've tried multiple ways to get the data but no seem to work! How can I get the following:&lt;/p&gt;&lt;p&gt;1. Total number of columns not just the visible columns&lt;/p&gt;&lt;p&gt;2. Get the keyValue of each row in the grid&lt;/p&gt;&lt;p&gt;3. The value for each column for each row in the grid&lt;br&gt;&lt;/p&gt;&lt;p&gt;I
 need to get the data after the user has filtered and reduced the number
 of rows from the original query. This function runs froma Button click
 event.&lt;br&gt;&lt;/p&gt;&lt;p&gt;Any help?&lt;/p&gt;&lt;p&gt;thanks&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;</description></item></channel></rss>