protected void gridCardIndexAll_OnDetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { if (e.Expanded) { Session["IdFondNmaCardIndex"] = gridCardIndexAll.GetRowValues(e.VisibleIndex, "IdFond").ToString(); } }
protected void gridFondMove_OnDetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { if (e.Expanded) { Session["IdFondMoveDetailNma"] = gridFondMove.GetRowValues(e.VisibleIndex, "IdFondMoveDetail").ToString(); } }
protected void gvAudits_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { Session["gvAuditsExpandedRowId"] = (e.Expanded) ? e.VisibleIndex : -1; ASPxGridView gridView = sender as ASPxGridView; gridView.ScrollToVisibleIndexOnClient = e.VisibleIndex; }
protected void gridListInvoice_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { //initialize control BootstrapGridView grid = (BootstrapGridView)sender; BootstrapTextBox txtInvoiceNumber = (BootstrapTextBox)grid.FindDetailRowTemplateControl(e.VisibleIndex, "txtInvoiceNumber"); BootstrapTextBox txtApproveBy = (BootstrapTextBox)grid.FindDetailRowTemplateControl(e.VisibleIndex, "txtApproveBy"); BootstrapDateEdit dateInvoice = (BootstrapDateEdit)grid.FindDetailRowTemplateControl(e.VisibleIndex, "dateInvoice"); BootstrapMemo txtNote = (BootstrapMemo)grid.FindDetailRowTemplateControl(e.VisibleIndex, "txtNote"); //bind control if (txtInvoiceNumber == null) { return; } txtInvoiceNumber.Text = grid.GetRowValues(e.VisibleIndex, "InvoiceNumber").ToString(); txtApproveBy.Text = grid.GetRowValues(e.VisibleIndex, "ApproveBy") != null?grid.GetRowValues(e.VisibleIndex, "ApproveBy").ToString() : string.Empty; txtNote.Text = grid.GetRowValues(e.VisibleIndex, "Note") != null?grid.GetRowValues(e.VisibleIndex, "Note").ToString() : string.Empty; DateTime InvoiceDate = Convert.ToDateTime(grid.GetRowValues(e.VisibleIndex, "InvoiceDate")); if (InvoiceDate != DateTime.Parse("1/1/1900")) { dateInvoice.Value = InvoiceDate; } else { dateInvoice.Value = null; } }
protected void MasterGrid_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { if (e.Expanded == false) { string key = MasterGrid.GetRowValues(e.VisibleIndex, MasterGrid.KeyFieldName).ToString(); Session["DetailGrid" + key] = null; } }
protected void gridProjectLevelRoles_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { if (e.Expanded == true) { Guid xRoleID = (Guid)gridProjectLevelRoles.GetRowValues(e.VisibleIndex, "roles_id"); rc_services.FillProjectRolePermissions(xRoleID); } }
protected void GridviewToolVerification_DetailChanged(object sender, ASPxGridViewDetailRowEventArgs e) { double NilMax = 0; double NilMin = 0; ASPxGridView some = (ASPxGridView)sender; var colapse = some.DetailRows.VisibleCount; if (colapse == 1) { IList <ToolVerification> result = new List <ToolVerification>(); var rowIndex = e.VisibleIndex; var ValueId = GridviewToolVerification.GetRowValues(rowIndex, "ToolId"); var ValueToolNumber = GridviewToolVerification.GetRowValues(rowIndex, "ToolNumber"); var ValueInventory = GridviewToolVerification.GetRowValues(rowIndex, "Id"); var ValSetNm = GridviewToolVerification.GetRowValues(rowIndex, "SetNM"); var ValueToolSetupId = GridviewToolVerification.GetRowValues(rowIndex, "Id"); var ValNextDay = GridviewToolVerification.GetRowValues(rowIndex, "NextVerificationDate"); var ValueNextVerificationDate = GridviewToolVerification.GetCurrentPageRowValues("Id")[rowIndex]; //Perhitungan SetNM var convertIntValSetNM = ValSetNm == null ? "" : ValSetNm.ToString(); if (float.Parse(convertIntValSetNM.Split(',')[0]) < 10) { var Persentase = float.Parse(convertIntValSetNM.Split('.')[0]) * 0.02; NilMax = float.Parse(convertIntValSetNM.Split('.')[0]) + Persentase; NilMin = float.Parse(convertIntValSetNM.Split('.')[0]) - Persentase; HiddenMax.Value = NilMax.ToString(); HiddenMin.Value = NilMin.ToString(); } else { var Persentase = float.Parse(convertIntValSetNM.Split('.')[0]) * 0.03; NilMax = float.Parse(convertIntValSetNM.Split('.')[0]) + Persentase; NilMin = float.Parse(convertIntValSetNM.Split('.')[0]) - Persentase; HiddenMax.Value = NilMax.ToString(); HiddenMin.Value = NilMin.ToString(); } var x = GridviewToolVerification.FindDetailRowTemplateControl(rowIndex, "LayoutDetails") as ASPxFormLayout; var GetDataCalibrationDate = x.FindControl("lblCalibrationDate") as ASPxLabel; var GetDataSetNM = x.FindControl("SetNM") as ASPxLabel; GetDataSetNM.Text = ValSetNm.ToString(); var GetDataLastVerificationDate = x.FindControl("lblVerificationDate") as ASPxLabel; GetDataLastVerificationDate.Text = ValNextDay.ToString() == "" ? (DateTime.Now).ToString() :ValNextDay.ToString(); var GetDataInventoryNumber = x.FindControl("lblInventoryNumber") as ASPxLabel; GetDataInventoryNumber.Text = ValueToolNumber.ToString(); var GetSetNm = x.FindControl("Text_NM") as ASPxTextBox; var GetSetMin = x.FindControl("Text_Min") as ASPxTextBox; var GetSetMax = x.FindControl("Text_Max") as ASPxTextBox; GetSetNm.Text = ValSetNm.ToString(); GetSetMax.Text = NilMax.ToString(); GetSetMin.Text = NilMin.ToString(); var ButtonMarks = x.FindControl("Btn_mark") as ASPxButton; hiddenvalue.Value = (0).ToString(); var BtnSave = x.FindControl("BtnSave") as ASPxButton; var Btn_Verify = x.FindControl("Btn_Verify") as ASPxButton; } }
protected void gridUsuario_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { if (Session["TPUsuario"].ToString() == "3") { sqlGridUsuarioDetalhe.SelectParameters.Add("IDSetor", cbSetorPrincipal.Value.ToString()); sqlGridUsuarioDetalhe.SelectCommand = "SELECT * FROM [vwUsuariogrid] WHERE (([IDEmpresa] = @IDEmpresa) AND ([IDUsuario] = @IDUsuario) AND ([IDSetor] = @IDSetor))"; sqlGridUsuarioDetalhe.DataBind(); } Session["linhaExpandida"] = e.VisibleIndex.ToString(); }
protected void GridMaster_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { if (e.Expanded) { var b = (HiddenField)GridMaster.FindDetailRowTemplateControl(e.VisibleIndex, "hRouteId"); ASPxGridView grid = (ASPxGridView)GridMaster.FindDetailRowTemplateControl(e.VisibleIndex, "GridSlave"); int routeId = int.Parse(b.Value); grid.KeyFieldName = "RateID"; grid.DataSource = bl.GetRatesAndBreaks(routeId); grid.DataBind(); } }
protected void GrdCommand_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { //ASPxGridView gr = sender as ASPxGridView; //if (e.Expanded == true) //{ // ASPxGridView grdt1 = gr.FindDetailRowTemplateControl(e.VisibleIndex, "GridDetail_1") as ASPxGridView; // grdt1.DataSource = new[] { new{stt = "1",ID= "1",Start = "8h30",End = "10h30", Name = "Sản phẩm 1", No = "001", Quantity = "20", Unit = "Hộp"}, // new{stt = "2",ID= "2",Start = "12h30",End = "15h30", Name = "Sản phẩm 3", No = "004", Quantity = "50", Unit = "Hộp"}}; // // grdt1.KeyFieldName="stt"; // grdt1.DataBind(); //} }
protected void gridArea_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { String AreaID = gridArea.GetRowValues(e.VisibleIndex, "area_id").ToString(); Session["Key"] = AreaID; String ItemKey = Session["Key"].ToString(); //ASPxPageControl pc = .FindControl("ASPxPageControlArea") as ASPxPageControl; //ASPxComboBox cb = pc.FindControl("ddlScorecard") as ASPxComboBox; }
protected void GridCD_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { //ASPxGridView gr = sender as ASPxGridView; //if (e.Expanded.ToString().Equals("True")) //{ // ASPxGridView grdt = gr.FindDetailRowTemplateControl(e.VisibleIndex, "GridCD_detail") as ASPxGridView; // grdt.DataSource = new[] { new{ID = "1",Start = "8h30",End = "10h30", Name = "Sản phẩm 1", No = "001", Quantity = "20", Unit = "Hộp"}, // new{ID = "2",Start = "10h30",End = "12h30", Name = "Sản phẩm 2", No = "002", Quantity = "50", Unit = "Gói"}, // new{ID = "3",Start = "12h30",End = "15h30", Name = "Sản phẩm 3", No = "003", Quantity = "50", Unit = "Hộp"}, // new{ID = "4",Start = "15h30",End = "18h30", Name = "Sản phẩm 4", No = "004", Quantity = "50", Unit = "Kg"}}; // grdt.KeyFieldName = "ID"; // grdt.DataBind(); //} }
protected void ASPxGridView2_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { using (var conexion = new DataModelFE()) { long idProducto = long.Parse(ASPxGridView1.GetRowValues(e.VisibleIndex, "id").ToString()); ASPxGridView detailGird = ASPxGridView1.FindDetailRowTemplateControl(e.VisibleIndex, "ASPxGridView2") as ASPxGridView; if (detailGird != null) { detailGird.DataSource = conexion.ProductoImpuesto.Where(x => x.idProducto == idProducto).ToList(); detailGird.DataBind(); } } }
protected void gridArtifacts_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { string FileExtn; string storageFileName; ASPxGridView artifactsGrid = (ASPxGridView)sender; FileExtn = ""; storageFileName = artifactsGrid.GetRowValues(e.VisibleIndex, "filestoragename").ToString(); string fileName = artifactsGrid.GetRowValues(e.VisibleIndex, "filename").ToString(); string accountName = "UploadAzureAccount"; string containerName = Session["enterpriseID"].ToString().ToUpper(); string url = GetFileUrl(storageFileName, accountName, containerName, ref FileExtn); if (e.Expanded) { //using (var client = new System.Net.WebClient()) //{ // client.DownloadFile(url, Path.GetTempPath() + "\\" + fileName); //} //Session["fileNameToDownload"] = fileName + "|" + FileExtn; Session["fileNameToDownload"] = url + "|" + FileExtn + "|" + fileName + "|" + storageFileName; } else { FileExtn = Session["fileNameToDownload"].ToString().Split('|')[1]; storageFileName = Session["fileNameToDownload"].ToString().Split('|')[3]; if (FileExtn == ".pdf") { if (File.Exists(Server.MapPath("~/TempFiles") + "/" + fileName)) { File.Delete(Server.MapPath("~/TempFiles") + "/" + fileName); } } Session.Remove("fileNameToDownload"); } }
protected void grdBooking_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { //isExpanded = e.Expanded; //index = e.VisibleIndex; }
protected void gridProcesses_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { String ProcessessID = gridProcesses.GetRowValues(e.VisibleIndex, "bp_id").ToString(); Session["Key"] = ProcessessID; }
protected void ASPxGridView2_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { ASPxGridView grid = (sender as ASPxGridView); string idTramite = grid.GetRowValues(e.VisibleIndex,"ID").ToString(); if (e.Expanded) { ASPxLabel lb = (ASPxLabel)grid.FindDetailRowTemplateControl(e.VisibleIndex, "ASPxLabel22"); lb.Text = Control.TramiteCtrl.retornaTramiteDetalhes(idTramite)._despacho; } }
protected void DetailChangedTes(object sender, ASPxGridViewDetailRowEventArgs e) { try { ASPxGridView some = (ASPxGridView)sender; var colapse = some.DetailRows.VisibleCount; if (colapse == 1) { IList <ToolVerification> result = new List <ToolVerification>(); var rowIndex = e.VisibleIndex; // var ValueId = GridviewToolVerification.GetRowValues(i, "ToolSetupId"); var ValueId = GridviewToolVerification.GetRowValues(rowIndex, "ToolId"); var ValueInventory = GridviewToolVerification.GetRowValues(rowIndex, "Id"); Session["VisibleIndex"] = ValueInventory.ToString(); var NextDayGet = GridviewToolVerification.GetRowValues(rowIndex, "NextDay"); var ToolNumber = GridviewToolVerification.GetRowValues(rowIndex, "ToolNumber"); DateTime today = DateTime.Now; var MinNMGet = GridviewToolVerification.GetRowValues(rowIndex, "MinNM"); var MaxNMGet = GridviewToolVerification.GetRowValues(rowIndex, "MaxNM"); var ValSetNm = GridviewToolVerification.GetRowValues(rowIndex, "SetNM"); var ValueToolSetupId = GridviewToolVerification.GetRowValues(rowIndex, "Id"); var ValueNextCalibrationDate = GridviewToolVerification.GetRowValues(rowIndex, "NextCalibrationDate"); var CheckValue = ValueNextCalibrationDate.ToString() == "" ? 0 : 1; HiddenCheckValue.Value = CheckValue.ToString(); var x = GridviewToolVerification.FindDetailRowTemplateControl(rowIndex, "LayoutDetails") as ASPxFormLayout; var GetDataCalibrationDate = x.FindControl("lblCalibrationDate") as ASPxLabel; GetDataCalibrationDate.Text = ValueNextCalibrationDate.ToString() == "" ? (DateTime.Now).ToString() : ValueNextCalibrationDate.ToString(); var GetNextDay = x.FindControl("DateDetails") as ASPxTextBox; GetNextDay.Text = NextDayGet.ToString() == "" ? "0" : NextDayGet.ToString(); //DateTime today = DateTime.Now; var GetNextDate = x.FindControl("DateDetailsCalender") as ASPxTextBox; GetNextDate.Text = (today.AddDays(int.Parse(NextDayGet.ToString() == "" ? "0" : NextDayGet.ToString()))).ToString(); var GetDataInventoryNumber = x.FindControl("lblInventoryNumber") as ASPxLabel; GetDataInventoryNumber.Text = ToolNumber.ToString(); var GetDataNmRange = x.FindControl("lblNmRange") as ASPxLabel; GetDataNmRange.Text = MinNMGet.ToString() + '-' + MaxNMGet.ToString() + " Nm"; var ButtonMarks = x.FindControl("Btn_mark") as ASPxButton; var BtnSave = x.FindControl("BtnSave") as ASPxButton; var Btn_Verify = x.FindControl("Btn_Verify") as ASPxButton; var lbl20 = x.FindControl("lbl20") as ASPxLabel; lbl20.Text = "20% (" + Convert.ToDouble(MaxNMGet) * 0.2 + " Nm)"; var lbl40 = x.FindControl("lbl40") as ASPxLabel; lbl40.Text = "40% (" + Convert.ToDouble(MaxNMGet) * 0.4 + " Nm)"; var lbl60 = x.FindControl("lbl60") as ASPxLabel; lbl60.Text = "60% (" + Convert.ToDouble(MaxNMGet) * 0.6 + " Nm)"; var lbl80 = x.FindControl("lbl80") as ASPxLabel; lbl80.Text = "80% (" + Convert.ToDouble(MaxNMGet) * 0.8 + " Nm)"; var lbl100 = x.FindControl("lbl100") as ASPxLabel; lbl100.Text = "100% (" + Convert.ToDouble(MaxNMGet) * 1 + " Nm)"; } } catch (Exception ex) { AppLogger.LogError(ex); } }
protected void ASPxGridView1_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { Session["clave"] = (sender as ASPxGridView).GetRowValues(e.VisibleIndex, "clave"); Session["indEstado"] = (sender as ASPxGridView).GetRowValues(e.VisibleIndex, "indEstado"); Session["tipoDocumento"] = (sender as ASPxGridView).GetRowValues(e.VisibleIndex, "tipoDocumento"); }
protected void gridCategory_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { String CategoryID = gridCategory.GetRowValues(e.VisibleIndex, "cat_id").ToString(); Session["Key"] = CategoryID; }
protected void ASPxGridView1_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { }
protected void gridRTM_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e) { Session["CriteriaId"] = (sender as ASPxGridView).GetMasterRowKeyValue(); }