private void PaintGrdView() { //FarPoint.Win.Spread.Cell aCell; GrdView.Visible = false; GrdView.Reset(); rowgrdView = 1; GrdView.ActiveSheet.RowCount = rowgrdView; GrdView.ActiveSheet.ColumnCount = 3; //GrdView.Height = this.Height - 60; //GrdView.Width = this.Width - 30; //GrdView.Top = 30; //GrdView.Left = 500; FarPoint.Win.Spread.CellType.TextCellType cellTxt = new FarPoint.Win.Spread.CellType.TextCellType(); GrdView.Sheets[0].Columns[colEmail, colEmailFlag].CellType = cellTxt; //GrdView.Sheets[0].Columns[colMemID, colMemID].CellType = cellTxt; FarPoint.Win.Spread.CellType.CheckBoxCellType cellGrdCheck = new FarPoint.Win.Spread.CellType.CheckBoxCellType(); cellGrdCheck.TextTrue = "use"; cellGrdCheck.TextFalse = "use"; GrdView.ActiveSheet.Columns[colFlag].CellType = cellGrdCheck; GrdView.ActiveSheet.SetColumnLabel(0, colFlag, "USE"); GrdView.ActiveSheet.SetColumnLabel(0, colEmail, "EMail"); GrdView.ActiveSheet.SetColumnLabel(0, colEmailFlag, "Flag"); GrdView.ActiveSheet.SetColumnWidth(colFlag, 60); GrdView.ActiveSheet.SetColumnWidth(colEmail, 200); GrdView.ActiveSheet.SetColumnWidth(colEmail, 100); GrdView.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; GrdView.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; GrdView.Visible = true; }
protected void Grd5_RowEditing(object sender, GridViewEditEventArgs e) { try { int rtqty5 = Convert.ToInt32(((Label)Grd5.Rows[e.NewEditIndex].FindControl("lbl5rtqty")).Text); string BookCode5 = ((Label)Grd5.Rows[e.NewEditIndex].FindControl("lbl5bkcode")).Text; string CustCode5 = ((Label)Grd5.Rows[e.NewEditIndex].FindControl("lbl5custcode")).Text; GrdView.DataSource = CreditNote.Get_DC_CNBkview(Convert.ToInt32(strFY), CustCode5, BookCode5); GrdView.DataBind(); if (rtqty5 != 0) { Pnl5CustDetails.Visible = true; Pnl5.Visible = true; PnlBkdetails.Visible = true; Pnlview.Visible = true; lbbkcode1.Text = ((Label)Grd5.Rows[e.NewEditIndex].FindControl("lbl5bkcode")).Text; lbName1.Text = ((Label)Grd5.Rows[e.NewEditIndex].FindControl("lbl5Name")).Text; } else { Pnl5CustDetails.Visible = true; Pnl5.Visible = true; PnlBkdetails.Visible = false; Pnlview.Visible = false; } } catch { } }
protected void Grd3_RowEditing(object sender, GridViewEditEventArgs e) { try { int rtqty = Convert.ToInt32(((Label)Grd3.Rows[e.NewEditIndex].FindControl("lbl1rtqty")).Text); string BookCode1 = ((Label)Grd3.Rows[e.NewEditIndex].FindControl("lbl1bkcode")).Text; string CustCode1 = ((Label)Grd3.Rows[e.NewEditIndex].FindControl("lbl1custcode")).Text; GrdView.DataSource = DCReturnBook.Get_DC_ReturnBkview(CustCode1, BookCode1); GrdView.DataBind(); if (rtqty != 0) { PnlCustDetails.Visible = true; Pnl3.Visible = true; PnlBkdetails.Visible = true; Pnlview.Visible = true; lbbkcode1.Text = ((Label)Grd3.Rows[e.NewEditIndex].FindControl("lbl1bkcode")).Text; lbName1.Text = ((Label)Grd3.Rows[e.NewEditIndex].FindControl("lbl1Name")).Text; } else { PnlCustDetails.Visible = true; Pnl3.Visible = true; PnlBkdetails.Visible = false; Pnlview.Visible = false; } } catch { } }
protected void btnSearch_Click(object sender, EventArgs e) { WebClass wc = new WebClass(); GrdView.DataSource = wc.ConnectME(); GrdView.DataBind(); }
private void PaintGrdView() { //FarPoint.Win.Spread.Cell aCell; GrdView.Reset(); GrdView.Visible = false; GrdView.ActiveSheet.RowCount = 1; GrdView.ActiveSheet.ColumnCount = 2; //GrdView.Height = this.Height - 150; //GrdView.Width = this.Width - 30; //GrdView.Top = 75; //GrdView.Left = 12; GrdView.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never; GrdView.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never; GrdView.ActiveSheet.SetColumnWidth(0, 35); GrdView.ActiveSheet.SetColumnWidth(1, 300); FarPoint.Win.Spread.Column col; FarPoint.Win.Spread.CellType.TextCellType cell = new FarPoint.Win.Spread.CellType.TextCellType(); col = GrdView.ActiveSheet.Columns[1]; col.CellType = cell; col = GrdView.ActiveSheet.Columns[0]; col.CellType = cell; GrdView.ActiveSheet.Columns[0, 0].Locked = true; GrdView.ActiveSheet.SetColumnLabel(0, 0, "NO"); GrdView.ActiveSheet.SetColumnLabel(0, 1, "Name"); GrdView.ScrollBarTrackPolicy = FarPoint.Win.Spread.ScrollBarTrackPolicy.Off; GrdView.BorderStyle = BorderStyle.None; GrdView.Visible = true; }
private void exportToExcel_Click(object sender, EventArgs e) { string lsExcelFileName = lsIni.GetString("thahr30", "exporttoexcelfilename", "member.xls"); string lsExcelFileNameWithHeader = lsIni.GetString("thahr30", "exporttoexcelfilewithheader", "0"); switch (lsExcelFileNameWithHeader) { case "0": { GrdView.SaveExcel(Application.StartupPath + "\\" + lsExcelFileName, FarPoint.Win.Spread.Model.IncludeHeaders.None); break; } case "1": { GrdView.SaveExcel(Application.StartupPath + "\\" + lsExcelFileName, FarPoint.Win.Spread.Model.IncludeHeaders.ColumnHeadersCustomOnly); break; } } Process myProcess = new Process(); string myDocumentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); myProcess.StartInfo.FileName = Application.StartupPath + "\\" + lsExcelFileName; myProcess.StartInfo.CreateNoWindow = true; myProcess.Start(); Cursor.Current = System.Windows.Forms.Cursors.Default; Cursor.Show(); }
private void AccViewVoucher_Load(object sender, EventArgs e) { TB1.Minimum = 50; TB1.Maximum = 100; this.Opacity = .75; PaintGrdMain(); GrdView.Focus(); }
private void PaintGrdView() { GrdView.Visible = false; GrdView.Reset(); GrdView.ActiveSheet.RowCount = 1; GrdView.ActiveSheet.ColumnCount = 5; GrdView.Height = this.Height - 100; GrdView.Width = this.Width - 30; GrdView.Top = 35; GrdView.Left = 12; FarPoint.Win.Spread.Column col; FarPoint.Win.Spread.CellType.TextCellType cell = new FarPoint.Win.Spread.CellType.TextCellType(); col = GrdView.ActiveSheet.Columns[0, liColUserName]; col.CellType = cell; GrdView.ActiveSheet.SetColumnWidth(liColStaffID, 105); GrdView.ActiveSheet.SetColumnWidth(liColSatffName, 300); GrdView.ActiveSheet.SetColumnWidth(liColIDCard, 65); GrdView.ActiveSheet.SetColumnWidth(liColStaffType, 150); GrdView.ActiveSheet.SetColumnWidth(liColUserName, 150); if (flagStaff == FlagStaff.Staff) { GrdView.ActiveSheet.SetColumnLabel(0, liColStaffID, "StaffID"); GrdView.ActiveSheet.SetColumnLabel(0, liColSatffName, "Staff Name"); NewStaff.Text = " New Staff"; } else if (flagStaff == FlagStaff.Committee) { GrdView.ActiveSheet.SetColumnLabel(0, liColStaffID, "CommitteeID"); GrdView.ActiveSheet.SetColumnLabel(0, liColSatffName, "Committee Name"); NewStaff.Text = " New Committee"; } else if (flagStaff == FlagStaff.PR) { GrdView.ActiveSheet.SetColumnLabel(0, liColStaffID, "ID"); GrdView.ActiveSheet.SetColumnLabel(0, liColSatffName, " Name"); NewStaff.Text = " New ¼ÙéÊ×èÍ¢èÒÇ"; } else if (flagStaff == FlagStaff.Guess) { GrdView.ActiveSheet.SetColumnLabel(0, liColStaffID, "Guess ID"); GrdView.ActiveSheet.SetColumnLabel(0, liColSatffName, "Guess Name"); NewStaff.Text = " New Guess"; } GrdView.ActiveSheet.SetColumnLabel(0, liColIDCard, "ID"); GrdView.ActiveSheet.SetColumnLabel(0, liColStaffType, "Type"); GrdView.ActiveSheet.SetColumnLabel(0, liColUserName, "UserName"); GrdView.ScrollBarTrackPolicy = FarPoint.Win.Spread.ScrollBarTrackPolicy.Off; GrdView.BorderStyle = BorderStyle.None; GrdView.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.RowMode; GrdView.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; GrdView.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; GrdView.ActiveSheet.Columns[0, liColUserName].AllowAutoSort = true; GrdView.ActiveSheet.Columns[0, liColUserName].AllowAutoFilter = true; GrdView.Visible = true; GrdView.AllowColumnMove = true; }
private void PaintGrdView() { //FarPoint.Win.Spread.Cell aCell; GrdView.Visible = false; GrdView.Reset(); GrdView.ActiveSheet.RowCount = 1; GrdView.ActiveSheet.ColumnCount = 11; //GrdView.Height = this.Height - 60; //GrdView.Width = this.Width - 30; //GrdView.Top = 30; //GrdView.Left = 500; FarPoint.Win.Spread.CellType.TextCellType cellTxt = new FarPoint.Win.Spread.CellType.TextCellType(); GrdView.Sheets[0].Columns[liColMeetingContactID, colMemNameT].CellType = cellTxt; GrdView.Sheets[0].Columns[colMemID, colMemID].CellType = cellTxt; GrdView.Sheets[0].Columns[liColMeetingContactID].Visible = false; //GrdView.Sheets[0].Columns[liColPrintLabel].Visible = false; FarPoint.Win.Spread.CellType.CheckBoxCellType cellGrdCheck = new FarPoint.Win.Spread.CellType.CheckBoxCellType(); cellGrdCheck.TextTrue = "use"; cellGrdCheck.TextFalse = "use"; GrdView.ActiveSheet.Columns[liColFlag].CellType = cellGrdCheck; GrdView.ActiveSheet.SetColumnWidth(liColMeetingContactID, 72); GrdView.ActiveSheet.SetColumnWidth(liColMeetingContactName, 170); GrdView.ActiveSheet.SetColumnWidth(liColCompanyName, 170); GrdView.ActiveSheet.SetColumnWidth(liColPositionName, 80); GrdView.ActiveSheet.SetColumnWidth(liColTypeMeetingContact, 80); GrdView.ActiveSheet.SetColumnLabel(0, liColFlag, "USE"); GrdView.ActiveSheet.SetColumnLabel(0, liColMeetingContactID, "meetingcontactid"); GrdView.ActiveSheet.SetColumnLabel(0, liColMeetingContactName, "ª×èͼÙéà¢éÒ»ÃЪØÁ"); GrdView.ActiveSheet.SetColumnLabel(0, liColCompanyName, "ºÃÔÉÑ·"); GrdView.ActiveSheet.SetColumnLabel(0, liColPositionName, "µÓá˹è§"); GrdView.ActiveSheet.SetColumnLabel(0, liColTypeMeetingContact, "»ÃÐàÀ·"); GrdView.ActiveSheet.SetColumnLabel(0, liColPrintLabel, "printlabel"); GrdView.ActiveSheet.SetColumnLabel(0, colTmemNameT, "»ÃÐàÀ·ÊÁÒªÔ¡"); GrdView.ActiveSheet.SetColumnLabel(0, colMemNameT, "ª×èÍÊÁÒªÔ¡ÀÒÉÒä·Â"); GrdView.ActiveSheet.SetColumnLabel(0, colContactID, "contactid"); GrdView.ActiveSheet.SetColumnLabel(0, colMemID, "memid"); GrdView.ScrollBarTrackPolicy = FarPoint.Win.Spread.ScrollBarTrackPolicy.Off; GrdView.BorderStyle = BorderStyle.None; GrdView.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.RowMode; GrdView.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; GrdView.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; GrdView.Visible = true; GrdView.ActiveSheet.Columns[liColMeetingContactID, liColTypeMeetingContact].AllowAutoSort = true; GrdView.ActiveSheet.Columns[liColMeetingContactID, liColTypeMeetingContact].AllowAutoFilter = true; GrdView.Sheets[0].Columns[colContactID].Visible = false; GrdView.AllowColumnMove = true; }
protected void Page_Load(object sender, EventArgs e) { string connectionString; SqlConnection cnn; SqlCommand sqlcomm; SqlDataReader datareader; String sqlstr; connectionString = @"Data Source=.\;Initial Catalog=MyDB;integrated security=true"; cnn = new SqlConnection(connectionString); cnn.Open(); txtInput.Text = "DBSuccess"; sqlstr = "select * from address"; sqlcomm = new SqlCommand(sqlstr, cnn); datareader = sqlcomm.ExecuteReader(); DataTable dataTable = new DataTable(); dataTable.Columns.Add("Id"); dataTable.Columns.Add("HNumber"); dataTable.Columns.Add("Street"); dataTable.Columns.Add("Barangay"); dataTable.Columns.Add("City"); dataTable.Columns.Add("Province"); while (datareader.Read()) { DataRow row = dataTable.NewRow(); row["Id"] = datareader["Id"]; row["HNumber"] = datareader["hnumber"]; row["Street"] = datareader["street"]; row["Barangay"] = datareader["barangay"]; row["City"] = datareader["city"]; row["Province"] = datareader["province"]; dataTable.Rows.Add(row); } GrdView.DataSource = dataTable; GrdView.DataBind(); sqlcomm.Dispose(); datareader.Close(); cnn.Close(); }
private void PaintGrdView() { //FarPoint.Win.Spread.Cell aCell; GrdView.Visible = false; GrdView.Reset(); GrdView.ActiveSheet.RowCount = 1; GrdView.ActiveSheet.ColumnCount = 5; GrdView.Height = this.Height - 60; GrdView.Width = this.Width - 30; GrdView.Top = 35; GrdView.Left = 12; FarPoint.Win.Spread.CellType.TextCellType cellTxt = new FarPoint.Win.Spread.CellType.TextCellType(); GrdView.Sheets[0].Columns[liColMeetingID, liColEndDate].CellType = cellTxt; GrdView.Sheets[0].Columns[liColMeetingID].Visible = false; GrdView.ActiveSheet.SetColumnWidth(liColMeetingID, 72); GrdView.ActiveSheet.SetColumnWidth(liColMeetingNameE, 300); GrdView.ActiveSheet.SetColumnWidth(liColPlace, 300); GrdView.ActiveSheet.SetColumnWidth(liColStartDate, 90); GrdView.ActiveSheet.SetColumnWidth(liColEndDate, 90); GrdView.ActiveSheet.SetColumnLabel(0, liColMeetingID, "meetingid"); GrdView.ActiveSheet.SetColumnLabel(0, liColMeetingNameE, "ª×èÍ¡ÒûÃЪØÁ"); GrdView.ActiveSheet.SetColumnLabel(0, liColPlace, "ʶҹ·Õè»ÃЪØÁ"); GrdView.ActiveSheet.SetColumnLabel(0, liColStartDate, "Çѹ·Õè»ÃЪØÁ"); GrdView.ActiveSheet.SetColumnLabel(0, liColEndDate, "¶Ö§Çѹ·Õè"); GrdView.ScrollBarTrackPolicy = FarPoint.Win.Spread.ScrollBarTrackPolicy.Off; GrdView.BorderStyle = BorderStyle.None; GrdView.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.RowMode; GrdView.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; GrdView.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never; GrdView.Visible = true; GrdView.ActiveSheet.Columns[liColMeetingID, liColEndDate].AllowAutoSort = true; GrdView.ActiveSheet.Columns[liColMeetingID, liColEndDate].AllowAutoFilter = true; GrdView.AllowColumnMove = true; }
private void PaintGrdView() { GrdView.Visible = false; GrdView.Reset(); GrdView.BorderStyle = BorderStyle.None; GrdView.ActiveSheet.RowCount = 1; GrdView.ActiveSheet.ColumnCount = 8; GrdView.ActiveSheet.SetColumnWidth(liColDistrictCode, 200); GrdView.ActiveSheet.SetColumnWidth(liColDistrictNameT, 250); GrdView.ActiveSheet.SetColumnWidth(liColDistrictNameE, 150); GrdView.ActiveSheet.SetColumnWidth(liColPostCode, 150); GrdView.ActiveSheet.SetColumnLabel(0, liColDistrictCode, "ÃËÑÊ"); GrdView.ActiveSheet.SetColumnLabel(0, liColDistrictNameT, "ª×èÍÀÒÉÒä·Â"); GrdView.ActiveSheet.SetColumnLabel(0, liColDistrictNameE, "Name English"); GrdView.ActiveSheet.SetColumnLabel(0, liColPostCode, "Postcode"); GrdView.ActiveSheet.SetColumnLabel(0, liColProvCode, "provcode"); GrdView.ActiveSheet.SetColumnLabel(0, liColCouCode, "coucode"); GrdView.ActiveSheet.SetColumnLabel(0, liColDistrictCode, "districtcode"); GrdView.ActiveSheet.SetColumnLabel(0, liColFlag, "flag"); FarPoint.Win.Spread.Column col; FarPoint.Win.Spread.CellType.TextCellType cell = new FarPoint.Win.Spread.CellType.TextCellType(); col = GrdView.ActiveSheet.Columns[liColCode, liColDistrictCode]; //col.Locked = true; col.CellType = cell; GrdView.ScrollBarTrackPolicy = FarPoint.Win.Spread.ScrollBarTrackPolicy.Off; GrdView.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never; GrdView.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never; GrdView.ActiveSheet.Columns[liColCode, liColDistrictCode].AllowAutoSort = true; GrdView.ActiveSheet.Columns[liColCode, liColDistrictCode].AllowAutoFilter = true; //GrdView.ActiveSheet.Columns[liColProvCode].Visible = false; //GrdView.ActiveSheet.Columns[liColCouCode].Visible = false; //GrdView.ActiveSheet.Columns[liColDistrictCode].Visible = false; GrdView.Visible = true; }
private void printToolStripButton_Click(object sender, EventArgs e) { GrdView.PrintSheet(GrdView.ActiveSheet); }
private void Print_Click(object sender, EventArgs e) { GrdView.PrintSheet(0); }
private void PaintGrdView() { //FarPoint.Win.Spread.Cell aCell; GrdView.Reset(); GrdView.Visible = false; GrdView.ActiveSheet.RowCount = 1; GrdView.ActiveSheet.ColumnCount = 12; GrdView.Height = this.Height - 150; GrdView.Width = this.Width - 30; GrdView.Top = 85; GrdView.Left = 12; GrdView.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never; GrdView.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never; GrdView.ActiveSheet.SetColumnWidth(liColVouNo, 82); GrdView.ActiveSheet.SetColumnWidth(liColGuestName, 180); GrdView.ActiveSheet.SetColumnWidth(liColVouDate, 70); GrdView.ActiveSheet.SetColumnWidth(liColHotel, 285); GrdView.ActiveSheet.SetColumnWidth(liColCounter, 65); GrdView.ActiveSheet.SetColumnWidth(liColMac, 45); GrdView.ActiveSheet.SetColumnWidth(liColRoom, 45); GrdView.ActiveSheet.SetColumnWidth(liColConfirm, 48); GrdView.ActiveSheet.SetColumnWidth(liColRoomRate, 70); GrdView.ActiveSheet.SetColumnWidth(liColRoomRate1, 74); GrdView.ActiveSheet.SetColumnWidth(liColStaffName, 90); GrdView.ActiveSheet.SetColumnWidth(liColStatus, 60); FarPoint.Win.Spread.Column col; FarPoint.Win.Spread.CellType.TextCellType cell = new FarPoint.Win.Spread.CellType.TextCellType(); col = GrdView.ActiveSheet.Columns[liColVouNo, liColStatus]; col.CellType = cell; col = GrdView.ActiveSheet.Columns[liColCounter, liColRoom]; col.CellType = cell; FarPoint.Win.Spread.CellType.NumberCellType cell8 = new FarPoint.Win.Spread.CellType.NumberCellType(); cell8.Separator = ","; col = GrdView.ActiveSheet.Columns[liColRoomRate, liColRoomRate1]; col.CellType = cell8; FarPoint.Win.Spread.Column col7; FarPoint.Win.Spread.CellType.ButtonCellType cell7 = new FarPoint.Win.Spread.CellType.ButtonCellType(); col7 = GrdView.ActiveSheet.Columns[liColConfirm]; //col.Locked = true; //col7.Label = "Confirm"; col7.CellType = cell7; //GrdView .ActiveSheet FarPoint.Win.Spread.HideRowFilter hideRowFilter = new FarPoint.Win.Spread.HideRowFilter(GrdView.ActiveSheet); GrdView.ActiveSheet.Columns[liColVouNo, liColGuestName].AllowAutoFilter = true; GrdView.ActiveSheet.Columns[liColHotel, liColCounter].AllowAutoFilter = true; GrdView.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.RowMode; GrdView.ActiveSheet.Columns[0, 6].Locked = true; GrdView.ActiveSheet.SetColumnLabel(0, liColVouNo, "Vou NO"); GrdView.ActiveSheet.SetColumnLabel(0, liColGuestName, "Guest Name"); GrdView.ActiveSheet.SetColumnLabel(0, liColVouDate, "Vou Date"); GrdView.ActiveSheet.SetColumnLabel(0, liColHotel, "Hotel"); GrdView.ActiveSheet.SetColumnLabel(0, liColCounter, "Counter"); GrdView.ActiveSheet.SetColumnLabel(0, liColMac, "MAC"); GrdView.ActiveSheet.SetColumnLabel(0, liColRoom, "ROOM"); GrdView.ActiveSheet.SetColumnLabel(0, liColConfirm, "Confirm"); GrdView.ActiveSheet.SetColumnLabel(0, liColRoomRate, "RoomRate"); GrdView.ActiveSheet.SetColumnLabel(0, liColRoomRate1, "RoomRate++"); GrdView.ActiveSheet.SetColumnLabel(0, liColStaffName, "Staff Name"); GrdView.ActiveSheet.SetColumnLabel(0, liColStatus, "Status"); GrdView.ScrollBarTrackPolicy = FarPoint.Win.Spread.ScrollBarTrackPolicy.Off; GrdView.BorderStyle = BorderStyle.None; GrdView.AllowColumnMove = true; GrdView.Visible = true; }
private void PaintGrdView() { //FarPoint.Win.Spread.Cell aCell; GrdView.Visible = false; GrdView.Reset(); GrdView.ActiveSheet.RowCount = 1; GrdView.ActiveSheet.ColumnCount = 9; GrdView.Height = this.Height - GrdFilter.Height - 60; GrdView.Width = this.Width - 30; GrdView.Top = 35; GrdView.Left = 12; FarPoint.Win.Spread.Column col; FarPoint.Win.Spread.CellType.TextCellType cell = new FarPoint.Win.Spread.CellType.TextCellType(); col = GrdView.ActiveSheet.Columns[liColMemID, liColContactNameSkk9]; col.CellType = cell; FarPoint.Win.Spread.CellType.NumberCellType cellNum = new FarPoint.Win.Spread.CellType.NumberCellType(); col = GrdView.ActiveSheet.Columns[liColRoom]; cellNum.DecimalPlaces = 0; col.CellType = cellNum; FarPoint.Win.Spread.CellType.ImageCellType cellImg = new FarPoint.Win.Spread.CellType.ImageCellType(); col = GrdView.ActiveSheet.Columns[liColStar1]; cellImg.Style = FarPoint.Win.RenderStyle.StretchAndScale; col.CellType = cellImg; GrdView.ActiveSheet.SetColumnWidth(liColMemID, 72); GrdView.ActiveSheet.SetColumnWidth(liColMemNameE, 300); GrdView.ActiveSheet.SetColumnWidth(liColRoom, 65); GrdView.ActiveSheet.SetColumnWidth(liColRegion, 150); GrdView.ActiveSheet.SetColumnWidth(liColTMem, 110); GrdView.ActiveSheet.SetColumnWidth(liColHotelChain, 150); GrdView.ActiveSheet.SetColumnWidth(liColStar1, 100); GrdView.ActiveSheet.SetColumnWidth(liColProvNameT, 110); GrdView.ActiveSheet.SetColumnLabel(0, liColMemID, "memid"); GrdView.ActiveSheet.SetColumnLabel(0, liColMemNameE, "Member Name"); GrdView.ActiveSheet.SetColumnLabel(0, liColRoom, "room"); GrdView.ActiveSheet.SetColumnLabel(0, liColRegion, "Region"); GrdView.ActiveSheet.SetColumnLabel(0, liColTMem, "Type Member"); GrdView.ActiveSheet.SetColumnLabel(0, liColHotelChain, "Hotel Chain"); GrdView.ActiveSheet.SetColumnLabel(0, liColStar1, "star"); GrdView.ActiveSheet.SetColumnLabel(0, liColProvNameT, "province"); GrdView.ActiveSheet.SetColumnLabel(0, liColContactNameSkk9, "ª×èͼÙéá·¹"); GrdView.ScrollBarTrackPolicy = FarPoint.Win.Spread.ScrollBarTrackPolicy.Off; GrdView.BorderStyle = BorderStyle.None; GrdView.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.RowMode; GrdView.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; GrdView.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; GrdView.Visible = true; //GrdView.Width = this.Width - 10; GrdFilter.ActiveSheet.RowCount = 0; GrdFilter.ActiveSheet.ColumnCount = 27; GrdFilter.Width = 1111; GrdFilter.Top = this.Height - 80; GrdFilter.Left = 18; //GrdFilter.ActiveSheet.SetRowVisible(0, false); GrdFilter.ActiveSheet.RowHeaderVisible = false; //GrdFilter.h GrdFilter.Sheets[0].SetColumnLabel(0, 26, "ALL"); GrdView.ActiveSheet.Columns[liColMemID, liColContactNameSkk9].AllowAutoSort = true; GrdView.ActiveSheet.Columns[liColMemID, liColContactNameSkk9].AllowAutoFilter = true; for (Int32 i = 0; i <= 26; i++) { GrdFilter.ActiveSheet.SetColumnWidth(i + 1, 38); } GrdView.AllowColumnMove = true; }