?
Solved

Infragistics WebCombo / ComboBox problem

Posted on 2006-11-22
4
Medium Priority
?
5,570 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 1500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

777 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