This is a migrated thread and some comments may be shown as answers.
new line on enter in datagridview with C#
1 Answer 24 Views
This is a migrated thread and some comments may be shown as answers.
Johirul
Top achievements
Rank 1
Johirul asked on 10 Apr 2018, 05:11 AM

Dear Concerns

  Please help for a issue of datagridview in c#. I want create new line by enter key in datagridview instead of else. I have seen several  of your solution and trying to correct. Problem is that datagridviewTextboxColumn do no accept AcceptReturn method. Please give a solution. I am sending the snapshot of my code. please see the attachment.  

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 10 Apr 2018, 10:24 AM
Hello Johirul,

This is the Telerik forum and we do not support the Microsoft grid. This is possible with our grid and we have such property:
foreach (GridViewDataColumn item in radGridView1.Columns)
{
    if (item is GridViewTextBoxColumn)
    {
        ((GridViewTextBoxColumn)item).AcceptsReturn = true;
        ((GridViewTextBoxColumn)item).Multiline = true;
    }
}

I hope this will be useful. 

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Johirul
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or