Hi,
Using the RadGrid in Batch Editing mode and the EditType is set to row. The following (miss-) behaviour may also be reproduced on the demo page (http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx):
- change some values in an existing row
- click on "Add new record" to insert a new row
- click on "Delete" on the newly inserted row (without inserting any data)
- now try to save the changes => the "Save changes" button doesn't work anymore
May be it has something to do with the combo box in the grid. In another grid without a combobox I have a slightly different behaviour. The "Save changes" is working but it also tries to save the deleted (empty) row.
I also tried to save from the client side with javascript. In the first scenario the hasChanges() function gets an error:
var hasChanges = grid.get_batchEditingManager().hasChanges(grid.get_masterTableView());
Regards
Roni
5 Answers, 1 is accepted
0
Hi Roni,
I tried replicating the problem in the online demo following the listed steps but was unable to do so as you can see from this video. Am I missing something? Can you please send us a video that illustrates the issue?
Regards,
Angel Petrov
Telerik
I tried replicating the problem in the online demo following the listed steps but was unable to do so as you can see from this video. Am I missing something? Can you please send us a video that illustrates the issue?
Regards,
Angel Petrov
Telerik
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 Feedback Portal
and vote to affect the priority of the items
0
Roni
Top achievements
Rank 1
answered on 29 May 2015, 06:09 AM
Hi Angel,
Thanks for your answer. I think you didn't reproduce the steps exactly:
- change Edit Type of the grid to "Row"
- change some values in an existing row
- click on "Add new record" to insert a new row and don't insert any values in the new row
- click on "Delete" on the newly inserted row (without inserting any data)
- now try to save the changes => the "Save changes" button doesn't work anymore
Please try it once again.
Regards,
Roni
0
Hello Roni,
I have tested the described scenario with our latest version and everything seems to work as expected. Following is the example that I have tested:
And the code-behind:
If you are using older versions of the controls, please upgrade to our latest version and see if the issue will be resolved on your side too.
Regards,
Konstantin Dikov
Telerik
I have tested the described scenario with our latest version and everything seems to work as expected. Following is the example that I have tested:
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
OnNeedDataSource
=
"RadGrid1_NeedDataSource"
OnBatchEditCommand
=
"RadGrid1_BatchEditCommand"
>
<
MasterTableView
EditMode
=
"Batch"
CommandItemDisplay
=
"Top"
>
<
BatchEditingSettings
EditType
=
"Row"
/>
<
Columns
>
<
telerik:GridClientDeleteColumn
></
telerik:GridClientDeleteColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
And the code-behind:
protected
void
RadGrid1_NeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
DataTable table =
new
DataTable();
table.Columns.Add(
"ID"
,
typeof
(
int
));
table.Columns.Add(
"FirstName"
,
typeof
(
string
));
table.Columns.Add(
"LastName"
,
typeof
(
string
));
table.Columns.Add(
"Age"
,
typeof
(
int
));
table.Columns.Add(
"Date"
,
typeof
(DateTime));
table.Columns.Add(
"BoolValue"
,
typeof
(Boolean));
for
(
int
i = 0; i < 5; i++)
{
table.Rows.Add(i,
"FirstName"
,
"LastName"
, 20, DateTime.Now.AddDays(i), i % 2 == 0);
}
(sender
as
RadGrid).DataSource = table;
}
protected
void
RadGrid1_BatchEditCommand(
object
sender, GridBatchEditingEventArgs e)
{
}
If you are using older versions of the controls, please upgrade to our latest version and see if the issue will be resolved on your side too.
Regards,
Konstantin Dikov
Telerik
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 Feedback Portal
and vote to affect the priority of the items
0
0
Hello Roni,
I have missed the part where you are referring to our online demo in your initial post. Now, after testing the exact steps from your description I was able to replicate the problem. However, the behavior is due to the RequiredFieldValidator controls in the new row and the fact that although that you are deleting the row, since there is only one editor generated for the entire column, that editor will still exist on the page and when there is a validator with failed validation, no postback will occur.
Currently I am not able to confirm if this is a bug or a limitation, but I will forward the scenario to our developers team, so the could further investigate it.
For bringing the issue to our attention you will find your Telerik Points updated.
Please excuse us for any inconvenience caused by this.
Regards,
Konstantin Dikov
Telerik
I have missed the part where you are referring to our online demo in your initial post. Now, after testing the exact steps from your description I was able to replicate the problem. However, the behavior is due to the RequiredFieldValidator controls in the new row and the fact that although that you are deleting the row, since there is only one editor generated for the entire column, that editor will still exist on the page and when there is a validator with failed validation, no postback will occur.
Currently I am not able to confirm if this is a bug or a limitation, but I will forward the scenario to our developers team, so the could further investigate it.
For bringing the issue to our attention you will find your Telerik Points updated.
Please excuse us for any inconvenience caused by this.
Regards,
Konstantin Dikov
Telerik
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 Feedback Portal
and vote to affect the priority of the items