﻿<?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 - WebCombo - Set Default Value</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Set-Default-Value/</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>Set Default Value</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Set-Default-Value/</link><pubDate>Mon, 21 Dec 2009 22:06:44 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Hi R D,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you like to set value on the server side, on the Page_Load, you can just add WebCombo1.Value = "Andrew", it will set the default value to "Andrew". All the sample beside the one that using SetText() method are not working because when we try to set the WebCombo into the specific index, the data is not populated yet. That is what we need to set the timeout first. Here are the sample code that I made on ClientSide Event of OnInitialize.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function SetValue() {
	var timeout = 650;
	var combo = ISGetObject("WebCombo1");
	combo.ShowDropDown();
	setTimeout(function() { combo.SetSelectedIndex(5); }, timeout)
}&lt;/pre&gt;

&lt;p&gt;&lt;br /&gt;&lt;span style="font-size: 9pt"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;I hope it helps and please do not hesitate to ask if you have any other questions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Thank you,&lt;br /&gt;Andi Santoso.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Set Default Value</title><link>http://www.intersoftsolutions.com/Community/WebCombo/Set-Default-Value/</link><pubDate>Mon, 21 Dec 2009 05:28:06 GMT</pubDate><dc:creator>rdelloro</dc:creator><description>&lt;p&gt;Hi all;&lt;/p&gt;
&lt;p&gt;I have an issue with webcombo, I need to set the default value.&lt;/p&gt;
&lt;p&gt;I have tried to set value serverside after Datasource loading but I have not find a solution.&lt;/p&gt;
&lt;p&gt;After I have tried to set value client side using this sample :&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana, arial, helvetica, sans-serif; font-size: 12px; color: rgb(0, 0, 102); " /&gt;&lt;/p&gt;&lt;pre style="background-color: rgb(255, 252, 225); font-family: 'courier new', tahoma; font-size: 9pt; "&gt;function SetValue()
{                        
   // To Set selected Value by KeyValue
   var combo = ISGetObject("WebCombo1");
   combo.SetSelectedRowByValue("Andrew");
   alert("Set value by KeyValue Andrew");
}&lt;/pre&gt;
&lt;p /&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;but doesn't run .&lt;/p&gt;
&lt;p&gt;I Have find this sample at this link:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://support.intersoftpt.com/docs/webcombo/4.0.7200/Set%20selected%20row%20in%20unbound%20WebCombo.html"&gt;http://support.intersoftpt.com/docs/webcombo/4.0.7200/Set%20selected%20row%20in%20unbound%20WebCombo.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;but the only sample that run correctly is setText() method.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;How can I set the default value of a webcombo?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;</description></item></channel></rss>