As i click on the Insert new Row, the Grid goes into databinding and i just want to disable the databinding to the Edit Template during insert new row, how is it possible ?
Secondly how is it possible that during edit mode it is able to recognize a dataitem to which the textbox is binded to and during add new row command it displays the error ‘Telerik.WebControls.GridInsertionObject does not contain a property’ ??
Secondly how is it possible that during edit mode it is able to recognize a dataitem to which the textbox is binded to and during add new row command it displays the error ‘Telerik.WebControls.GridInsertionObject does not contain a property’ ??
4 Answers, 1 is accepted
0
Jayesh Goyani
Top achievements
Rank 2
answered on 30 Jul 2012, 06:16 AM
Hello,
For First issue:
Thanks,
Jayesh Goyani
For First issue:
protected
void
RadGrid1_ItemCommand(
object
sender, GridCommandEventArgs e)
{
if
(e.CommandName == RadGrid.InitInsertCommandName)
{
e.Canceled =
true
;
}
}
Thanks,
Jayesh Goyani
0
Ankit
Top achievements
Rank 1
answered on 30 Jul 2012, 06:33 AM
@jayesh
What i want is that as i click the add new row button the page goes again into bind mode and all i want is to disable the databinding to the edit/Insert mode item template not canceling the insert item template loading as the above code would cancel the data binding as well the insert mode template loading..
What i want is that as i click the add new row button the page goes again into bind mode and all i want is to disable the databinding to the edit/Insert mode item template not canceling the insert item template loading as the above code would cancel the data binding as well the insert mode template loading..
0
Ankit
Top achievements
Rank 1
answered on 30 Jul 2012, 12:04 PM
@Admins
Does the creators also don't know anything about this...Totally weird..
Does the creators also don't know anything about this...Totally weird..
0
Hi Ankit,
I'm not completely sure what exactly your requirements are. However note that it is not possible to prevent only the insert form to be bind. You could clear it using the following:
Greetings,
Maria Ilieva
the Telerik team
I'm not completely sure what exactly your requirements are. However note that it is not possible to prevent only the insert form to be bind. You could clear it using the following:
Protected
Sub
RadGrid1_ItemCommand(sender
As
Object
, e
As
Telerik.Web.UI.GridCommandEventArgs)
If
e.CommandName = RadGrid.EditCommandName
Then
Me
.RadGrid1.MasterTableView.IsItemInserted =
False
ElseIf
e.CommandName = RadGrid.InitInsertCommandName
Then
Me
.RadGrid1.MasterTableView.ClearEditItems()
End
If
End
Sub
Greetings,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.