Advertisement

08.28.2008 at 04:47PM PDT, ID: 23687536
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.2

How to use WebCurrencyEdit in a WebGrid?

Asked by marine007 in Programming for ASP.NET, C# Programming Language, WebApplications

Tags: ,

How do I use the WebCurrencyEdit control in a WebGrid??

I am following the documentation exactly(Please look at code snippet) but when I try to build this, it gives me a "Null Reference Exception" at the last line.

May be I am exhausted so cant think right. It must be simple. Please help

Below is what I got from documentation:
You can use a custom editor control as an editor in the WebGrid". In order to serve as a custom editor control, the control you use must implement the IProvidesEmbeddableEditor interface.

Follow These Steps:
Add a WebGrid to a web form (if it does not already exist) and set up any data binding and column structure for the grid.
Allow users to edit the grid data by setting the AllowUpdateDefault property to true for the control. You can optionally leave the control as read-only and set just the column(s) that will contain the custom control(s) to be editable.
Place the control that will serve as the custom editor onto the web form at design-time, or create it through code in the code-behind for the web form. You must use a control that is capable of being used as a custom editor (implements the IProvidesEmbeddableEditor interface.)
Change the Type property of the column that will contain the custom editor to "Custom".
Set the EditorControlID property of the column to the ID of the custom editor control. If you have placed the custom editor control on the web form at design-time, you can select the name of the control from the dropdown that appears when editing the EditorControlID property in the Visual Studio property sheet. This dropdown shows all controls on the web form capable of being used as custom editors.
Start Free Trial
1:
2:
3:
4:
Infragistics.WebUI.WebDataInput.WebCurrencyEdit ctrlCurrEdit = new Infragistics.WebUI.WebDataInput.WebCurrencyEdit();
ctrlCurrEdit.ID = "ctrlCE";
myGrid.Columns[1].Type = ColumnType.Custom;
myGrid.Columns[1].EditorControlID =  "ctrlCE";
[+][-]08.29.2008 at 06:07AM PDT, ID: 22344942

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Programming for ASP.NET, C# Programming Language, WebApplications
Tags: C# Infragistics, IE7
Sign Up Now!
Solution Provided By: codeclay
Participating Experts: 1
Solution Grade: C
 
 
[+][-]08.31.2008 at 07:27PM PDT, ID: 22357186

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628