This is a migrated thread and some comments may be shown as answers.

[Solved] Gridview & RadNumericUpDown Editor problem

3 Answers 154 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sampathkumar
Top achievements
Rank 1
Sampathkumar asked on 01 Feb 2010, 02:02 PM
Hi

I had created a custom editor using RadNumericUpDown control.

When I type value in editor mode of the cell, the value is not binding to the source. Moreover, value is not display in Cell, when use change the cell or leaving the editor mode.

My code is as followings.

 

public class RsGridViewColumn : GridViewBoundColumnBase

{

    private FrameworkElement CreateEditor(object dataItem)

     {

        if ((base.DataMemberBinding != null) && (base.DataMemberBinding.Path != null))

        {

            Binding valueBinding = base.DataMemberBinding;

            RadNumericUpDown numericbox = new RadNumericUpDown();

            numericbox.ShowButtons = false;

            numericbox.ValueFormat = ValueFormat.Numeric;

            numericbox.NullValue = string.Empty;

            numericbox.Maximum = double.MaxValue;

            numericbox.Minimum = double.MinValue;

            if (this.ColumnDataType == Ramco.Controls.DataType.Int)

            {

                numericbox.IsInteger = true;

                numericbox.NumberFormatInfo.NumberDecimalDigits = 0;

            }

            else

            {

                numericbox.IsInteger = false;

                numericbox.NumberFormatInfo.NumberDecimalDigits = this.DecimalLength;

            }

            base.BindingTarget = RadNumericUpDown.ValueProperty;

            if (valueBinding.Converter == null)

            {

                valueBinding.Converter = new RsDSConvert();

                valueBinding.ConverterParameter = this.UniqueName;

            }

            numericbox.SetBinding(RadNumericUpDown.ValueProperty, valueBinding);

            numericbox.Tag = (dataItem as RsDSItem).GetData("rn");

            numericbox.Loaded += numericbox_Loaded;

            numericbox.KeyDown += Column_KeyDown;

            return numericbox;

         }

        return null;

    }

}

please help us to solve this issue.

thanks
Sampathkumar S

3 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 04 Feb 2010, 01:08 PM
Hello Sampathkumar,

Probably the code snippet which you sent is not complete. Please take a look at this blog post which demonstrates how to create custom column. If this does not help please send me the entire code of your custom column (RsGridViewColumn.cs).

All the best,
Nedyalko Nikolov
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
m
Top achievements
Rank 1
answered on 27 Jun 2011, 07:11 AM
HI,

I upgraded my reference to q3 2010 and dataGrid with numericUpDown cruch.
I think that i  have the same problem the binding ( with the same code). the attach linq show me

Oops...

It seems there was a problem with our server.

Try reloading the page.



what is the answer?

thanks
0
Nedyalko Nikolov
Telerik team
answered on 27 Jun 2011, 04:03 PM
Hello m,

Sorry for the inconvenience caused.
You can find the referenced blog post here.

Regards,
Nedyalko Nikolov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Sampathkumar
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
m
Top achievements
Rank 1
Share this question
or