﻿<?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 DropDownList has one selection</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-DropDownList-has-one-selection/</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 DropDownList has one selection</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-DropDownList-has-one-selection/</link><pubDate>Mon, 04 Jun 2012 22:03:09 GMT</pubDate><dc:creator>bernard</dc:creator><description>Hi Ahmed,&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Glad to hear that you have solved the problem. Thank you for your valuable feedback.&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Regards,&lt;/div&gt;
&lt;div&gt;Bernard&lt;/div&gt;</description></item><item><title>WebGrid DropDownList has one selection</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-DropDownList-has-one-selection/</link><pubDate>Mon, 04 Jun 2012 10:19:09 GMT</pubDate><dc:creator>adajani@najiasystems.com</dc:creator><description>&lt;p&gt;Yes, it is working fine now.  Thank you &amp; regards.&lt;/p&gt;</description></item><item><title>WebGrid DropDownList has one selection</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-DropDownList-has-one-selection/</link><pubDate>Thu, 31 May 2012 21:51:43 GMT</pubDate><dc:creator>bernard</dc:creator><description>&lt;p /&gt;&lt;p class="MsoNormal"&gt;Hi Ahmed,&lt;o:p /&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Is it working fine now? If you have any other question
please don’t hesitate to ask us.&lt;o:p /&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Regards,&lt;o:p /&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Bernard&lt;o:p /&gt;&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>WebGrid DropDownList has one selection</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-DropDownList-has-one-selection/</link><pubDate>Thu, 31 May 2012 14:59:59 GMT</pubDate><dc:creator>adajani@najiasystems.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 10pt"&gt;Thank you Bernard.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt"&gt;I ended up clearing and loading the dropdowns in the PrepareDataBinding event and it has been consistant.&amp;nbsp; I am still using &lt;/span&gt;&lt;span style="font-size: 10pt"&gt;InitializeLayout event though to create and add the columns to the grid.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards&lt;span style="font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid DropDownList has one selection</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-DropDownList-has-one-selection/</link><pubDate>Thu, 31 May 2012 00:50:14 GMT</pubDate><dc:creator>bernard</dc:creator><description>&lt;p /&gt;&lt;p class="MsoNormal"&gt;Hi Ahmed,&lt;o:p /&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;I’ve look on your code. I think the problem is WebValueList
setted in wrong event. On InitializeLayout event, I
suggest you to not to place dynamic object or data related settings especially
for object that created during the runtime. You can clear and load the
WebValueList on PrepareDataBinding event. I attach my sample here. Hope it
helps.&lt;o:p /&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Regards,&lt;o:p /&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Bernard&lt;o:p /&gt;&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>WebGrid DropDownList has one selection</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-DropDownList-has-one-selection/</link><pubDate>Wed, 30 May 2012 11:57:52 GMT</pubDate><dc:creator>adajani@najiasystems.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 10pt"&gt;Thank you for your reply Bernard.&amp;nbsp; I actually don't use the PrepareDataBinding event.&amp;nbsp; And I never check for IsPostBack or IsFlyPostBack.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt"&gt;I have a DataSource that I bind the grid to.&amp;nbsp; In the InitializeLayout event, I call a function to clear any values in the WebValueLists.&amp;nbsp; Then I call another function&amp;nbsp;to load, create, and add&amp;nbsp;the columns to the Grid.&amp;nbsp; Seperately, I call another function that fills the WebValueList with a DataSource.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt"&gt;&lt;/span&gt; &lt;/p&gt;&lt;span style="font-size: 9pt"&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;CType(WebGrid.RootTable.Columns.GetNamedItem(columnName).ValueList, ISNet.WebUI.WebGrid.WebValueList).ClearCachedDataSource()&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;&lt;span style="font-size: 9pt"&gt;Dim&lt;/span&gt;&lt;span style="font-size: 9pt"&gt; gridCol As New ISNet.WebUI.WebGrid.WebGridColumn&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;gridCol.DataMember = columnName&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;gridCol.Caption = columnCaption&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;gridCol.Name = columnName&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;gridCol.ColumnType = ISNet.WebUI.WebGrid.ColumnType.Text&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;gridCol.EditType = ISNet.WebUI.WebGrid.EditType.DropdownList&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;gridCol.DataType = "System.String"&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;&lt;span style="color: #000000"&gt;&lt;span style="font-size: 9pt"&gt;Dim&lt;/span&gt;&lt;span style="font-size: 9pt"&gt; valueList As ISNet.WebUI.WebGrid.WebValueList = WebGrid.RootTable.Columns.GetNamedItem(gridCol&lt;/span&gt;.Name).ValueList&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt"&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;valueList.SetDataSource(myDataSource, myTextField, myValueField)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;&lt;span style="color: #000000; font-size: 9pt"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</description></item><item><title>WebGrid DropDownList has one selection</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-DropDownList-has-one-selection/</link><pubDate>Wed, 30 May 2012 00:30:46 GMT</pubDate><dc:creator>bernard</dc:creator><description>&lt;p /&gt;&lt;p class="MsoNormal"&gt;Hi Ahmed,&lt;o:p /&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;I’ve look for the sample that you show above and I figured
the problem is on PrepareDataBinding event. This problem occurs because
ValueList is not setted when PrepareDataBinding event. To resolve this issue,
you can remove the validation (if (!IsPostBack)) from PrepareDataBinding event.&lt;o:p /&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;I put the revision of the sample here. Hope it helps.&lt;o:p /&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Regards,&lt;o:p /&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Bernard&lt;o:p /&gt;&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>WebGrid DropDownList has one selection</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-DropDownList-has-one-selection/</link><pubDate>Tue, 29 May 2012 17:29:08 GMT</pubDate><dc:creator>adajani@najiasystems.com</dc:creator><description>&lt;p&gt;Similar to the post below&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.intersoftpt.com/Community/WebGrid/WegGrid/"&gt;http://www.intersoftpt.com/Community/WebGrid/WegGrid/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I am finding different behaviors in regards to the DropDownList.  I load my columns, values and dropdown list dynamically/programmatically on page load.  Also similar to the code solution provided in the above post.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I've attached a few screen shots to refer to.&lt;/p&gt;
&lt;p&gt;sample-1 is on initial page load.&lt;/p&gt;
&lt;p&gt;sample-2 after I click the refresh grid icon on the bottom right.&lt;/p&gt;
&lt;p&gt;sample-3 when I click in the cell.&lt;/p&gt;
&lt;p&gt;sample-4 I refresh the page (ctrl&amp;#43;F5) and then I am able to see the all the values.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks for your help in advance.&lt;/p&gt;
&lt;p&gt;Ahmed&lt;/p&gt;</description></item></channel></rss>