Hi Im trying to implement this demo. Does anybody knows an event or how to implement an event to fire when I click the "Save Changes" and the RadGrid ends all the Inserts/Updates? Is there any property that says how many pending changes are left or something? I need to do this to execute a final process in the database. Thanks.
Here is my code for the radgrid
One last thing, how can I do to make the RequiredFieldValidator for the RadTextBox "RT_nombre" activates only for new records when I clic "Save Changes" if I am not editing the cell.
Here is my code for the radgrid
<
telerik:RadGrid
ID
=
"RG_CorreosExtra"
runat
=
"server"
AutoGenerateColumns
=
"False"
AllowSorting
=
"true"
AllowPaging
=
"True"
PageSize
=
"25"
OnBatchEditCommand
=
"RG_CorreosExtra_BatchEditCommand"
OnInsertCommand
=
"RG_CorreosExtra_InsertCommand"
OnUpdateCommand
=
"RG_CorreosExtra_UpdateCommand"
OnDeleteCommand
=
"RG_CorreosExtra_DeleteCommand"
OnNeedDataSource
=
"RG_CorreosExtra_NeedDataSource"
Skin
=
"Web20"
>
<
MasterTableView
CommandItemDisplay
=
"Top"
DataKeyNames
=
"id"
HorizontalAlign
=
"NotSet"
EditMode
=
"Batch"
Name
=
"Detalle_Correos_Extra"
>
<
NoRecordsTemplate
>
No hay correos en la lista
</
NoRecordsTemplate
>
<
CommandItemSettings
AddNewRecordText
=
"Nuevo Correo"
SaveChangesText
=
"Guardar Cambios"
CancelChangesText
=
"Cancelar"
RefreshText
=
"Actualizar"
/>
<
BatchEditingSettings
EditType
=
"Cell"
OpenEditingEvent
=
"Click"
/>
<
Columns
>
<
telerik:GridTemplateColumn
DataField
=
"correo"
HeaderText
=
"Correo"
UniqueName
=
"correo"
SortExpression
=
"correo"
>
<
ItemStyle
HorizontalAlign
=
"Left"
/>
<
ItemTemplate
>
<%# Eval("correo") %>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadTextBox
ID
=
"RT_correo"
runat
=
"server"
Text='<%# Bind("correo") %>'>
</
telerik:RadTextBox
>
<
asp:RequiredFieldValidator
ID
=
"RFV_correo"
runat
=
"server"
ControlToValidate
=
"RT_correo"
ForeColor
=
"Red"
ErrorMessage
=
"Debe ingresar correo electrónico."
Text
=
"*"
Display
=
"Dynamic"
>
</
asp:RequiredFieldValidator
>
<
asp:RegularExpressionValidator
ID
=
"FEV_correo"
runat
=
"server"
ControlToValidate
=
"RT_correo"
ForeColor
=
"Red"
ErrorMessage
=
"Formato de correo inválido."
Text
=
"Formato Inválido"
Display
=
"Dynamic"
Font-Size
=
"X-Small"
ValidationExpression
=
"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
>
</
asp:RegularExpressionValidator
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"nombre"
HeaderText
=
"Nombre"
UniqueName
=
"nombre"
SortExpression
=
"nombre"
>
<
ItemStyle
HorizontalAlign
=
"Left"
/>
<
ItemTemplate
>
<%# Eval("nombre") %>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadTextBox
ID
=
"RT_nombre"
runat
=
"server"
Text='<%# Bind("nombre") %>'>
</
telerik:RadTextBox
>
<
asp:RequiredFieldValidator
ID
=
"RFV_nombre"
runat
=
"server"
ControlToValidate
=
"RT_nombre"
ForeColor
=
"Red"
ErrorMessage
=
"Debe ingresar Nombre."
Text
=
"*"
Display
=
"Dynamic"
>
</
asp:RequiredFieldValidator
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"descripcion"
HeaderText
=
"Descripción"
UniqueName
=
"descripcion"
>
<
ItemStyle
HorizontalAlign
=
"Left"
/>
<
ItemTemplate
>
<%# Eval("descripcion") %>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadTextBox
ID
=
"RT_descripcion"
runat
=
"server"
Text='<%# Bind("descripcion") %>'>
</
telerik:RadTextBox
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridButtonColumn
ConfirmText
=
"¿Desea eliminar este correo?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Eliminación de correo"
HeaderText
=
"Eliminar"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
Text
=
"Eliminar"
UniqueName
=
"DeleteColumn"
>
<
HeaderStyle
Width
=
"60px"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridButtonColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
One last thing, how can I do to make the RequiredFieldValidator for the RadTextBox "RT_nombre" activates only for new records when I clic "Save Changes" if I am not editing the cell.