Solved

Infragistics WebCombo / ComboBox problem

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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…

821 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