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

After Telerik GridView Insert..

3 Answers 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
jung
Top achievements
Rank 1
jung asked on 20 Jul 2016, 01:40 AM

I want to insert column which index what i want.

so.. i Collocate control and I init first column and rows.

i success to insert column in runtime

but it is'nt editable..

I can edit when use Add(String) method ...

what is difference between?

I doubt columnItem's property.(Inheritanced GridViewDataColumn)

 - code

                        int index =radGridView1.SelectedCells[0].ColumnInfo.Index;

                         columnItem item=new columnItem();

                        radGridView1.Columns.Insert(index,item);

 

Please advise.

excute immature english.

3 Answers, 1 is accepted

Sort by
0
jung
Top achievements
Rank 1
answered on 20 Jul 2016, 02:21 AM

I read Notice after write.

Programming Language : C#

OS : Windows7 x86

.NET4

Telerik : R2 2016 SP1

0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 20 Jul 2016, 08:25 AM
Hello Jung,

Thank you for writing. 

GridViewDataColumn is the base column class and all grid column types inherit from it. In order to edit the cells belonging to this column, it is necessary to specify the editor type by overriding the GetDefaultEditorType method:
public class ColumnItem : GridViewDataColumn
{
    public override Type GetDefaultEditorType()
    {
        return typeof(RadTextBoxEditor);
    }
}

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
0
jung
Top achievements
Rank 1
answered on 20 Jul 2016, 08:58 AM

Thank you Dess!

I solved the problem thanks to your answers.

Tags
GridView
Asked by
jung
Top achievements
Rank 1
Answers by
jung
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or