protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
 {
     DeleteFiles df = new DeleteFiles();
     df.DeleteAllFiles(Convert.ToInt32(e.Keys[0]), cultureId);
     dll_Culture dll = new dll_Culture(username, dr.getDurationId());
     dll.deleteData(Convert.ToInt32(((HiddenField)ASPxGridView1.FindRowCellTemplateControl(ASPxGridView1.FindVisibleIndexByKeyValue(e.Keys[ASPxGridView1.KeyFieldName]), (GridViewDataColumn)ASPxGridView1.Columns["ValueOfCulture"], "hidDeleteId")).Value));
     e.Cancel = true;
     FillGridView();
 }
        protected void ASPxGridView1_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            Culture ct = new Culture();

            ct.CultureId = Convert.ToInt32(((HiddenField)ASPxGridView1.FindEditRowCellTemplateControl((GridViewDataColumn)ASPxGridView1.Columns["ValueOfCulture"], "hidEditId")).Value);//Convert.ToInt32(((HiddenField)ASPxGridView1.FindRowCellTemplateControl(ASPxGridView1.FindVisibleIndexByKeyValue(e.Keys[ASPxGridView1.KeyFieldName]), (GridViewDataColumn)ASPxGridView1.Columns["ValueOfCulture"], "hidEditId")).Value);
            ct.ValueOfCulture = Convert.ToInt32(((ASPxSpinEdit)ASPxGridView1.FindEditRowCellTemplateControl((GridViewDataColumn)ASPxGridView1.Columns["ValueOfCulture"], "txtEditValueOfCulture")).Text);

            dll_Culture dll = new dll_Culture(username, dr.getDurationId());
            dll.updateData(ct);
            this.ASPxGridView1.CancelEdit();
            e.Cancel = true;
            FillGridView();
        }
        protected void ASPxGridView1_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
        {
            Culture ct = new Culture();

            ct.UserName = username;
            ct.DurationId = dr.getDurationId();

            ct.ValueOfCulture = Convert.ToInt32(((ASPxSpinEdit)ASPxGridView1.FindEditRowCellTemplateControl((GridViewDataColumn)ASPxGridView1.Columns["ValueOfCulture"], "txtEditValueOfCulture")).Text);

            dll_Culture dll = new dll_Culture(username, dr.getDurationId());
            dll.insertData(ct);
            e.Cancel = true;
            ASPxGridView1.CancelEdit();
            FillGridView();
        }