[CLOSED] [1.0] Confirmation Message
is there a way to dynamically create confirmation message based on treepanel selection? so the message will show "Are you sure you would like to delete menuitem111"?
Thank you!
Code:
<ext:Button ID="btDelete" runat="server" Text="Delete" Icon="Delete">
<DirectEvents>
<Click OnEvent="DeleteItem">
<Confirmation ConfirmRequest="true" Title="Delete" Message="Are you sure you would like to delete selected item? "/>
<ExtraParams>
<ext:Parameter Name="selectedMenu" Value="#{TreePanel1}.getSelectionModel().getSelectedNode().id"
Mode="Raw">
</ext:Parameter>
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
RE: [1.0] Confirmation Message
Hi,
You can set new message and title in BeforeConfirm handler
Code:
BeforeConfirm="config.confirmation.message = 'New Message'; config.confirmation.title = 'New Title';"
RE: [1.0] Confirmation Message
confirmation message from gridpanel
please help me,
I need you before deleting a record, ask whether or not to remove it from the code begin.
Code:
protected void Command(object sender, DirectEventArgs e)
{
string fileWatchID = e.ExtraParams["id"];
string comando = e.ExtraParams["command"];
if(comando == "Delete")
{
Ent_Maestro oentidad = new Ent_Maestro();
oentidad.Id_categoria = Convert.ToInt32(fileWatchID);
onegocio_M.Eliminar_Categoria(oentidad);
Listar_Todo_Cat_Grid();
X.Msg.Notify("Notificacion", "Registro Eliminado Correctamente.").Show();
limpiarform_cat();
}
else
{
if (comando == "Edit")
{
int ID_CATEGORIA = Convert.ToInt32(fileWatchID);
Ent_Maestro oentidad = new Ent_Maestro();
DataSet tabla = new DataSet();
oentidad.Id_categoria = ID_CATEGORIA;
tabla = onegocio_M.Buscar_Categoria_Id(oentidad);
txtid_cat.Text = tabla.Tables[0].Rows[0]["ID_CATEGORIA"].ToString();
txtdec_cat.Text = tabla.Tables[0].Rows[0]["DESC_CATEGORIA"].ToString();
txtprov_cat.Text = tabla.Tables[0].Rows[0]["NOM_PROVEEDOR"].ToString();
txtresp_cat.Text = tabla.Tables[0].Rows[0]["NOM_RESPONSABLE"].ToString();
}
}
before deleting ask and if yes, otherwise delete it must not execute anything.
many thanks in advance.