Exemplo n.º 1
0
    protected void btnNew_Click(object sender, EventArgs e)
    {
        mvMain.SetActiveView(viewEdit);
        GXGridViewDocumentSubType.DataBind();
        GXGridViewDocumentSubType.Visible = false;
        DetailsView1.ChangeMode(DetailsViewMode.Insert);
        TextBox tbCode = DetailsView1.FindControl("tbCode") as TextBox;

        tbCode.Text      = CodeGenerator.DocumentTypeCodeGenerator();
        btnNew.CssClass  = "novZapis_Active";
        btnEdit.CssClass = "izmeni";
        //btnDelete.CssClass = "izbrisi";
        btnPreview.CssClass = "osvezi";
        btnReport.CssClass  = "izvestaj";
        btnSearch.CssClass  = "prebaraj";
    }
Exemplo n.º 2
0
 protected void btnEdit_Click(object sender, EventArgs e)
 {
     if (GXGridView1.SelectedIndex != -1)
     {
         GXGridViewDocumentSubType.DataBind();
         GXGridViewDocumentSubType.Visible = true;
         mvMain.SetActiveView(viewEdit);
         DetailsView1.DataBind();
         DetailsView1.ChangeMode(DetailsViewMode.Edit);
         btnNew.CssClass  = "novZapis";
         btnEdit.CssClass = "izmeni_Active";
         //btnDelete.CssClass = "izbrisi";
         btnPreview.CssClass = "osvezi";
         btnReport.CssClass  = "izvestaj";
         btnSearch.CssClass  = "prebaraj";
     }
 }
Exemplo n.º 3
0
 protected void GXGridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "SingleClick")
     {
         //btnDelete.Enabled = true;
         btnEdit.Enabled = true;
         int selIndex = Convert.ToInt32(e.CommandArgument);
         GXGridView1.SelectedIndex = selIndex;
         GXGridViewDocumentSubType.DataBind();
     }
     if (e.CommandName == "DoubleClick")
     {
         //btnDelete.Enabled = true;
         btnEdit.Enabled = true;
         int selIndex = Convert.ToInt32(e.CommandArgument);
         GXGridView1.SelectedIndex = selIndex;
         DetailsView1.DataBind();
         DetailsView1.ChangeMode(DetailsViewMode.Edit);
         GXGridViewDocumentSubType.DataBind();
         GXGridViewDocumentSubType.Visible = true;
         mvMain.SetActiveView(viewEdit);
     }
 }