Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1000
WebCombo with AutoGenerateColumns false problem
posted

Hi,

I have the follwing  WebCombo:

    <igcmbo:WebCombo ID="WebCombo1" Version="4.00" runat="server" Height="16px" Width="500px" Editable="False" ComboTypeAhead="None" DataTextField="CASTELLANO" DataValueField="ID" EnableAppStyling="True" StyleSetName="Claymation" DisplayValue="CASTELLANO">
        <Columns>
            <igtbl:UltraGridColumn HeaderText="ID" Key="ID" IsBound="True" BaseColumnName="ID">
                <footer key="ID"><RowLayoutColumnInfo OriginX="1"></RowLayoutColumnInfo></footer>
                <header key="ID" caption="ID"><RowLayoutColumnInfo OriginX="1"></RowLayoutColumnInfo></header>
            </igtbl:UltraGridColumn>
            <igtbl:UltraGridColumn HeaderText="CASTELLANO" Key="CASTELLANO" IsBound="True" BaseColumnName="CASTELLANO">
                <footer key="CASTELLANO"><RowLayoutColumnInfo OriginX="2"></RowLayoutColumnInfo></footer>
                <header key="CASTELLANO" caption="CASTELLANO"><RowLayoutColumnInfo OriginX="2"></RowLayoutColumnInfo></header>
            </igtbl:UltraGridColumn>
        </Columns>
        <DropDownLayout DropdownWidth="" BorderCollapse="Separate" RowSelectors="No" RowHeightDefault="20px" DropdownHeight="" ColHeadersVisible="No" GridLines="None" Version="4.00" AutoGenerateColumns="false" >
            <HeaderStyle BorderStyle="Solid" BackColor="LightGray">
                <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails>
            </HeaderStyle>
        </DropDownLayout>
        <ExpandEffects ShadowColor="LightGray" Type="Slide"></ExpandEffects>
    </igcmbo:WebCombo>

On page load I have the following code:

Dim ds As DataSet = negReturnMessage.GetDataSet()
            ds.Tables(0).TableName = "TEST"

            WebCombo1.DataMember = "TEST"
            WebCombo1.DataSource = ds
            WebCombo1.DataBind()

Now the dropdown isn't working and I can't see results, when I change the AutoGenerateColumns true I can see clearly all the columns and the results.

What is happening? What am I doing wrong?

  • 45049
    Verified Answer
    posted

    estanito said:
    <igtbl:UltraGridColumn HeaderText="ID" Key="ID" IsBound="True" BaseColumnName="ID">

    The IsBound property is likely the cause of your issue.

    By setting this property to true, you're saying "this column was defined by automatically generated columns."  As a result, when you have AutoGenerateColumns set to false, WebCombo sees these columns, determines they were automatically generated, and discards them since you're not using automatically generated columns.  With all of your columns having this property set to true, they're all discareded.

    Set this IsBound property to false instead, for this to work with AutoGenerateColumns set to false.