Solved

Infragistics WebCombo / ComboBox problem

Posted on 2006-11-22
4
5,543 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dot Net 4.6.1 installation fails on W2012 R2 server 14 68
batch file or script 4 66
Java pass by reference 3 74
Find scheduled report or data export in CRM 2011 3 29
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.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.

734 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