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

Bug with spineditor in radGridView

7 Answers 56 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Shirya
Top achievements
Rank 1
Shirya asked on 21 Mar 2011, 07:50 PM
Hello,
I added a spinEditor in my grid view (with the event cellformatting)
The problem is that when i click on rows, all my spinEditors have a blue backcolor.
How can i arrange that?

Also, there is no dock property on a radsSpinEditorElement, how can i make my control take the all cell?
  • Thank you

See the attached file

Here is how i add my control:

 If TypeOf (e.CellElement.ColumnInfo) Is GridViewDataColumn Then
           
                    If Not (e.CellElement.Children.Count > 0) Then
                        Dim myNumericUpDown As New RadSpinElement                   
                        e.CellElement.Children.Add(myNumericUpDown)

                    End If

 End If

7 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 22 Mar 2011, 10:55 AM
Hello,

Adding a control to a cell shouldn't be done via the CellFormatting event. You can either specify a GridViewDecimalColumn that will give you a spin editor for editing the cell, or if you need multiple controls in a cell, then you can follow this KB Article which will guide you through creating a custom cell.

Hope that helps
Richard
0
Shirya
Top achievements
Rank 1
answered on 22 Mar 2011, 07:37 PM
thank you, this helps
0
Richard Slade
Top achievements
Rank 2
answered on 22 Mar 2011, 09:05 PM
No problem. Glad I could be of help
Richard
0
Shirya
Top achievements
Rank 1
answered on 24 Mar 2011, 01:12 PM
Hello again,
I would like to know if it is possible to always see the spinEditor even if we're not editing the cell?
Also, is there a way to put the spineditor dock = fill?
thank you
Audrey
0
Richard Slade
Top achievements
Rank 2
answered on 24 Mar 2011, 02:21 PM
Hello,

the editor element is used on when the cell is in edit mode and therefore you cannot see the RadSpinEditor (as it is created as required) until editing a cell.

I'm not sure what you mean by docking the RadSpinEditor as the editor will fill the cell width automatically.
Please let me know if you need further information
Richard
0
Shirya
Top achievements
Rank 1
answered on 24 Mar 2011, 02:51 PM
Hi Richard,
The only way I can make my spinEditor always visible in my grid is by adding it programmatically to my cellformatting event?
So how do i get rid of the blue backColor bug?


docking the RadSpinEditor :
I would like the editor to fill the width and the heigth of the cell. Right now, it only nfill the width



Do you have any idea han can i do all that?
Thank you
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 24 Mar 2011, 03:29 PM
Hello,

One should never add a control using the CellFormatting event. This is designed to be fired with a very high frequency and is designed for formatting the cell's colour, font etc..

You can use a custom editor to modify the spin editor (see this help topic)
The editor, and editor element don't have a dock property. They will however resize width to the current width of the cell.

Hope this helps
Richard
Tags
GridView
Asked by
Shirya
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Shirya
Top achievements
Rank 1
Share this question
or