Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

combobox problem

Posted on 2011-09-20
2
Medium Priority
?
231 Views
Last Modified: 2012-05-12
ddDate is a RadCombobox and that line starts with ddDate is giving error saying invalid argument about adding items to combobox..
 DateTime dateCounter = System.DateTime.Now;
            System.DateTime today = System.DateTime.Now;

            while (dateCounter >= today.AddDays(-30))
            {
                 
                ddDate.Items.Add(new ListItem(dateCounter.ToString("d"), dateCounter.ToString("d")));
                dateCounter = dateCounter.AddDays(-1);
            }  
0
Comment
Question by:1jaws
[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 Comments
 
LVL 22

Accepted Solution

by:
pivar earned 2000 total points
ID: 36569648
Hi,

I believe you should use RadComboBoxItem.

ddDate.Items.Add(new RadComboBoxItem(dateCounter.ToString("d"), dateCounter.ToString("d")));

/peter
0
 

Author Closing Comment

by:1jaws
ID: 36569691
perfect. thank you!!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

704 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