﻿<?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 - Lounge - how can i add mulitple rows in webgrid  caption &amp; Export the same</title><link>http://www.intersoftsolutions.com/Community/Lounge/how-can-i-add-mulitple-rows-in-webgrid-caption--Export-the-same/</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>how can i add mulitple rows in webgrid  caption &amp; Export the same</title><link>http://www.intersoftsolutions.com/Community/Lounge/how-can-i-add-mulitple-rows-in-webgrid-caption--Export-the-same/</link><pubDate>Sun, 28 Mar 2010 23:05:13 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;You could add a new cell during InitializeDataSource server side event in the WebGrid datasource and fill in the value of the cell during InitializeRow server side event. Here is the snippet to fill in the FullName cell with FirstName and LastName cell value:&lt;/p&gt;&lt;pre&gt;protected void wgTest_InitializeRow(object sender, RowEventArgs e)&lt;br /&gt;{&lt;br /&gt;    if (e.Row.Type == RowType.Record)&lt;br /&gt;    {&lt;br /&gt;        e.Row.Cells.GetNamedItem("FullName").Text = String.Join(" ",&lt;br /&gt;            new string[] { e.Row.Cells.GetNamedItem("FirstName").Text, e.Row.Cells.GetNamedItem("LastName").Text});&lt;br /&gt;&lt;br /&gt;        e.Row.Cells.GetNamedItem("FullName").Value = String.Join(" ",&lt;br /&gt;            new string[] { e.Row.Cells.GetNamedItem("FirstName").Text, e.Row.Cells.GetNamedItem("LastName").Text });&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;Other method would be to modify the select query so you will get the merge cells. Again we show how to select a FullName by merging FirstName and LastName field&lt;/p&gt;&lt;pre&gt;SELECT EmployeeID, FirstName, LastName, FirstName &amp;#43; ' ' &amp;#43; LastName AS FullName FROM [Employees]&lt;/pre&gt;
&lt;p&gt;If the proposed solution does not fit for your scenario, please elaborate your scenario.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>how can i add mulitple rows in webgrid  caption &amp; Export the same</title><link>http://www.intersoftsolutions.com/Community/Lounge/how-can-i-add-mulitple-rows-in-webgrid-caption--Export-the-same/</link><pubDate>Thu, 25 Mar 2010 02:41:20 GMT</pubDate><dc:creator>ravirajshimpi</dc:creator><description>&lt;p&gt;i want to merge row cells in single cell. can it possible in webgrid?&lt;/p&gt;</description></item></channel></rss>