Solved

Infragistics WebCombo / ComboBox problem

Posted on 2006-11-22
4
5,520 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

920 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

15 Experts available now in Live!

Get 1:1 Help Now