Solved

WebCombo

Posted on 2004-04-28
10
1,506 Views
Last Modified: 2007-12-19
How do I populate a webcombo component of infragistics programmatically in my aspx webpage. I am using .NET



Moiz
0
Comment
Question by:Moizsaif123
  • 7
  • 3
10 Comments
 
LVL 15

Accepted Solution

by:
liebrand earned 150 total points
Comment Utility
Keep in mind the the drop down is pretty much an UltraWebGrid, so here is how you would add values to it via code:

        Dim row As Infragistics.WebUI.UltraWebGrid.UltraGridRow
        For i As Integer = 0 To 10
            row = New Infragistics.WebUI.UltraWebGrid.UltraGridRow(New String() {String.Format("MyCell{0}", i)})
            Me.WebCombo1.Rows.Add(row)
        Next
0
 
LVL 4

Author Comment

by:Moizsaif123
Comment Utility
cool.....One question though, how yu get the MyCell{0} to increment to MyCell{1}, MyCell{2}.....,  thanks again
0
 
LVL 15

Expert Comment

by:liebrand
Comment Utility
String.Format("MyCell{0}", i)

String.Format allows you to pass in multiple parameters that will be substituted in the string, so I passed in "i" which is from the loop.

Here is another example of String.Format:

string.format("Hello {0}, the date today is {1}. {0}, how may I assist you today?", "MyUsername", Date.Now())

the output would be:

"Hello MyUsername, the date today is 4/28/2004. MyUsername, how may I assist you today?"
0
 
LVL 4

Author Comment

by:Moizsaif123
Comment Utility
How do I set the Autopostback=true for the dropdownlistbox?



Moiz
0
 
LVL 4

Author Comment

by:Moizsaif123
Comment Utility
sorry not dropdownlistbox, I meant the webcombo from the infragistics component...





Moiz
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 4

Author Comment

by:Moizsaif123
Comment Utility
sorry again, Im thinking in terms of the old components of .NET. I double clicked and it went to the SelectedRowChanged event, thanks again



Moiz
0
 
LVL 4

Author Comment

by:Moizsaif123
Comment Utility
hey liebrand, i want to use this logic and apply it to columns so instead of rows i want to add columns with increment of the i value. let me know if this is possible


Dim row As Infragistics.WebUI.UltraWebGrid.UltraGridRow
        For i As Integer = 0 To 10
        row = New Infragistics.WebUI.UltraWebGrid.UltraGridRow(New String() {String.Format("MyCell{0}", i)})
        Me.WebCombo1.Rows.Add(row)
Next


Moiz
0
 
LVL 4

Author Comment

by:Moizsaif123
Comment Utility
sorry not to be too specific, I am talking about the ultrawebgrid not the webcombo.....




Moiz
0
 
LVL 15

Expert Comment

by:liebrand
Comment Utility
Open a new question...
0
 
LVL 4

Author Comment

by:Moizsaif123
Comment Utility
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

6 Experts available now in Live!

Get 1:1 Help Now