﻿<?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 column fill down</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-fill-down/</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 column fill down</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-fill-down/</link><pubDate>Mon, 08 Nov 2010 21:00:54 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;For example, if the return value of GetGroupRowLevel() from cell within the country of Japan, the city of Tokyo, and contact title of President is &lt;strong&gt;1_2_3&lt;/strong&gt;, please try to use following snippet code.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;var groupCountry = grid.GetRootTable().GetGroupRows()[0].Cells[0].Text;
alert("Country: " &amp;#43; groupCountry);
var groupCity = WebGrid1.RootTable.GetGroupRows()[1].GetChildren()[2].Cells[0].text;
alert("City: " &amp;#43; groupCity);
var groupContactTitle = WebGrid1.RootTable.GetGroupRows()[1].GetChildren()[2].GetChildren()[3].Cells[0].text;
alert("Title: " &amp;#43; groupContactTitle);&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;We need to use &lt;strong&gt;GetChildren&lt;/strong&gt; method for the city group and contact title group since this group level is the child group level of its parent group. City group is child group of country group and contact title group is the child group of city group.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please let us know whether it helps or not.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid column fill down</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-fill-down/</link><pubDate>Sun, 07 Nov 2010 19:24:10 GMT</pubDate><dc:creator>dmcgoff</dc:creator><description>&lt;p&gt;Hi Yudi,&lt;/p&gt;
&lt;p&gt;I have one remaining issue.  I need to send the value for each grouping item for the cell I am currently on.  For example, if we are grouped by Country, City, ContactTitle and I am selecting a cell within the Country of Japan, the City of Tokyo and ContactTitle of President.  How do I get those values?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I am able to get the value of the first Group - which is Country = Japan, but I can not get the last two groups.&lt;/p&gt;
&lt;p&gt;I can get the Group Index and Group Array as well:&lt;/p&gt;&lt;pre&gt;        var groupIndex = grid.GetSelectedObject().ToRowObject().GetGroupRowLevel();
        alert("groupIndex: " &amp;#43; groupIndex);
        var groupArray = groupIndex.split("_");&lt;/pre&gt;
&lt;p&gt;Here is how I get the Country Name:&lt;/p&gt;&lt;pre&gt;        var groupName = grid.GetRootTable().GetGroupRows()[0].Cells[0].Text
        alert("groupName: " &amp;#43; groupName);
&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;I thought I could get the city name by using that same line, but I receive a Javascript error:&lt;/pre&gt;&lt;pre&gt;&lt;pre&gt;	var groupName = grid.GetRootTable().GetGroupRows()[1].Cells[0].Text
         alert("groupName: " &amp;#43; groupName);
&lt;/pre&gt;
&lt;/pre&gt;

&lt;p&gt;&lt;span style="background-color: #fffce1; font-family: courier new"&gt;So How do I get the City Name and the ContactTitle for the select Cell/Row?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: #fffce1; font-family: courier new"&gt;Thanks,&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: #fffce1; font-family: courier new"&gt;Dave&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid column fill down</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-fill-down/</link><pubDate>Sun, 07 Nov 2010 19:07:49 GMT</pubDate><dc:creator>dmcgoff</dc:creator><description>&lt;p&gt;Hi Yudi,&lt;/p&gt;
&lt;p&gt;I have one remaining issue.  I need to send the value for each grouping item for the cell I am currently on.  For example, if we are grouped by Country, City, ContactTitle and I am selecting a cell within the Country of Japan, the City of Tokyo and ContactTitle of President.  How do I get those values?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I am able to get the &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>WebGrid column fill down</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-fill-down/</link><pubDate>Thu, 04 Nov 2010 04:10:03 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please use following snippet code in order to get the name of the columns being grouped by.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;WebGrid1.RootTable.GetGroupByExpression()&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;And use following snippet code to get the current column that user currently is on.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;WebGrid1.ActiveEditCell.ToCellObject().Name&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid column fill down</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-fill-down/</link><pubDate>Wed, 03 Nov 2010 23:49:56 GMT</pubDate><dc:creator>dmcgoff</dc:creator><description>&lt;p&gt;Hi Yudi,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I need the GroupByExpression on the Client side - how do I get that?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Dave&lt;/p&gt;</description></item><item><title>WebGrid column fill down</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-fill-down/</link><pubDate>Wed, 03 Nov 2010 22:17:42 GMT</pubDate><dc:creator>dmcgoff</dc:creator><description>&lt;p&gt;Hi Yudi,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;How do I get the name of the columns being grouped by?  For example - "Country" and "City"?  I need to pass those to my WebService to actually run the query to update the Cell.&lt;/p&gt;
&lt;p&gt;Also, how do I get the name of the current column that I am on?  &lt;/p&gt;
&lt;p&gt;Dave&lt;/p&gt;</description></item><item><title>WebGrid column fill down</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-fill-down/</link><pubDate>Wed, 03 Nov 2010 00:21:28 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;In order to get grouped row dynamically, please try to follow this step-by-step.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;First, we will need to get the index of the grouped row. We can use following code in order to get the index of the grouped row.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;WebGrid1.GetSelectedObject().ToRowObject().GetGroupRowLevel();&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Suppose we have a grid grouped by &lt;em&gt;Country&lt;/em&gt; field and the sort mode is ascending, as shown in the sample file I attached on my previous post. The index of “&lt;em&gt;Argentina&lt;/em&gt;” group should be 0, “&lt;em&gt;Austria&lt;/em&gt;” group should be 1, “&lt;em&gt;Belgium&lt;/em&gt;” group should be 2, and so on.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;If the grid is grouped by more than one field, for example: grouped by &lt;em&gt;Country&lt;/em&gt; &amp;gt; &lt;em&gt;City&lt;/em&gt;, then the return value of the snippet code above will be as follow: [group index of country field]_[group index of city field]. E.g.: 0_2 or 1_8, etc.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Next, we will use the group index to get the text of the grouped. For example, customer with company name Rancho Grande comes from Argentina. In order to get the “Argentina” text (still refer to the same sample where the grid is grouped by country), please try to use following code.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;WebGrid1.GetRootTable().GetGroupRows()[grpIndex].Cells[0].Text&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid column fill down</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-fill-down/</link><pubDate>Tue, 02 Nov 2010 12:27:08 GMT</pubDate><dc:creator>dmcgoff</dc:creator><description>&lt;p&gt;Yudi,&lt;/p&gt;
&lt;p&gt;That sample is close, but there is one large difference.  I do not know what the user will group by - so I can't use a Case Statement.  How do I get those values dynamically?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Here is the psuedo code that I was thinking of:&lt;/p&gt;
&lt;p&gt;ColumnName = GetCurrentCell.ColumnName&lt;/p&gt;
&lt;p&gt;ValueToFill = GetCurrentCell.Text&lt;/p&gt;
&lt;p&gt;GroupToUpdate = GetCurrentCell.MyGroup  //Could be grouped by multiple columns (City, Country,..)&lt;/p&gt;
&lt;p&gt;//Update Client&lt;/p&gt;
&lt;p&gt;For ALL Rows in GroupToUpdate&lt;/p&gt;
&lt;p&gt;    Row.GetCell(ColumnName).Value = ValueToFill&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;//Update Server Side - need to update the values NOT currently displayed based on Virtual Paging&lt;/p&gt;
&lt;p&gt;UpdateDatabaseOnServer(Group Info, Column Name, ValueToFill)&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I need to be able to get to the Group Info for this specific cell.&lt;/p&gt;
&lt;p&gt;Dave&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>WebGrid column fill down</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-fill-down/</link><pubDate>Mon, 01 Nov 2010 23:50:36 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;I enclosed one simple sample of batch-update with client-binding WebGrid with virtual paging and grouping enabled. The grid is bind to Customers table of Northwind.mdb. In the sample, OnRowContextMenu client-side event is used to add a new customized menu item, Fill Down, into WebGrid’s row context menu.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;The Fill Down menu item will set/fill the value in all of the cells for Region’s column.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please kindly check the attached sample and let us know your response.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid column fill down</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-fill-down/</link><pubDate>Thu, 28 Oct 2010 23:21:40 GMT</pubDate><dc:creator>dmcgoff</dc:creator><description>&lt;p&gt;I am using Batch Update with Client Binding.&lt;/p&gt;
&lt;p&gt;I am looking to add the functionality for a user to right click on a cell and select "fill down" to fill that value in all of the cells for that column.&lt;/p&gt;
&lt;p&gt;I am using Virtual Paging and Grouping.  I would prefer the ability to fill based on the selected group and the current rows displayed (based on the Virtual Paging).&lt;/p&gt;
&lt;p&gt;Does anyone have a sample of the javascript to handle this "fill down" feature?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Dave&lt;/p&gt;</description></item></channel></rss>