﻿<?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 - Client Binding Question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Client-Binding-Question/</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>Client Binding Question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Client-Binding-Question/</link><pubDate>Mon, 29 Jul 2013 22:48:40 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;In my opinion, The &lt;strong&gt;ItemTypeName&lt;/strong&gt; value should be &lt;em&gt;Class1&lt;/em&gt;.&lt;br&gt;&lt;/br&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Client Binding Question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Client-Binding-Question/</link><pubDate>Mon, 29 Jul 2013 04:53:19 GMT</pubDate><dc:creator>yogoo</dc:creator><description>&lt;p&gt;Thanks, In this case, whats the ItemTypeName value should be ?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>Client Binding Question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Client-Binding-Question/</link><pubDate>Sun, 28 Jul 2013 23:36:33 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Yes, it is possible to bind with XML or DataTable.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;I added a WebMethod called &lt;strong&gt;GetCustomers&lt;/strong&gt; to my WebService sample.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;[WebMethod]
public object GetCustomers()
{
    DataTable dt = new DataTable();
    dt.Columns.Add("ContactTitle", Type.GetType("System.String"));
    dt.Columns.Add("CustomerID", Type.GetType("System.String"));
    dt.Columns.Add("ContactName", Type.GetType("System.String"));
    dt.Rows.Add(new object[] { "Owner", "ALFKI", "Maria" });
    dt.Rows.Add(new object[] { "owner", "ANATR", "Ana" });
    dt.Rows.Add(new object[] { "oWner", "ANTON", "Antonio" });
    dt.Rows.Add(new object[] { "Sales Representative", "AROUT", "Thomas" });
    dt.Rows.Add(new object[] { "Sales Manager", "BERGS", "Christina" });
    dt.Rows.Add(new object[] { "Sales manager", "BLAUS", "Hanna" });
    IList&amp;lt;Class1&amp;gt; items = dt.AsEnumerable().Select(row =&amp;gt;
        new Class1
        {
            title = row.Field&amp;lt;string&amp;gt;("ContactTitle"),
            id = row.Field&amp;lt;string&amp;gt;("CustomerID"),
            name = row.Field&amp;lt;string&amp;gt;("ContactName")
        }).ToList();
    return items;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Where the &lt;strong&gt;Class1&lt;/strong&gt; is defined as follow.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;class Class1
{
    public string title;
    public string id;
    public string name;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;I can show the Customers in WebGrid by using the following snippet code.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="600px"
    RenderingMode="HTML5" Width="800px" BindingOperationMode="ClientBinding"
    ViewStateStorage="None" StateRestorationLevel="Low" UseDefaultStyle="True"&amp;gt;
    &amp;lt;RootTable&amp;gt;
        &amp;lt;Columns&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Caption="Contact Title" DataMember="title"
                Name="ContactTitle" Width="200px" CaseSensitiveGrouping="No" /&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Caption="Customer ID" DataMember="id"
                Name="CustomerID" Width="100px" /&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Caption="Contact Name" DataMember="name"
                Name="ContactName" Width="100px" /&amp;gt;
        &amp;lt;/Columns&amp;gt;
    &amp;lt;/RootTable&amp;gt;
    &amp;lt;ClientBindingSettings DataSourceType="WebService"
        ServiceUrl="WebServiceforClientBinding.asmx"&amp;gt;
        &amp;lt;ServiceMethods SelectMethod="GetCustomers" /&amp;gt;
    &amp;lt;/ClientBindingSettings&amp;gt;
&amp;lt;/ISWebGrid:WebGrid&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Client Binding Question</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Client-Binding-Question/</link><pubDate>Fri, 26 Jul 2013 06:08:16 GMT</pubDate><dc:creator>yogoo</dc:creator><description>&lt;p&gt;In the webgrid blinding with the webservice sample, it show me how to bind it with the linq object.&lt;/p&gt;
&lt;p&gt;Is it possible that to blind with xml or datatable?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item></channel></rss>