Solved

Infragistics WebCombo / ComboBox problem

Posted on 2006-11-22
4
5,511 Views
Last Modified: 2013-11-15
Hi,

I have the Infragistics NetAdvantage 2006 installed. I want to implement a standard combobox / dropdown list (like the .Net standard combobox). The closest thing I have found was the "WebCombo", but when you click on the arrow to expand the combobox, the display is similar to a datagrid, with multiple rows and columns. Is there any way of setting this control to appear like the standard .NET combobox? The combobox only needs to be populated with a limited amount of items (e.g. 3). The front-end of the application seems incomplete if I have 10 nice-looking infragistic controls and 1 Windows control, since the colour scheming doesn't match.

Any help will be appreciated.
0
Comment
Question by:Caroline_Swart
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
NPratas earned 500 total points
ID: 17994379
Hi,

I use the Infragistcs Combo in Windows Forms application, the code (C#) should be similiar for the web controls.

To hide the columns headers:
myCombobox.DisplayLayout.Bands[0].ColHeadersVisible = false;


To choose the visible columns:
foreach(Infragistics.Win.UltraWinGrid.UltraGridColumn col in myCombobox.DisplayLayout.Bands[0].Columns)                  
                        col.Hidden = !(col.Key == "ColumnToBeVisible");      


Hope it helps
0
 

Author Comment

by:Caroline_Swart
ID: 17996457
Hi,

The WebCombo doesn't have the property for DisplayLayout.

I have tried the following code (I tried all of it together, since I didn't know what else to do):

this.myCombobox.DropDownLayout.AllowColSizing = Infragistics.WebUI.UltraWebGrid.AllowSizing.Fixed;
this.myCombobox.DropDownLayout.AllowSorting = Infragistics.WebUI.UltraWebGrid.AllowSorting.No;
this.myCombobox.DropDownLayout.AutoGenerateColumns = false;
this.myCombobox.DropDownLayout.ColHeadersVisible = Infragistics.WebUI.UltraWebGrid.ShowMarginInfo.No;
this.myCombobox.DropDownLayout.RowStyle.Width = System.Web.UI.WebControls.Unit.Pixel(150);
this.myCombobox.DropDownLayout.DropdownWidth = System.Web.UI.WebControls.Unit.Pixel(150);
this.myCombobox.Editable = false;
this.myCombobox.HideDropDowns = true;
Infragistics.WebUI.UltraWebGrid.UltraGridRow row = new Infragistics.WebUI.UltraWebGrid.UltraGridRow();      

The "combobox" does look better, being a smaller "datagrid" inside the combobox, but I can't seem to get any properties that makes the WebCombo look and feel like a standard Windows Form combobox.

Your code guided me into the right direction, but without this WebCombo-looking-like-a-standard-combobox-with-NetAdvantage-styling, my web form still looks lobsided.
 
Any further help will be GREATLY appreciated
0
 

Author Comment

by:Caroline_Swart
ID: 17997024
Hi,

I have kind of figured it out, with a lot of hassle and a lot of code and clicking.
There must be a shorter or easier way of doing it.

I have changed the following items in the Design View:
In the "DropDownLayout":
AutoGenerateColumn = false
BorderColapse = Seperate
ColHeaderVisible = No
ColWidthDefault = 80px
DropDownHeight = 40px
DropDownWidth = 150px
Gridlines = false
RowHeightDefault = 20px
RowSelectors = No
EnableTheming = false

In the "Data":
SelectedIndex = 0

In the "Row" collection:
I have added the 2 row items I require

In the "Layout":
Height = 22px
Width = 150px

This looks MUCH more than a normal / typical combobox, but if I am going to have 20 comboboxes on my form, I don't want to sit for a whole day making graphical changes.

This is a real hack of it, but I wonder if there isn't a easier / shorter way of doing it. Or maybe some way of editing the standard combobox to look like a NetAdvantage WebCombo.

Any help will be appreciated.

0
 
LVL 5

Expert Comment

by:NPratas
ID: 18007983
Hi again,

You can use Presets to apply the look to the other WebCombos.
To use Presets click Quick Design on the properties windows.
Choose the Presets option, you save the look of the combobox to a file and use the file to apply the look to the other combos.

I'm using NetAdvantage 2005, hope it works in 2006 also.

Hope it helps.


0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now