After Telerik GridView Insert..

4 posts, 1 answers
  1. jung
    jung avatar
    6 posts
    Member since:
    Jul 2016

    Posted 19 Jul Link to this post

    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.

  2. jung
    jung avatar
    6 posts
    Member since:
    Jul 2016

    Posted 19 Jul in reply to jung Link to this post

    I read Notice after write.

    Programming Language : C#

    OS : Windows7 x86

    .NET4

    Telerik : R2 2016 SP1

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Answer
    Dess
    Admin
    Dess avatar
    1609 posts

    Posted 20 Jul Link to this post

    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.
  5. jung
    jung avatar
    6 posts
    Member since:
    Jul 2016

    Posted 20 Jul in reply to Dess Link to this post

    Thank you Dess!

    I solved the problem thanks to your answers.

Back to Top