remove the extra (last) column in the dropdown of XamMultiColumnComboEditor

Answered (Verified) This post has 2 verified answers | 3 Replies | 2 Followers Thread's RSS feed.

Gajender
Points 2,571
Replied On: Mon, Mar 19 2012 12:49 PM Reply

How can remove the extra column in the dropdown. I have attached image for extra column.

OR

how can we hide the dividing line, so that it looks one field in a row.


  • Post Points: 20

Verified Answer

[Infragistics]Stefan
Points 78,623
Answered (Verified) Replied On: Tue, Mar 20 2012 10:55 AM Reply
Verified by Gajender

Hello Gajender,

Thank you for your post. I have been looking into it and I created a sample project for you with the look you want to achieve. Basically I handled the ComboHeaderCellControl and ComboCellControl’s Loaded events and set their Visibility to Collapsed if they are the last ones. Please let me know if this helps you or you need further assistance on this matter.

Looking forward for your reply.

Sincerely,
Stefan, MCPD
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support

  • Post Points: 40
[Infragistics]Stefan
Points 78,623
Answered (Verified) Replied On: Thu, Mar 22 2012 5:10 AM Reply
Verified by Gajender

Hello Gajender,

 

I have been looking into your code and I can say that it doesn’t work because the DataContext that comes in the DataTrigger isn’t ComboHeaderCellControl, so you can use the following Styles instead of yours:

<Style TargetType="{x:Type ig:ComboHeaderCellControl}">
    <Style.Triggers>
    <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Value="{x:Null}">
        <Setter Property="Visibility" Value="Collapsed"/>
    </DataTrigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type ig:ComboCellControl}">
    <Style.Triggers>
        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=HasContent}" Value="False">
            <Setter Property="Visibility" Value="Collapsed"/>
        </DataTrigger>
    </Style.Triggers>
</Style>

 

Hope this helps you.

Sincerely,
Stefan, MCPD
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support

  • Post Points: 25

All Replies

[Infragistics]Stefan
Points 78,623
Answered (Verified) Replied On: Tue, Mar 20 2012 10:55 AM Reply
Verified by Gajender

Hello Gajender,

Thank you for your post. I have been looking into it and I created a sample project for you with the look you want to achieve. Basically I handled the ComboHeaderCellControl and ComboCellControl’s Loaded events and set their Visibility to Collapsed if they are the last ones. Please let me know if this helps you or you need further assistance on this matter.

Looking forward for your reply.

Sincerely,
Stefan, MCPD
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support

  • Post Points: 40
Gajender
Points 2,571
Replied On: Wed, Mar 21 2012 10:21 AM Reply

Thanks for your answer Stefan. I am trying to make same thing work in styles, but does not work. Can you let know what I am missing here...

 <Style TargetType="ig:ComboHeaderCellControl">
        <Style.Triggers>
            <DataTrigger Binding="{Binding Path=Content, Mode=OneWay}" Value="{x:Null}">
                <Setter Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
        </Style.Triggers>
</Style>

  • Post Points: 20
[Infragistics]Stefan
Points 78,623
Answered (Verified) Replied On: Thu, Mar 22 2012 5:10 AM Reply
Verified by Gajender

Hello Gajender,

 

I have been looking into your code and I can say that it doesn’t work because the DataContext that comes in the DataTrigger isn’t ComboHeaderCellControl, so you can use the following Styles instead of yours:

<Style TargetType="{x:Type ig:ComboHeaderCellControl}">
    <Style.Triggers>
    <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Value="{x:Null}">
        <Setter Property="Visibility" Value="Collapsed"/>
    </DataTrigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type ig:ComboCellControl}">
    <Style.Triggers>
        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=HasContent}" Value="False">
            <Setter Property="Visibility" Value="Collapsed"/>
        </DataTrigger>
    </Style.Triggers>
</Style>

 

Hope this helps you.

Sincerely,
Stefan, MCPD
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support

  • Post Points: 25
Page 1 of 1 (4 items) | RSS