02:37 -
2 comments
How to bind CRM Data to GridView on custom ASP.Net page for Microsoft Dynamics CRM | MS CRM
string fetch = @" <fetch mapping=""logical"">
<entity name=""account"">
<attribute name=""accountid""/>
<attribute name=""name""/>
<attribute name=""address1_line1""/>
<attribute name=""address1_line2""/>
<attribute name=""address1_country""/>
<attribute name=""address1_city""/>
</entity>
</fetch>";
string result = service.Fetch(fetch);
XmlDocument doc = new XmlDocument();
doc.LoadXml(result);
doc.DocumentElement.Attributes.RemoveAll();
StringReader sr = new StringReader(doc.OuterXml);
DataSet ds = new DataSet();
ds.ReadXml(sr);
GridView1.DataSource = ds;
GridView1.DataBind();
<entity name=""account"">
<attribute name=""accountid""/>
<attribute name=""name""/>
<attribute name=""address1_line1""/>
<attribute name=""address1_line2""/>
<attribute name=""address1_country""/>
<attribute name=""address1_city""/>
</entity>
</fetch>";
string result = service.Fetch(fetch);
XmlDocument doc = new XmlDocument();
doc.LoadXml(result);
doc.DocumentElement.Attributes.RemoveAll();
StringReader sr = new StringReader(doc.OuterXml);
DataSet ds = new DataSet();
ds.ReadXml(sr);
GridView1.DataSource = ds;
GridView1.DataBind();
2 comments:
XML Code Examples
can you provide the full source code for the same.
Post a Comment