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

new row

3 Answers 127 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mihai Velicu
Top achievements
Rank 1
Mihai Velicu asked on 01 Apr 2010, 11:22 PM
Hi !
I have a grid with first 2 columns read only and more other ReadWrite.


When I "Click here to add new row " and I click somewhere on the direction of these 2 columns Readonly, the DefaultValueNeeded event is not triggered .If I click on the direction where I have read write columns , this DefaultValueNeeded event is triggered.

Is this behavior normal ?

Regards,
Mihai

3 Answers, 1 is accepted

Sort by
0
Accepted
Julian Benkov
Telerik team
answered on 07 Apr 2010, 02:54 PM
Hello Mihai Velicu,

Yes, this is normal, because the new row is created when one or more of editors in the new row are open for the first time. The ReadOnly column cannot open an editor and cannot create the new row.
 

Best wishes,
Julian Benkov
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.
0
Ellis
Top achievements
Rank 2
answered on 14 Jun 2010, 12:01 PM
Hi,
 probably someoneelse already ask it but i didn't find the right post.

In my grid the first column is a commandcolumn. I use it for open a modal form, to chose the Article from the Warehouse.
When i choose it, i update some columns, like price, max quantity, idarticle, etc
But if i try to insert a new row in this way, i got an error.
In your post you say "the new row is created when one or more of editors in the new row are open for the first time".
I can't do this, because the first operation is to chose the Article.
How can i solve this problem? There is a way to fire the command it creates the row?

 
    Private Sub RadGridView1_CommandCellClick(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles RadGridView1.CommandCellClick 
' I chose the article from warehouse 
'... 
' Then i set data in row from selected article 
                RadGridView1.CurrentRow.Cells("IdArticle").Value = IdArticle 
                RadGridView1.CurrentRow.Cells("Quantity").Value = Quantity 
                RadGridView1.CurrentRow.Cells("Price").Value = Price 
                RadGridView1.CurrentRow.Cells("DataMovimento").Value = Date.Today 
        End If 
    End Sub 

Thank you

Ellis
0
Nikolay
Telerik team
answered on 21 Jun 2010, 09:48 AM
Hi Ellis,

Please find the answer to your question in the following forum thread:
http://www.telerik.com/community/forums/winforms/gridview/create-new-row-on-commandcolumn-click.aspx

All the best,
Nikolay
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
Mihai Velicu
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Ellis
Top achievements
Rank 2
Nikolay
Telerik team
Share this question
or