We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Grid select all cells in column

Hi!
I’m using Aspose.Grid 2.0 for Web.
When I click on row header, the whole row are selected.
But when I click on column header, nothing happens.
What should I do to get such behavior for column header as for row header?
Thanks

Hi Dmitry,

Please send us the sample application demonstrating the issue. Because, when you select column header it should select all the cells in that Column.

Thank,

Hi,

We did support to select the whole column clicking on the column header in the grid same as MS Excel. But, you need to use new versions of the product. For example you may try to use new Aspose.Cells.GridWeb v2.3.3.x control from downloading and installing Aspose.Cells for .NET package v 5.1.4:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry265124.aspx

Also, the feature might not be supported in older Aspose.Grid versions.

Thank you.

Here’s sample code

Hi,

I checked your project, you are still using Aspose.Grid.Web (older Aspose.Grid). As I suggested in my previous rely, please use new Aspose.Cells.GridWeb control, for your information older Aspose.Grid.Web has been renamed and merged with name “Aspose.Cells.GridWeb” to Aspose.Cells for .NET package. Please download latest version of Aspose.Cells for .NET:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry265124.aspx

After downloading the msi installer, please do install the product, the installer would install Aspose.Cells.GridWeb control too on your system. So, you may get/use Aspose.Cells.GridWeb v2.3.3.xxxx in your project. I have confirmed selecting whole column clicking the column header works fine in it.

Here is my test code:

using Aspose.Cells.GridWeb;
using Aspose.Cells.GridWeb.Data;


//…

protected void Page_Load(object sender, EventArgs e)
{
//if first visit this page clear GridWeb1
if (!IsPostBack)
{
GridWeb1.WebWorksheets.Clear();
GridWeb1.WebWorksheets.Add();

//set sheets selectedIndex to 0
GridWeb1.WebWorksheets.ActiveSheetIndex = 0;


GridWeb1.SelectCellBgColor = System.Drawing.Color.FromArgb(255, 236, 71);
GridWeb1.ActiveCellBgColor = System.Drawing.Color.FromArgb(255, 160, 226);
GridWeb1.ActiveHeaderBgColor = System.Drawing.Color.FromArgb(112, 255, 112);
GridWeb1.PresetStyle = Aspose.Cells.GridWeb.PresetStyle.Custom;
GridWeb1.XhtmlMode = true;
GridWeb1.DisplayCellTip = false;
GridWeb1.EditMode = false;
GridWeb1.EnableMetalLightEffect = true;
GridWeb1.HeaderBarStyle.BackColor = System.Drawing.Color.FromArgb(224, 224, 224);
GridWeb1.HeaderBarStyle.BorderColor = System.Drawing.Color.FromName(“Gray”);
GridWeb1.HeaderBarStyle.BorderStyle = BorderStyle.Solid;
GridWeb1.HeaderBarStyle.BorderWidth = new Unit(1, UnitType.Pixel);
GridWeb1.HeaderBarStyle.BottomBorderStyle.BorderColor = System.Drawing.Color.FromName(“Gray”);
GridWeb1.HeaderBarStyle.BottomBorderStyle.BorderStyle = BorderStyle.Solid;
GridWeb1.HeaderBarStyle.BottomBorderStyle.BorderWidth = new Unit(1, UnitType.Pixel);
GridWeb1.HeaderBarStyle.Font.Names = new string[] { “Arial” };
GridWeb1.HeaderBarStyle.Font.Size = new FontUnit(10, UnitType.Point);
GridWeb1.HeaderBarStyle.ForeColor = System.Drawing.Color.FromName(“Black”);
GridWeb1.HeaderBarStyle.HorizontalAlign = HorizontalAlign.Center;
GridWeb1.HeaderBarStyle.LeftBorderStyle.BorderColor = System.Drawing.Color.FromName(“White”);
GridWeb1.HeaderBarStyle.LeftBorderStyle.BorderStyle = BorderStyle.Solid;
GridWeb1.HeaderBarStyle.LeftBorderStyle.BorderWidth = new Unit(1, UnitType.Pixel);
GridWeb1.HeaderBarStyle.RightBorderStyle.BorderColor = System.Drawing.Color.FromName(“Gray”);
GridWeb1.HeaderBarStyle.RightBorderStyle.BorderStyle = BorderStyle.Solid;
GridWeb1.HeaderBarStyle.RightBorderStyle.BorderWidth = new Unit(1, UnitType.Pixel);
GridWeb1.HeaderBarStyle.TopBorderStyle.BorderColor = System.Drawing.Color.FromName(“White”);
GridWeb1.HeaderBarStyle.TopBorderStyle.BorderStyle = BorderStyle.Solid;
GridWeb1.HeaderBarStyle.TopBorderStyle.BorderWidth = new Unit(1, UnitType.Pixel);
GridWeb1.HeaderBarStyle.VerticalAlign = VerticalAlign.Middle;
GridWeb1.HeaderBarStyle.Wrap = false;
GridWeb1.HeaderBarTableStyle.BorderCollapse= Aspose.Cells.GridWeb.BorderCollapseType.Separate;
GridWeb1.HeaderBarTableStyle.BorderWidth = new Unit(0, UnitType.Pixel);
GridWeb1.HeaderBarTableStyle.LayoutFixed = Aspose.Cells.GridWeb.LayoutFixedType.Fixed;
GridWeb1.ViewTableStyle.LayoutFixed = Aspose.Cells.GridWeb.LayoutFixedType.Fixed;


GridWeb1.WebWorksheets[0].Cells[1, 1].PutValue(“q”);
GridWeb1.WebWorksheets[0].Cells[1, 2].PutValue(“w”);
GridWeb1.WebWorksheets[0].Cells[1, 3].PutValue(“e”);
GridWeb1.WebWorksheets[0].Cells[2, 1].PutValue(“r”);
GridWeb1.WebWorksheets[0].Cells[2, 2].PutValue(“t”);
GridWeb1.WebWorksheets[0].Cells[4, 3].PutValue(“y”);



}
}



Thanks! With 5.1.4 vesrion it works.
Unforunately I cannot use this version :frowning:

Hi,

You can upgrade your subscription to use latest versions if possible (you need to post a query to Aspose.Purchase forum, they would help you soon).

Thank you.