﻿<?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 - WebCombo Rendering Items Without Postback</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-Rendering-Items-Without-Postback/</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>WebCombo Rendering Items Without Postback</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-Rendering-Items-Without-Postback/</link><pubDate>Sun, 15 Nov 2009 22:53:52 GMT</pubDate><dc:creator>gordont</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Great to hear that you have solved the problem. &lt;img style="border-bottom: medium none; border-left: medium none; border-top: medium none; border-right: medium none" src="http://www.intersoftpt.com/WebResources/Images/Community/Editor/smiley1.gif" /&gt; &lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Gordon Tumewu&lt;/p&gt;</description></item><item><title>WebCombo Rendering Items Without Postback</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-Rendering-Items-Without-Postback/</link><pubDate>Fri, 13 Nov 2009 09:01:14 GMT</pubDate><dc:creator>PRISMAY</dc:creator><description>&lt;p&gt;Well, technically I changed the DataSourceID that was already there in your sample.  I just changed it from an Access source to a SQL source. ;)  But you nailed it.  Removing the DataSourceID did the trick.  However, I did not want to use multiple columns but just a normal pulldown list and I accomplished it with the following configuration:&lt;/p&gt;
&lt;p&gt;ASPX Markup&lt;/p&gt;&lt;pre&gt;        &amp;lt;ISWebCombo:WebCombo 
            ID="WebCombo1" runat="server"
            Height="20px" Width="200px" &amp;gt;
        &amp;lt;/ISWebCombo:WebCombo&amp;gt;
&lt;/pre&gt;

&lt;p&gt;Codebehind:&lt;/p&gt;&lt;pre&gt;combo.DataMember = "DefaultView";
combo.DataTextField = "reportSetName";
combo.DataValueField = "reportSetID";

combo.LayoutSettings.StatusBoxVisible = false;

combo.Columns.Add("reportSetName");
combo.Columns.Add("reportSetID");

DataView dv = (DataView)SqlDataSource1.Select(new DataSourceSelectArguments("reportSetID DESC"));

combo.PopulateUnboundData(dv,false);

&lt;/pre&gt;

&lt;p&gt;Thanks Gordon.&lt;/p&gt;</description></item><item><title>WebCombo Rendering Items Without Postback</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-Rendering-Items-Without-Postback/</link><pubDate>Fri, 13 Nov 2009 04:16:30 GMT</pubDate><dc:creator>gordont</dc:creator><description>&lt;p&gt;Hi Yousif,&lt;/p&gt;
&lt;p&gt;Thank you very much for the video, it helps me to investigate the issue. After checking the video I suspect that the cause if the issue is because you set the DataSourceID of WebCombo. Actually without setting the DataSourceID the WebCombo will still have the data because you have used the PopulateUnboundData. By removing the DataSourceID property from WebCombo I believe it should fix the issue.&lt;/p&gt;
&lt;p&gt;Please let me know if the solution works or not. Thanks.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Gordon Tumewu&lt;/p&gt;</description></item><item><title>WebCombo Rendering Items Without Postback</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-Rendering-Items-Without-Postback/</link><pubDate>Thu, 12 Nov 2009 09:38:25 GMT</pubDate><dc:creator>PRISMAY</dc:creator><description>&lt;p&gt;Yes, I experience the post back with your sample.  I had to modify it to use a SQL data source, but that's it.  I've included my video and you can see it post back when I pull it down the first time.  I put a block of code in with a check for Page.IsPostBack to make it clear.&lt;/p&gt;</description></item><item><title>WebCombo Rendering Items Without Postback</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-Rendering-Items-Without-Postback/</link><pubDate>Wed, 11 Nov 2009 23:52:10 GMT</pubDate><dc:creator>gordont</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am really sorry but in your first post you said that:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-size: 10pt"&gt;I want to accomplish a simple task with the WebCombo control. Create the object, configure it, assign the data source and have it render. Now when I click on it to pull it down, I do NOT want it to post back. I want it to be pre-filled already.&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;and if I am not mistaken the WebCombo sample that I sent before have the same behaviour, it will load the data at the first time and when you click to pull it down the postback did not occured. You can see it in my video before. &lt;/p&gt;
&lt;p&gt;Please correct me if I am wrong, do you experience the postback everytime you click the dropdown in my sample? Or do you experience the issue in your application only?&lt;/p&gt;
&lt;p&gt;Best Regards.&lt;/p&gt;
&lt;p&gt;Gordon Tumewu&lt;/p&gt;</description></item><item><title>WebCombo Rendering Items Without Postback</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-Rendering-Items-Without-Postback/</link><pubDate>Wed, 11 Nov 2009 08:40:41 GMT</pubDate><dc:creator>PRISMAY</dc:creator><description>&lt;p&gt;I appreciate the video and all, but it doesn't resolve the "problem."  I need the combo to be filled upon rendering and to not post back at all.  Just like it does in unbound mode but I have to be able to have a value/text pair in that mode.&lt;/p&gt;</description></item><item><title>WebCombo Rendering Items Without Postback</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-Rendering-Items-Without-Postback/</link><pubDate>Wed, 11 Nov 2009 02:19:03 GMT</pubDate><dc:creator>gordont</dc:creator><description>&lt;p&gt;Hi Yousif,&lt;/p&gt;
&lt;p&gt;I am sorry I dont have priviledge to cancel the mark as answer, but I have added note that the post is not the right answer, and if we have found the correct answer I will put the answer in the post.&lt;/p&gt;
&lt;p&gt;For the solution that I gave you before, I have test it and didn't found any postback to the server accept for the first time the WebCombo load. Here I attached video on how I debug using the sample that I provided to you before.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Gordon Tumewu&lt;/p&gt;</description></item><item><title>WebCombo Rendering Items Without Postback</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-Rendering-Items-Without-Postback/</link><pubDate>Tue, 10 Nov 2009 09:20:00 GMT</pubDate><dc:creator>PRISMAY</dc:creator><description>&lt;p&gt;Gordon,&lt;/p&gt;
&lt;p&gt;Although this works with an unbound data set.  It still posts back and that's what I don't want.  I need the combo box to populate with all the data items and NOT post back per my original description please.  Please unmark your response as an answer since it has not provided a solution to this issue.  Thank you.&lt;/p&gt;</description></item><item><title>WebCombo Rendering Items Without Postback</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-Rendering-Items-Without-Postback/</link><pubDate>Mon, 09 Nov 2009 08:39:11 GMT</pubDate><dc:creator>PRISMAY</dc:creator><description>&lt;p&gt;Hi Grodon,&lt;/p&gt;
&lt;p&gt;Thank you so much.  I had a feeling you guys had to have something like this.  I'm sorry I couldn't find it in the references as I looked and looked.  This is a huge deal so I'm glad you were able to dig it up.  Thanks again.&lt;/p&gt;</description></item><item><title>WebCombo Rendering Items Without Postback</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-Rendering-Items-Without-Postback/</link><pubDate>Sun, 08 Nov 2009 22:28:39 GMT</pubDate><dc:creator>gordont</dc:creator><description>&lt;p&gt;Hi Yousif,&lt;/p&gt;
&lt;p&gt;I am sorry about my previous statement that unbound WebCombo cannot have value, afer checking again we have PopulateUnbound method that can bind WebCombo like unbound but still use the datatable as the datasource. Here I attached my simple sample, using this sample the WebCombo will have Text and Value field.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Gordon Tumewu&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note: This solution has not approved yet by the customer, this will be the solution once the customer has aggree first.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>WebCombo Rendering Items Without Postback</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-Rendering-Items-Without-Postback/</link><pubDate>Tue, 03 Nov 2009 16:33:51 GMT</pubDate><dc:creator>PRISMAY</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 10pt"&gt;I want to accomplish a simple task with the WebCombo control.&amp;nbsp; Create the object, configure it, assign the data source and have it render.&amp;nbsp; Now when I click on it to pull it down, I do NOT want it to post back.&amp;nbsp; I want it to be pre-filled already.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt"&gt;I know I can accomblish this&amp;nbsp;as an UNBOUND object, however, the problem is that I can't assign a value and text.&amp;nbsp; An unbound object uses the text as both the value and text and this doesn't work for us.&amp;nbsp; In the example below, you see how we create the object dynamically which works, but then I have no way to know what the id of an entry is.&amp;nbsp; The cbo object below is of type ISNet.WebUI.WebCombo.&lt;span style="color: #2b91af"&gt;&lt;span style="color: #2b91af"&gt;WebCombo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;// configure the combo box for immediate population
cbo.EnableViewState = false;
cbo.AllowAutoPostback = false;
cbo.LayoutSettings.ComboMode = ISNet.WebUI.WebCombo.Mode.SingleColumn;
cbo.ViewStateStorage = ISNet.WebUI.StateCacheStorage.None;

// create a single column set to unbound mode
ISNet.WebUI.WebCombo.WebComboColumn wcc = new ISNet.WebUI.WebCombo.WebComboColumn();
wcc.Bound = false;

cbo.Columns.Add(wcc);

// populate the combo list
string strDefaultValue = CPRISMStrLib.GetStr(drOptions["defaultValue"]);
string strDefaultText = string.Empty;
foreach (DataRow dr in ds.Tables[0].Rows)
{
    ISNet.WebUI.WebCombo.WebComboRow wcr = new ISNet.WebUI.WebCombo.WebComboRow();
    ISNet.WebUI.WebCombo.WebComboCell cell = new ISNet.WebUI.WebCombo.WebComboCell();

    cell.Text = CPRISMStrLib.GetStr(dr["listName"]);
    &lt;strong&gt;&lt;span style="color: #1f497d"&gt;cell.Value = CPRISMStrLib.GetStr(dr["listID"]);
&lt;/span&gt;&lt;/strong&gt;
    wcr.Cells.Add(cell);

    cbo.Rows.Add(wcr);

    if (CPRISMStrLib.GetStr(cell.Value) == strDefaultValue)
    {
        strDefaultText = cell.Text;
        cbo.SelectedText = strDefaultText;
        &lt;span style="color: #c0504d"&gt;&lt;strong&gt;cbo.Value = strDefaultText;&lt;/strong&gt;&lt;/span&gt;
    }
}
&lt;/pre&gt;

&lt;p&gt;I can easily accomplish with a standard DropDownList and the value/text pairs set up via the ListItem type.  I'm not sure why it seems so complicated to accomplish this via WebCombo.&lt;/p&gt;
&lt;p&gt;Even through I set the .Value property above (in blue), the rendered html dataValue attribute is set to the value assigned to Text and not Value.&lt;/p&gt;
&lt;p&gt;To show the default item in the combo box, setting cbo.Value to strDefaultValue does not work which is why, in that section, I set to strDefaultText (in red).&lt;/p&gt;</description></item></channel></rss>