﻿<?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 - Dynamic ValueList per Row</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Dynamic-ValueList-per-Row/</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>Dynamic ValueList per Row</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Dynamic-ValueList-per-Row/</link><pubDate>Thu, 18 Feb 2010 20:46:40 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;You could use the HiddenDataMember property in the Category cell and buffer the Name value in that cell. During OnEnterEditMode instead of looking up the value in the Name cell you could look up the value in the HiddenDataMember property.&lt;/p&gt;&lt;p&gt;Here is the snippet to use HiddenDataMember:&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGridColumn Bound="true" &lt;span style="color: rgb(255, 0, 0);"&gt;HiddenDataMember="Name"&lt;/span&gt; WebComboID="cboCategory" EditType="WebComboNET"&lt;br /&gt;    Name="Category" DataMember="Category"&amp;gt;&lt;br /&gt;    &amp;lt;ValueList DataTextField="Type" DataValueField="ID"&amp;gt;&amp;lt;/ValueList&amp;gt;&lt;br /&gt;&amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;/pre&gt;
&lt;p&gt;The modified OnEnterEditMode event handler, I also modified this function so the process is only done upon entring Category cell:&lt;/p&gt;&lt;pre&gt;function wgTest_EnterEditMode(controlId, tblName, editObject) {&lt;br /&gt;&lt;br /&gt;    if (editObject.ToCellObject().Name == "Category") {&lt;br /&gt;&lt;br /&gt;        var combo = editObject.element;&lt;br /&gt;        var cellObj = editObject.ToCellObject();&lt;br /&gt;        var nameVal = &lt;span style=""&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;editObject.cellElement.getAttribute("Name")&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        combo.SetAdditionalFilters("Name = '" &amp;#43; nameVal &amp;#43; "'");&lt;br /&gt;&lt;br /&gt;        combo.SetText(cellObj.Text, true);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    return true;&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Dynamic ValueList per Row</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Dynamic-ValueList-per-Row/</link><pubDate>Thu, 18 Feb 2010 17:20:02 GMT</pubDate><dc:creator>DJBadin</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;At first I didn't think your sample was working because the only item in the DropDown was the Selected Item.&lt;/p&gt;
&lt;p&gt;Adding WebCombo.LayoutSettings.AlwaysShowAllRowsOnDropdown true made it reveal the rest of the items.&lt;/p&gt;
&lt;p&gt;To confirm, there is now way to get the WebCombo ValueList in the Server-Side IntializeRow Event or get the Row Data and Column Controls at the same time?&lt;/p&gt;
&lt;p&gt;The keys to your sample where to:&lt;/p&gt;
&lt;p&gt;- add a hidden column to WebCombo to Filter on.&lt;/p&gt;
&lt;p&gt;- WebGrid.ClientSideEvents.OnEnterEditMode did a WebCombo.SetAdditionalFilters&lt;/p&gt;
&lt;p&gt;In the WebGrid.ClientSideEvents.OnEnterEditMode, the lookup value exists in a WebGrid Column.  In my case I don't need to display that info to the User and if make it not visible, I can not get the Value using a GetCell() Method.&lt;/p&gt;
&lt;p&gt;My current work around is make the WebGrid.Width 0, but I still see some of it.&lt;/p&gt;
&lt;p&gt;Is there a cleaner way to get the Value so I don't have to show it in the Grid?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;</description></item><item><title>Dynamic ValueList per Row</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Dynamic-ValueList-per-Row/</link><pubDate>Wed, 17 Feb 2010 23:34:04 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;I have attached a sample based on your scenario, hopefully it is quite similar. If you would like to filter the WebCombo value you could use 
the SetAdditionalFilter function during EnterEditMode WebGrid client 
side event handler. &lt;/p&gt;</description></item><item><title>Dynamic ValueList per Row</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Dynamic-ValueList-per-Row/</link><pubDate>Wed, 17 Feb 2010 21:25:25 GMT</pubDate><dc:creator>DJBadin</dc:creator><description>&lt;p&gt;No one is answering Live Chat.&lt;br /&gt;&lt;br /&gt;One other note on what I am trying to do.&lt;/p&gt;
&lt;p&gt;I am saving the Text, [Order Details].[ProductName], from the DropDownList/WebComboNet to the database.  &lt;span style="font-family: calibri; font-size: 15px"&gt;[Order Details].[CatgoryID] is the Value and used to filter the List.&amp;nbsp; E.g. all Product Names in a Category would be displayed in the List.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Dynamic ValueList per Row</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Dynamic-ValueList-per-Row/</link><pubDate>Wed, 17 Feb 2010 07:30:50 GMT</pubDate><dc:creator>DJBadin</dc:creator><description>&lt;p&gt;Thank you for confirming my observations.&lt;/p&gt;
&lt;p&gt;As stated in my first posting:&lt;/p&gt;
&lt;p&gt;"&lt;span style="font-family: calibri; font-size: 15px"&gt;I have looked at the OnInitializeRow Server-Side Event and can get the Row Values but can not figure out how to get to the ValueList of the DropDownList or WebCombo in that Row."&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;So, how do I populate the DropDownList/WebComboNet based on a value in that row which may be different per row?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Are there any solutions?&lt;/p&gt;</description></item><item><title>Dynamic ValueList per Row</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Dynamic-ValueList-per-Row/</link><pubDate>Wed, 17 Feb 2010 01:59:25 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;Our WebValueList is intended for per column scenario, the WebValueList property is available in the Column object not in the Row object. In your scenario, per row, the WebValueList will not be appropriate.&lt;/p&gt;&lt;p&gt;In your case, you will need to manually translate the value during initialize row event handler&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Dynamic ValueList per Row</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Dynamic-ValueList-per-Row/</link><pubDate>Tue, 16 Feb 2010 08:16:02 GMT</pubDate><dc:creator>DJBadin</dc:creator><description>&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;(This is my 4th time trying to Submit this.&amp;nbsp; Excuse me if there are multiples.)&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;I am trying to populate List Items in a Column of EditType DropDownList or WebComboNet based on a Value in the same Row.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;As an example with the Northwind database, each WebGrid Row would contain [Order Details].[OrderID].&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;On the same WebGrid Row there would be a Column of EditType DropDownList/WebComboNet EditType that is a List of [Order Details].[ProductID]s for that [Order Details].[OrderID]&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;I see I can link the WebCombo to another WebCombo but that is not my case.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;My case would be a WebGridColumn of EditType NoEdit or just a value in the DataRow.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;With MS Gridview, I can dynamically populate a DropDownList in the Gridview's RowDataBound Server-Side Event.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;I have looked at the OnInitializeRow Server-Side Event and can get the Row Values but can not figure out how to get to the ValueList of the DropDownList or WebCombo in that Row.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;I image I could use Client-Side Load on Demand or On the Fly Postback however since the ListItem List count would be less than 10, I don't want to experience the delay of a round-trip back to the Server.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-family: calibri; font-size: 15px"&gt;Doug&lt;/span&gt;&lt;/p&gt;
</description></item></channel></rss>