How to animate a combo box?
I have a combo box that get's populated from a web service.
This may happen in the background as the user is doing other tasks.
I would like the combo box to jiggle or bounce up and down
when it receives it's data. Can anyone offer some insights into how
to do this?
Thanks for the suggestions all. I found the rotate effect to
work just great. Here is the code I used for anyone else that's
interested:
In my web service call that updates the combo box, I declare
the jiggle function on the result:
<mx:operation name="getControlsProjects"
resultFormat="object" result="jiggleComboBox()">
public function jiggleComboBox() : void
cbxProjects.visible=true;
jiggleStart.play();
]]>
</mx:Script>
<mx:Rotate id="jiggleStart" target="{cbxProjects}"
angleTo="3" effectEnd="jiggleEnd.play()" duration="100"
repeatCount="10"/>
<mx:Rotate id="jiggleEnd" target="{cbxProjects}"
angleTo="-3" effectEnd="jiggleReset.play()" duration="100"/>
<mx:Rotate id="jiggleReset" target="{cbxProjects}"
angleTo="0"/>
I love to watch that combo box jiggle up and down. LOL
Thanks again all!
Similar Messages
-
I am developing a desktop application in Wpf using MVVM and Entity Frameworks. I have the following tables:
1. Party (PartyId, Name)
2. Case (CaseId, CaseNo)
3. Petitioner (CaseId, PartyId) ............. Link Table
I am completely new to .Net and to begin with I download Microsoft's sample application and
following the pattern I have been successful in creating several tabs. The problem started only when I wanted to implement many-to-many relationship. The sample application has not covered the scenario where there can be a any-to-many relationship. However
with the help of MSDN forum I came to know about a link table and managed to solve entity framework issues pertaining to many-to-many relationship. Here is the screenshot of my application to show you what I have achieved so far.
And now the problem I want the forum to address is how to bind a combo box so that it retrieves Party.Name for the corresponding PartyId in the Link Table and also I want to populate it with Party.Name so that
users can choose one from the dropdown list to add or edit the petitioner.Hello Barry,
Thanks a lot for responding to my query. As I am completely new to .Net and following the pattern of Microsoft's Employee Tracker sample it seems difficult to clearly understand the concept and implement it in a scenario which is different than what is in
the sample available at the link you supplied.
To get the idea of the thing here is my code behind of a view vBoxPetitioner:
<UserControl x:Class="CCIS.View.Case.vBoxPetitioner"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:v="clr-namespace:CCIS.View.Case"
xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
mc:Ignorable="d"
d:DesignWidth="300"
d:DesignHeight="200">
<UserControl.Resources>
<DataTemplate DataType="{x:Type vm:vmPetitioner}">
<v:vPetitioner Margin="0,2,0,0" />
</DataTemplate>
</UserControl.Resources>
<Grid>
<HeaderedContentControl>
<HeaderedContentControl.Header>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Margin="2">
<Hyperlink Command="{Binding Path=AddPetitionerCommand}">Add Petitioner</Hyperlink>
| <Hyperlink Command="{Binding Path=DeletePetitionerCommand}">Delete</Hyperlink>
</TextBlock>
</StackPanel>
</HeaderedContentControl.Header>
<ListBox BorderThickness="0" SelectedItem="{Binding Path=CurrentPetitioner, Mode=TwoWay}" ItemsSource="{Binding Path=tblParties}" />
</HeaderedContentControl>
</Grid>
</UserControl>
This part is working fine as it loads another view that is vPetioner perfectly in the manner I want it to be.
Here is the code of vmPetitioner, a ViewModel:
Imports Microsoft.VisualBasic
Imports System.Collections.ObjectModel
Imports System
Imports CCIS.Model.Party
Namespace CCIS.ViewModel.Case
''' <summary>
''' ViewModel of an individual Email
''' </summary>
Public Class vmPetitioner
Inherits vmParty
''' <summary>
''' The Email object backing this ViewModel
''' </summary>
Private petitioner As tblParty
''' <summary>
''' Initializes a new instance of the EmailViewModel class.
''' </summary>
''' <param name="detail">The underlying Email this ViewModel is to be based on</param>
Public Sub New(ByVal detail As tblParty)
If detail Is Nothing Then
Throw New ArgumentNullException("detail")
End If
Me.petitioner = detail
End Sub
''' <summary>
''' Gets the underlying Email this ViewModel is based on
''' </summary>
Public Overrides ReadOnly Property Model() As tblParty
Get
Return Me.petitioner
End Get
End Property
''' <summary>
''' Gets or sets the actual email address
''' </summary>
Public Property fldPartyId() As String
Get
Return Me.petitioner.fldPartyId
End Get
Set(ByVal value As String)
Me.petitioner.fldPartyId = value
Me.OnPropertyChanged("fldPartyId")
End Set
End Property
End Class
End Namespace
And below is the ViewMode vmParty which vmPetitioner Inherits:
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports CCIS.Model.Case
Imports CCIS.Model.Party
Imports CCIS.ViewModel.Helpers
Namespace CCIS.ViewModel.Case
''' <summary>
''' Common functionality for ViewModels of an individual ContactDetail
''' </summary>
Public MustInherit Class vmParty
Inherits ViewModelBase
''' <summary>
''' Gets the underlying ContactDetail this ViewModel is based on
''' </summary>
Public MustOverride ReadOnly Property Model() As tblParty
'''' <summary>
'''' Gets the underlying ContactDetail this ViewModel is based on
'''' </summary>
'Public MustOverride ReadOnly Property Model() As tblAdvocate
''' <summary>
''' Gets or sets the name of this department
''' </summary>
Public Property fldName() As String
Get
Return Me.Model.fldName
End Get
Set(ByVal value As String)
Me.Model.fldName = value
Me.OnPropertyChanged("fldName")
End Set
End Property
''' <summary>
''' Constructs a view model to represent the supplied ContactDetail
''' </summary>
''' <param name="detail">The detail to build a ViewModel for</param>
''' <returns>The constructed ViewModel, null if one can't be built</returns>
Public Shared Function BuildViewModel(ByVal detail As tblParty) As vmParty
If detail Is Nothing Then
Throw New ArgumentNullException("detail")
End If
Dim e As tblParty = TryCast(detail, tblParty)
If e IsNot Nothing Then
Return New vmPetitioner(e)
End If
Return Nothing
End Function
End Class
End Namespace
And final the code behind of the view vPetitioner:
<UserControl x:Class="CCIS.View.Case.vPetitioner"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
mc:Ignorable="d"
Width="300">
<UserControl.Resources>
<ResourceDictionary Source=".\CompactFormStyles.xaml" />
</UserControl.Resources>
<Grid>
<Border Style="{StaticResource DetailBorder}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Petitioner:" />
<ComboBox Grid.Column="1" Width="240" SelectedValuePath="." SelectedItem="{Binding Path=tblParty}" ItemsSource="{Binding Path=PetitionerLookup}" DisplayMemberPath="fldName" />
</Grid>
</Border>
</Grid>
</UserControl>
The problem, presumably, seems to be is that the binding path "PetitionerLookup" of the ItemSource of the Combo box in the view vPetitioner exists in a different ViewModel vmCase which serves as an ObservableCollection for MainViewModel. Therefore,
what I need to Know is how to route the binding path if it exists in a different ViewModel?
Sir, I look forward to your early reply bringing a workable solution to the problem I face.
Warm Regards,
Arun -
How to use the Combo Box In MAtrix Colums
HI Experts,
Good Mornong.How to use the Combo Box In MAtrix Colums?
Regards And Thanks,
M.Thippa Reddyhi,
loading data in to the combobox on form load.but, it should be done when atleast one row is active.
the values what ever you are inserting in to combo should be less than or eqhal to 100 or 150.if it exceeds beyond that performance issue arises.it takes more time to load all the data.so, it is better to have 100 or less.
oMatrix.AddRow()
RS = Nothing
RS = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
RS.DoQuery("select ItemCode,ItemName from oitm")
oCombo = oMatrix.Columns.Item("ColumnUID").Cells.Item(oMatrix.RowCount).Specific
For i = 1 To RS.RecordCount
If RS.EoF = False Then
oCombo.ValidValues.Add(RS.Fields.Item("ItemCode").Value,RS.Fields.Item("ItemName").Value)
RS.MoveNext()
End If
Next
the above code is inserting data from database to column combobox.
you can fill combo directly also as shown below.
oCombo.ValidValues.Add("x","1")
oCombo.ValidValues.Add("y","2")
oCombo.ValidValues.Add("z","3")
oCombo.ValidValues.Add("","")
and what ever the values you are filling into combo should be unique.other wise it shows valid value exists.
regards,
varma -
How to pass a combo box parameter on reporting services?
How to pass a combo box parameter on reporting services?
For example, a report has a parameter which is a combo box, its items came from a database query.
Looks like the combo box didn't got populated and greyed out if I didn't pass the parameter.Hi LAScorpion,
In Reporting Services, if we want to pass a combo box parameter (means signal-parameter) from one report (main report) to another report (subreport), we can enable an action with “Go to report” or “Go to URL” option to achieve the requirement. For more details,
please see:
Method1: Go to report
Right-click a report item to open the properties dialog in subreport, click Action in the left pane.
Enable Go to report action, then select the main report name in the drop-down list.
Add a parameter as below:
Select ID (a parameter name from main report) in the drop-down list of Name, and select [ID] (a field name from subreport) in the drop-down list of Value.
Method2: Go to URL
Right-click a report item to open the properties dialog in subreport, click Action in the left pane.
Enable Go to URL action, the URL below is for your reference:
="javascript:void(window.open('http://server_name/ReportServer/Pages/ReportViewer.aspx?%2ffolder_name%2fmain_report_name&rs:Command=Render¶meter_name="& Parameters!parameter_name.Value &"'))"
Besides, if the parameter’s values are based on other parameters, then the combo-box got greyed out when we haven’t select values in preceding parameters. For more details, please see:
Cascading Parameters
If there are any misunderstanding, please elaborate the issue for further investigation.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
How to link two combo boxes? (urgent)
Hello,
I am wondering how to link two combo boxes in Acrobat Pro 9. Basically, I need to link a building with a list of rooms. There are 3 building choices in my first combo box. For the sake of example, Building A, Building B and Building C. When one of the buildings is selected, I want a 2nd combo box to display the rooms that are located in that building. So by selecting building A, you would then be able to choose a room from the list of available rooms in the second drop box. The buildings cannot share a list of rooms because they have the same room numbers. Is anyone able to help?
- TravisYou can also use ajax. When the first combo box element is selected, it will call the ajax function and that ajax function will bring the data from the database and place it in second combo box.
-
How to change screen combo box value from a method?
Hi,
I have a screen that has a combo box and an ALV.
the combo box has the line numbers of the data in the ALV.
you can select the line item and then the ALV changes...
I fill the combo with function VRM_SET_VALUE.
all is good once the user changes the combo box.
I want to enable the user to click (hotspot) on ALV and then to ... and to change the value of the combo box to the line number he clicked on.
I couldn't change the value inside that box.
The combo box is declared as global parameter.
when I assign a value to it inside the method, it is good. but once back to PAI, it is the old value.
Do you have any idea how to set up that value?
Thanks.Itay,
When you load the combo box, you should be setting a "key" for each entry in the combo box.
See below:
move '2010FY' to Value-Key.
move '2010 - Full Year' to Value-Text.
append value to list.
move '2010Q1' to Value-Key.
move '2010 - Q1' to Value-Text.
append value to list.
move '2010Q2' to Value-Key.
move '2010 - Q2' to Value-Text.
append value to list.
move '2010Q3' to Value-Key.
move '2010 - Q3' to Value-Text.
append value to list.
move '2010Q4' to Value-Key.
move '2010 - Q4' to Value-Text.
append value to list.
move 'COMBO1' to name. "name of Combo box in the screen
call function 'VRM_SET_VALUES'
exporting
id = name
values = list.
So add these "keys" to a hidden column in the ALV grid. Then .... when the user presses a hotspot, pass the value of the hidden column (for the selected row) into the COMBO1 box.
move '2010'FY' into Combo1. " if they selected Full Year of 2010 -
How to populate the combo boxes that are created dynamically in jsp
Hi,
I am using JSP.
I am creating combo boxes dynamically (based on the num selected by the user). These dynamically created combo boxes need to have A-Z as options (each box) . Now, when the user chooses the option A in any of the combo-boxes,the rest should not have this option. so on..
how do i achieve this.Kindly help.You'll need to use JavaScript...I have a complicated example and a simple example, however, I cannot really understand the complex example but I know how it works. The looping is too complex for me.
First you'll need to populate a server side variable...depending on how often the data is updated you may want this to run each time a new session is created...this example is run each time Tomcat is started and the application context is initialized:
package kms.web;
// Servlet imports
import javax.servlet.ServletContextListener;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContext;
// utility imports
import java.util.Map;
// domain imports
import kms.domain.LocationService;
import kms.domain.DeptService;
import kms.domain.PatentService;
* This listenter is used to initialize
* the Maps of Locations, Patents & Depts used to populate
* pulldown lists in JSPs
public class InitializeData implements ServletContextListener {
* This method creates the Maps.
public void contextInitialized(ServletContextEvent sce) {
ServletContext context = sce.getServletContext();
LocationService lServ = new LocationService();
// Create the Maps
Map campuses = lServ.getCampuses();
Map buildings = lServ.getBuildings();
Map floors = lServ.getFloors();
Map locs = lServ.getLocations();
// And store them in the "context" (application) scope
context.setAttribute("campuses", campuses);
context.setAttribute("buildings", buildings);
context.setAttribute("floors", floors);
context.setAttribute("locs", locs);
DeptService dServ = new DeptService();
Map depts = dServ.getDepts();
context.setAttribute("depts", depts);
PatentService pServ = new PatentService();
Map patents = pServ.getPatents();
context.setAttribute("patents", patents);
//I did this one myself
/* CodeService cServ = new CodeService();
Map masterMks = cServ.getCodes();
context.setAttribute("masterMks", masterMks);
* This method is necessary for interface.
public void contextDestroyed(ServletContextEvent sce) {
// I have no clue what the heck this is for???
// Let me know if you do!
}So now we travel into the PatentService method called 'getPatents();' which in turn calls a PatentDAO method
Map patents = pServ.getPatents();
Below is the code for the PatentService object:
package kms.domain;
import kms.util.ObjectNotFoundException;
import java.util.*;
* This object performs a variety of dept services, like retrieving
* a dept object from the database, or creating a new dept object.
public class PatentService {
* The internal Data Access Object used for database CRUD operations.
private PatentDAO patentDAO;
* This constructor creates a Dept Service object.
public PatentService() {
patentDAO = new PatentDAO();
public Map getPatents() {
Map patents = null;
try {
patents = patentDAO.retrieveAll();
// If the dept object does not exist, simply return null
} catch (ObjectNotFoundException onfe) {
patents = null;
return patents;
}It may be useful for you to see the code of the Patent class:
package kms.domain;
/*** This domain object represents a dept.
public class Patent implements java.io.Serializable {
private int codeGgm;
private String name = "";
private String description = "";
private int creator;
private String creationDate = "";
private int used;
* This is the full constructor.
public Patent(int codeGgm, String name, String desc, int creator, String creationDate, int used) {
this.codeGgm = codeGgm;
this.name = name;
this.description = desc;
this.creator = creator;
this.creationDate = creationDate;
this.used = used;
public Patent() { }
public int getCodeGgm() {
return codeGgm;
public void setCodeGgm(int codeGgm) {
this.codeGgm = codeGgm;
public String getName() {
return name;
public void setName(String name) {
this.name = name;
public String getDesc() {
return description;
public void setDesc(String desc) {
this.description = desc;
public int getCreator() {
return creator;
public void setCreator(int creator) {
this.creator = creator;
public String getCreationDate() {
return creationDate;
public void setCreationDate(String creationDate) {
this.creationDate = creationDate;
public int getUsed() {
return used;
public void setUsed(int used){
this.used = used;
}And here is the Database table which stores the Patents:
DESC PATENT:
CODE_GGM NUMBER(3)
NAME VARCHAR2(15)
DESCRIPTION VARCHAR2(250)
CREATOR NUMBER(10)
CREATION_DATE DATE
USED NUMBER(1)
So, we then travel into the code of the PatentDAO to see how the DAO object executes the DB query to get all of the Data we need for the select list:
package kms.domain;
import javax.naming.*;
import javax.sql.*;
import java.util.*;
import java.sql.*;
import kms.util.*;
* This Data Access Object performs database operations on Patent objects.
class PatentDAO {
* This constructor creates a Patent DAO object.
* Keep this package-private, so no other classes have access
PatentDAO() {
* This method returns a Map of all the Dept names
* The key is the Dept id
Map retrieveAll()
throws ObjectNotFoundException {
Connection connection = null;
ResultSet results = null;
// Create the query statement
PreparedStatement query_stmt = null;
try {
// Get a database connection
Context initContext = new InitialContext();
DataSource ds = (DataSource)initContext.lookup("java:/comp/env/jdbc/keymanOracle");
connection = ds.getConnection();
// Create SQL SELECT statement
query_stmt = connection.prepareStatement(RETRIEVE_ALL_NAMES);
results = query_stmt.executeQuery();
int num_of_rows = 0;
Map patents = new TreeMap();
// Iterator over the query results
while ( results.next() ) {
patents.put(new Integer(results.getInt("code_ggm")), results.getString("name"));
if ( patents != null ) {
return patents;
} else {
throw new ObjectNotFoundException("patent");
// Handle any SQL errors
} catch (SQLException se) {
se.printStackTrace();
throw new RuntimeException("A database error occured. " + se.getMessage());
} catch (NamingException se) {
throw new RuntimeException("A JNDI error occured. " + se.getMessage());
// Clean up JDBC resources
} finally {
if ( results != null ) {
try { results.close(); }
catch (SQLException se) { se.printStackTrace(System.err); }
if ( query_stmt != null ) {
try { query_stmt.close(); }
catch (SQLException se) { se.printStackTrace(System.err); }
if ( connection != null ) {
try { connection.close(); }
catch (Exception e) { e.printStackTrace(System.err); }
private static final String RETRIEVE_ALL_NAMES
= "SELECT code_ggm, name FROM patent ";
}Now when you wish to use the 'combo box' (also called select lists), you insert this code into your jsp:
<TR>
<%@ include file="../incl/patent.jsp" %>
</TR>
depending on how your files on your server are organized, the "../incl/patent.jsp"
tells the container to look up one directory from where the main jsp is to find the 'patent.jsp' file in the 'incl' directory.
I need some help creating multi-level select lists with JavaScript:
Can anyone explain this code:
<%@ page import="java.util.*,kms.domain.*" %>
<jsp:useBean id="campuses" scope="application" class="java.util.Map" />
<TR><TD ALIGN='right'>Campus: </TD>
<TD>
<select name="campus" size="1" onChange="redirect(this.options.selectedIndex)">
<option value="0" selected>No Campus</option>
<% LocationService ls = new LocationService();
Iterator c = campuses.keySet().iterator();
Map[] bm = new Map[campuses.size()];
Map[][] fm = new Map[campuses.size()][0];
Map[][][] lm = new Map[campuses.size()][0][0];
int i2 = 0;
int j2 = 0;
int k2 = 0;
int jj = 0;
int kk = 0;
while (c.hasNext()) {
Integer i = (Integer)c.next();
out.print("<OPTION ");
out.print("VALUE='" + i.intValue()+ "'>");
out.print( (String) campuses.get(i) );
out.print("</OPTION>");
bm[i2] = ls.getBuildingsByCampus(i.intValue());
fm[i2] = new Map[bm[i2].size()];
lm[i2] = new Map[bm[i2].size()][];
Iterator b = bm[i2].keySet().iterator();
j2 = 0;
while (b.hasNext()) {
Integer j = (Integer)b.next();
fm[i2][j2] = ls.getFloorsByBuilding(j.intValue());
lm[i2][j2] = new Map[fm[i2][j2].size()];
Iterator f = fm[i2][j2].keySet().iterator();
k2 = 0;
while (f.hasNext()) {
Integer k = (Integer)f.next();
lm[i2][j2][k2] = ls.getLocationsByFloor(k.intValue());
k2++;
kk++;
j2++;
jj++;
i2++;
} %>
</select></TD>
</TR>
<TR><TD ALIGN='right'>Building: </TD>
<TD>
<select name="building" size="1" onChange="redirect1(this.options.selectedIndex)">
<option value="0" selected>No Building</option>
</select></TD>
</TR>
<TR><TD ALIGN='right'>Floor: </TD>
<TD>
<select name="floor" size="1" onChange="redirect2(this.options.selectedIndex)">
<option value="0" selected>No Floor</option>
</select></TD>
</TR>
<TR><TD ALIGN='right'>Room: </TD>
<TD>
<select name="location_id" size="1">
<option value="0" selected>No Room</option>
</select></TD>
</TR>
<script>
var cNum = <%=i2%>
var bNum = <%=jj%>
var fNum = <%=kk%>
var cc = 0
var bb = 0
var ff = 0
var temp=document.isc.building
function redirect(x){
cc = x
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
temp.options[0]=new Option("No Building", "0")
if (cc!=0) {
for (i=1;i<=group[cc-1].length;i++){
temp.options=new Option(group[cc-1][i-1].text,group[cc-1][i-1].value)
temp.options[0].selected=true
redirect1(0)
var group=new Array(cNum)
for (i=0; i<cNum; i++) {
group[i]=new Array()
<% for (int i=0; i< bm.length; i++) {
Iterator bldgs = bm[i].keySet().iterator();
int j = 0;
while (bldgs.hasNext()) {
Integer intJ =(Integer) bldgs.next(); %>
group[<%=i%>][<%=j%>] = new Option("<%=bm[i].get(intJ)%>", "<%=intJ%>");
<% j++;
} %>
var group2=new Array(cNum)
for (i=0; i<cNum; i++) {
group2[i] = new Array()
for (j=0; j<=bNum; j++) {
group2[i][j] = new Array()
<% for (int i=0; i< fm.length; i++) {
for (int j=0; j< fm[i].length; j++) {
Iterator flrs = fm[i][j].keySet().iterator();
int k = 0;
while (flrs.hasNext()) {
Integer intK =(Integer) flrs.next(); %>
group2[<%=i%>][<%=j%>][<%=k%>] = new Option("<%=fm[i][j].get(intK)%>", "<%=intK%>");
<% k++;
} %>
var temp1=document.isc.floor
var camp=document.isc.campus.options.selectedIndex
function redirect1(x){
bb = x
for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
temp1.options[0]=new Option("No Floor", "0")
if (cc!=0 && bb!=0) {
for (i=1;i<=group2[cc-1][bb-1].length;i++){
temp1.options[i]=new Option(group2[cc-1][bb-1][i-1].text,group2[cc-1][bb-1][i-1].value)
temp1.options[0].selected=true
redirect2(0)
var group3=new Array(cNum)
for (i=0; i<cNum; i++) {
group3[i] = new Array()
for (j=0; j<=bNum; j++) {
group3[i][j] = new Array()
for (k=0; k<=fNum; k++) {
group3[i][j][k] = new Array()
<% for (int i=0; i< lm.length; i++) {
for (int j=0; j< lm[i].length; j++) {
for (int k=0; k< lm[i][j].length; k++) {
Iterator locs = lm[i][j][k].keySet().iterator();
int m = 0;
while (locs.hasNext()) {
Integer intM =(Integer) locs.next(); %>
group3[<%=i%>][<%=j%>][<%=k%>][<%=m%>] = new Option("<%=lm[i][j][k].get(intM)%>", "<%=intM%>");
<% m++;
} %>
var temp2=document.isc.location_id
function redirect2(x){
ff = x
for (m=temp2.options.length-1;m>0;m--)
temp2.options[m]=null
temp2.options[0]=new Option("No Room", "0")
if (cc!=0 && bb!=0 && ff!=0) {
for (i=1;i<=group3[cc-1][bb-1][ff-1].length;i++){
temp2.options[i]=new Option(group3[cc-1][bb-1][ff-1][i-1].text,group3[cc-1][bb-1][ff-1][i-1].value)
temp2.options[0].selected=true
</script>
This produces a related select list with 4 related lists by outputting JavaScript to the page being served. It works the same way as the first example that I describe but I don't understand the looping...maybe someone could explain how to go from the single select list to a double and/or triple level drill down? -
How to use one Combo Box to control Two spreadsheet/charts in Web Analysis
In Web Analysis panel, I have one data grid and one chart (two different data sources). I would like to have one combo box, e.g. Q1, Q2, Q3, Q4, in the selection (drop-down). When I select Q1, I would like to show Jan, Feb, Mar, Q1 ( ICHILDREN(Q1)) in my chart, and also only Q1 in my data grid.
Any suggestions?
ThanksI believe you can do this. For example you want to have a Chart and Graph linked to a drop down for products. When you select a product, the two POV's will change on the reports.
Look at Panels in WA. I create a report with three panels. Make the first panel top aligned, the second top aligned and the third stretched. This should make the report "stretchy". Then add your dropdown to one panel and your reports to the other two panels.
Finally link the reports to dropdown using the re-linking technique mentioned in the previous post.
Hope this helps.
Brian Chow -
How to modify a combo box for touch panel operation?
Hi,
I'm developping a touch panel controled application.
The first step of the application is user log-in. My application has a small database of names that the user can access via the drop down menu of a combo box.
My problem is that the arrows and the slider of the vertical scroll bar are way too small to be fingers-operated:
Is there a way to modify the size of this scrollbar so that it's not too small for the operators' fingers?
Best regards,
peperHello peper,
As far as I know this is not directly possible (a least not with the control editor).
If you want to, you could also create your own "adapted" control yourself through an XControl.
This one can then (for example) combine a name input, a button and a listbox (with a big vertical scrollbar).
Or is this too far fetched?
Kind Regards,
Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
CLD, CTA
If someone helped you, let them know. Mark as solved and/or give a kudo. -
How the condition of combo box of matrix can be passed in query
Hi,
I want to get the parameter code and description for a particular category. Category code is in the matrix combo box if i pass tat field in a where condition i cant retrieve the parameter code but its working in the database. Please identify the mistake and correct it.
Private Sub Addcomboparam(ByVal oCombo As SAPbouiCOM.Column)
Try
Dim RS As SAPbobsCOM.Recordset
'Dim Bob As SAPbobsCOM.SBObob
RS = Ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
'Bob = Ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge)
RS.DoQuery("select Code,U_paradesc from [@PSSIT_QCPARAMETER] where U_catcode='" & txtcatcode.Selected.Value.ToString() & "'")
RS.MoveFirst()
While RS.EoF = False
oCombo.ValidValues.Add(RS.Fields.Item("Code").Value, RS.Fields.Item("U_paradesc").Value)
RS.MoveNext()
End While
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Regards,
MadhaviI think that the problem is, that you accesed
txtcatcode.Selected.Value.ToString
but txtcatcode isnt declared.
try to do it as
dim x as string
x = txtcatcode.Selected.Value.ToString
and to seccond line add watch and breakpoint.
what you have in x variable? Or use try catch statement for receive error.
Petr -
How to populate second combo box on the basis of first combo
Hi All,
Please help me on populating the second combo on the basis of the selected value from first combo.
The values will come from database.
I am using struts and jsp in JBOSS
Regards,
DineshHere's a snippet from one of my jsp's:
TestDel del = new TestDel();
String groups = del.getTestGroupsAsHTMLSelect(
model.getSponsorId(),
"groupCode", //field name
null != values ? (String)values.get("groupCode") : "", // selected
"findTestTypes"); // on change
String tests = del.getTestsAsHTMLSelect(
null != values ? (String)values.get("groupCode") : "",
"test_code",
null != values ? (String)values.get("test_code") :"",
"findSchoolType");It basically returns a select box with the on change attribute set to do what your other reply was talking about. Using AJAX to retrieve the data and then pop it into the page...
I did find that that with mozilla there was some refreshing issue so here's some javascript help:
function findTestTypes(grp){
var url = "/tests/lookup?cmd=test&gc="+grp.value;
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
req.open("GET", url, true);
req.onreadystatechange = showTestTypes;
req.send(null);
function showTestTypes(){
if (req.readyState == 4 && req.status == 200) {
var html = req.responseText;
var tt = getItem("tests");
tt.innerHTML = html;
fireChangeEvent("test_code");
// for mozilla
function fireChangeEvent(fieldName){
if (window.ActiveXObject) {
getItem(fieldName).fireEvent('onchange');
}else{
// target is some DOM node on which you wish to fire an event.
var target = getItem(fieldName);
var oEvent = document.createEvent( "Events" );
oEvent.initEvent(
"change", // the type of mouse event
true, // do you want the event to
// bubble up through the tree? (sure)
true, // can the default action for this
// event, on this element, be cancelled? (yep)
window, // the 'AbstractView' for this event,
// which I took to mean the thing sourcing
// the mouse input. Either way, this is
// the only value I passed that would work
1, // details -- for 'click' type events, this
// contains the number of clicks. (single click here)
1, // screenXArg - I just stuck 1 in cos I
// really didn't care
1, // screenYArg - ditto
1, // clientXArg - ditto
1, // clientYArg - ditto
false, // is ctrl key depressed?
false, // is alt key depressed?
false, // is shift key depressed?
false, // is meta key depressed?
0, // which button is involved?
// I believe that 0 = left, 1 = right,
// 2 = middle
target // the originator of the event
// if you wanted to simulate a child
// element firing the event you'd put
// its handle here, and call this method
// on the parent catcher. In this case,
// they are one and the same.
target.dispatchEvent( oEvent );
} -
How to make a combo box in muse?
if the you want to make a button with selections to choose from? Is there a widget for it? exactly like the image given.
Hi,
There is no native feature in Muse to do so. If you can get the code for this box, you can add it to your Muse site using Insert HTML feature.
Regards,
Aish -
How to fill combo box with list of all SQL server
Ok, I know how to find all SQL servers that I need, I have code for that task, and I have Array of all servers.
My problem is ...
I made setup project and do a huge work, and in the end this task appear!
I used ORCA tool to change TextBox (A) template in visual studio (2008 by the way), and I transform first TextBox to ComboBox.
Now, the little part that I'am missing is how to fill this combo box with a result of my function for listin SQL servers?
Can I somehow send combobox object to myMethod:
private void FillCombo(ComboBox cmb)
// do the job
or
instanceOfThisCombo.Items.Add(listOfSQLServers);
please help me to solve this... thanksc#Hi Valerij,
The ComboBox control in an MSI dialog uses the ComboBox table to populate the items in it. To get what you want, you need to update the ComboBox table in the MSI package with your application and run the MSI package. The following KB article describes how to dynamically populate a ListBox control in Windows Installer:
http://support.microsoft.com/kb/291329
This method introduced in the above KB article also applies to populating a ComboBox control in Windows Installer.
I don't think it's possible to run the application as a Custom Action from within the MSI package because the application will modify the content of the MSI package which is currently running. So you need to launch the MSI package from within your application after updating the ComboBox table. In short, when installing, just run your application which updates the ComboBox table and install the MSI package.
Hope this helps.
If you have any question, please feel free to let me know.
Sincerely,
Linda Liu -
Problem with combo box in a Matrix column
hi every one, i have a user form with a matrix(uid = 37) with some columns and one column is combo box. in that combo box i have to get values from OSTC table (Code)...i have written this code ..i dont know how to access the combo box so that i can get values to combo box when i execute the prg....
oitem = oForm.Items.Item("37") 37 is uid of omatrix2
oMatrix2 = oitem.Specific
oColumns = oMatrix2.Columns
oForm.DataSources.UserDataSources.Add("CSR1", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
oColumn = oColumns.Item("V_6") ''for accessing the combo box item [V_6 is col uid ]
oCombo = oColumn.Cells.Item(omatrix2.row).Specific ''''''''problem line
oCombo.DataBind.SetBound(True, "", "CSR1")
rset = oDICompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
query = "select Code from OSTC"
rset.DoQuery(query)
Dim tc As String
rset.MoveFirst()
For row = 0 To rset.RecordCount - 1
tc = rset.Fields.Item("Code").Value
oCombo.ValidValues.Add(tc, row)
rset.MoveNext()
Next
oMatrix2.Columns.Item("V_6").DataBind.SetBound(True, "@SALE_CHILD", "U_Tax")Call objMain.objUtilities.LoadComboValuesForMatrix(FormUID, "27", "SELECT Code,Name FROM OSTC Order by Code", "V_19", objMatrix.RowCount)
Public Sub LoadComboValuesForMatrix(ByVal FormUID As String, ByVal ItemUID As String, ByVal strQuery As String, ByVal MtrxColId As String, ByVal Rowcount As Integer)
Dim inti As Integer
objRecSet = objMain.objUtilities.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
Try
Dim objmatrix As SAPbouiCOM.Matrix
Dim objCombo As SAPbouiCOM.ComboBox
objForm = objMain.objApplication.Forms.Item(FormUID)
objItem = objForm.Items.Item(ItemUID)
objmatrix = objItem.Specific
objCombo = objmatrix.Columns.Item(MtrxColId).Cells.Item(Rowcount).Specific
objItem.DisplayDesc = True
objRecSet.DoQuery(strQuery)
If objRecSet.RecordCount > 0 Then
If (objCombo.ValidValues.Count > 0) Then
For inti = 0 To objRecSet.RecordCount - 1
objRecSet.MoveNext()
Next
End If
If (objCombo.ValidValues.Count <= 0) Then
objCombo.ValidValues.Add("", "")
For inti = 0 To objRecSet.RecordCount - 1
objCombo.ValidValues.Add(Convert.ToString(objRecSet.Fields.Item(0).Value), Convert.ToString(objRecSet.Fields.Item(1).Value))
objRecSet.MoveNext()
Next
End If
End If
Catch ex As Exception
Throw ex
Finally
System.Runtime.InteropServices.Marshal.ReleaseComObject(objRecSet)
GC.WaitForPendingFinalizers()
GC.Collect()
End Try
End Sub -
Hi all,
How to add a combo box in a grid (2005 B)
Regards,
Aravindhan.RHi,
Have a look at the SBO FAQ wiki:
https://wiki.sdn.sap.com/wiki/display/HOME/BusinessOneFAQ#BusinessOneFAQ-UIItems
Regards,
Ibai Peñ
Maybe you are looking for
-
It has been frozen for two hours. Can not shut it off, or something else.
-
Newbie to Mac - help with root account?
I recently bought a used Macbook Pro from someone which is running the latest OS 10.6.2. This is my first Mac (I'm a former Windows guy), and didn't think to check if they set a root password. There was not a password on the admin account. When I typ
-
Export With Same Pixel Size Not Possible?
I'm exporting two photos from Aperture to another program for the purpose of creating one panoramic picture. However, the other program (PFactory) only allows the stitching of photos with the exact same pixels and no matter how I try to export both p
-
V2V a VMware VM with more than 3 harddisks
I'm V2V'ing a VM from VMware which has got 5 hard disks, all of them below 50 GB. The V2V process completes without errors, all disks are created as VHDs, but since all disks are created as IDE disks, I can only see the first 3 in Hardware Conf. The
-
Hi All, I am calling a RFC Function Module which gives me a table entries. When the FM is run in R/3 i m getting all table entries,but when i call the FM from Portal I am able to get only first line of the table. Can someone tell me w