Hi!
Which action can I check after the users clicked on: " * Click here to add new row " and filled the collums, please?
The first collum is readonly because its a ID, but the others must be filled to execute the action.
I can't find the solution.
Thank you!
5 Answers, 1 is accepted
Thank you for writing.
It is suitable to use the UserAddingRow event which allows you to validate the entered data and cancel the new row if data is not valid. Please refer to the following help article which is quite useful on this topic: http://www.telerik.com/help/winforms/gridview-rows-new-row.html
Regards,
Dess
Telerik
Hello Dess.
Thank you for your help.
I tryied the code on the example, but it doesn't worked:
private void lvClientes_UserAddingRow(object sender, GridViewRowCancelEventArgs e)
{
if (e.Rows[0].Cells["Nome"].Value != null && e.Rows[0].Cells["Idade"].Value != null &&
e.Rows[0].Cells["Email"].Value != null)
{
MessageBox.Show("ok!");
}
else
{
e.Cancel = true;
}
}
For unknow reason the paramer GridViewRowCancelEventArgs isn't working, its red.
What i did worng, please?
Thank you!
Thank you for writing back.
Could you please specify which is the exact version of the Telerik UI for WinForms suite that you are currently using?
I am looking forward to your reply.
Regards,
Dess
Telerik
Hi Dess,
Thank you!
I'm using VS 2013 and Telerik version: 2010.1.10.308
Thank you for writing.
The UserAddingRow event is not available for the version that you are using. I would recommend you to upgrade to at least Q2 2010 (version 2010.2.10.713) in order to benefit from the introduced functionality.
I hope this information helps. Should you have further questions I would be glad to help.
Dess
Telerik