Select the whole row when clicked on a cell

Hi,

In Aspose GridWeb, I would like to select the whole row when i click on a single cell.

How can i do that?

Thanks.

Sinan

Hi,

Well, Aspose.Grid.Web follows MS Excel standard. When you click on the a row header (e.g.., 1, 2, 3 etc.), it will select the whole row.

Thank you.

Ok, but isn't there a way to select (to show highlighted) all the cells in a row programmatically? via javascript? via code-behind?

Thanks.

Hi,

Well, you may highlight all the cells with some color in a row for your need.

I have created a simple example for your need. In the sample, I used some GridWeb's javascript events and functions to implement the task. When a cell is clicked/selected, the whole row get highlighted with yellow color.

the html portion of the source for the webform is as follows. I add the GridWeb on the .aspx page.

<agw:GridWeb id="GridWeb1" runat="server" XhtmlMode="<SPAN class=kwrd>true</SPAN>" Height="250px" Width="642px" OnCellErrorClientFunction="onCellError" OnCellSelectedClientFunction="onCellSelected" ..........>
.........




The Javascript code segment (on the page) is as under.

For further reference, please check the Client Side Scripting demos @:

(The source demos solutions are automatically installed on your pc when you install the control using Aspose.Grid.msi, so you may open the solutions into vs.net and check the source codes.)

Thank you.