473,382 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Problem with datagrid row select

Hi all,
I was wondering if anyone can help me with a really annoying problem I have
been having. I made a derived datagrid class that will select the row when
a user clicks anywhere on a cell (multi-select without modifier keys). I
got that working fine, but I also wanted to keep rows selected after a sort,
which I do by storing the row's id in an arraylist. The idea was to do the
sort and then go back and re-select the rows with that row id, which will
now be in a different location. The problem is that to walk through the
datagrid I have to set the current cell and for some reason that is messing
up the array's values. I am at a total loss. Anyone know why this is
happening and/or know a fix? Have I screwed the code up somewhere? Any
help would be dearly appreciated. Here is my code:

public class RowSelectDataGrid : DataGrid

{

private const int OFFSET = 5;

private bool multiselect;

private string id_field;

private ArrayList data_id_array;
// these are used for single selects

private int lastrow;

private int lastID;

/// <summary>

/// Constructor for the row select data grid

/// </summary>

/// <param name="id_field_name">Name of the field that holds a record id for
your dataset</param>

/// <param name="multi">Boolean value to enable the multiselect feature of
the datagrid</param>

public RowSelectDataGrid(string id_field_name, bool multi) : base()

{

this.data_id_array = new ArrayList();

this.lastrow = -1; // default value

this.lastID = -1; // default value

this.id_field = id_field_name;

this.multiselect = multi;

}

/// <summary>

/// Select the rows that contain ids in the selections array of ints

/// </summary>

/// <param name="selections">ArrayList of the record ids to be
selected</param>

public void SetSelectionList( ArrayList selections )

{

this.data_id_array.Clear();

foreach( int id in selections )

{

if( this.multiselect )

this.data_id_array.Add( id );

else // single select only has 1 entry max

this.data_id_array[0] = id;

}

RefreshSelects();

}

/// <summary>

/// Get or Set the multiselect datagrid option

/// </summary>

public bool MultiSelect

{

get

{

return this.multiselect;

}

set

{

// when this changes, the selections are cleared

this.data_id_array.Clear();

this.multiselect = value;

}

}

/// <summary>

/// Reprocess the entire datagrid line by line, selecting previously

/// specified rows

/// </summary>

public void RefreshSelects()

{

// Debugging -- this works, just selects the wrong row

// this.Select(this.lastrow);

// go through each line and select if it is in the list, unselect otherwise

int iRow;

DataGridCell checkCell = new DataGridCell();

checkCell.ColumnNumber = 1;

BindingManagerBase bm;

DataRowView drv;

DataTable myTable = ((DataSet) this.DataSource).Tables[this.DataMember];

for( iRow = 0; iRow < myTable.Rows.Count; iRow++ )

{

// position at the first column of the current row

checkCell.RowNumber = iRow;

this.CurrentCell = checkCell; // ***************** THIS IS THE PROBLEM
LINE -- HOW DOES IT CHANGE THE PRIVATE ARRAYLIST???

bm = BindingContext[this.DataSource, this.DataMember];

drv = (DataRowView) bm.Current;

// if this row has an id in the selection list, make sure it is selected

if( this.data_id_array.Contains( Int32.Parse(
drv[this.id_field].ToString() ) ) )

{

this.Select( iRow );

// if single select, update the row (don't need to update the value)

if( !this.multiselect )

this.lastrow = iRow;

}

// else

// this.UnSelect( iRow );

}

}

/*

* Note that we can just use the datagrid's select(int row) method to do

* multiple selects and unselect to remove them.

* You should capture a column header click so that you can make sure

* the correct rows are selected after the sort

* */

protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)

{

DataGrid.HitTestInfo hti = this.HitTest(e.X, e.Y);

if( hti.Type == HitTestType.Cell )

{

// set up the data row view

DataGridCell clickedCell = new DataGridCell();

clickedCell.RowNumber = hti.Row;

clickedCell.ColumnNumber = hti.Column;

this.CurrentCell = clickedCell;

BindingManagerBase bm = BindingContext[this.DataSource, this.DataMember];

DataRowView drv = (DataRowView) bm.Current;

// if click on the append row (couldn't get it to not show) do nothing

if( drv[this.id_field].ToString() == "" )

return;

// otherwise select or unselect the row and add or remove it from the array

else

{

// if the row is currently in the selection list

if( this.data_id_array.Contains( Int32.Parse(
drv[this.id_field].ToString() ) ) )

{

this.data_id_array.Remove( Int32.Parse( drv[this.id_field].ToString() ) );

this.UnSelect( hti.Row );

// for single selects, clear the last selected row

if( !this.multiselect )

{

this.lastrow = -1;

this.lastID = -1;

}

}

// if it is not in the selection list

else

{

this.data_id_array.Add( Int32.Parse( drv[this.id_field].ToString() ) );

this.Select( hti.Row );

// for single selects, unselect the old, remove it from the list

// and update lastrow

if( !this.multiselect )

{

if( this.lastrow != -1 )

{

this.UnSelect( this.lastrow );

this.data_id_array.Remove( this.lastID );

}

this.lastrow = hti.Row;

this.lastID = Int32.Parse( drv[this.id_field].ToString() );

}

}

}

}

// sort and then fix the selections (since rows have changed)

else if( hti.Type == HitTestType.ColumnHeader )

{

base.OnMouseDown(e);

// this.RefreshSelects();

}

else

{

base.OnMouseDown(e);

}

}

protected override void OnCurrentCellChanged(System.EventArgs e)

{

base.OnCurrentCellChanged(e);

if(Control.MouseButtons != MouseButtons.Left)

{

Rectangle rect = this.GetCellBounds(this.CurrentCell);

MouseEventArgs e1 = new MouseEventArgs(MouseButtons.Left, 0, OFFSET, rect.Y
+ OFFSET, 0);

OnMouseDown(e1);

}

}

}


/// <summary>

/// This section of is very basic, but effective. By overriding the Edit
function, a cell in the column

/// cannot become active for editing, allowing the datagrid events to be
handled.

/// </summary>

public class DataGridNoActiveCellColumn : DataGridTextBoxColumn

{

protected override void Edit(System.Windows.Forms.CurrencyManager source,

int rowNum, System.Drawing.Rectangle bounds, bool readOnly, string
instantText,

bool cellIsVisible)

{

// Empty. Do NOT call the base class!

}

}
Nov 15 '05 #1
2 9895
Hi Chris,

Just some general observations:

1. The grid itself cannot modify data it knows nothing about. Therefore,
it's your code that actually corrupts the array list. Set breakpoints in
every function that modifies the list of identifiers and run the application
in the debugger to see how this happens.

2. The new row can be hidden by the following code:

CurrencyManager cm = (CurrencyManager)BindingContext[this.DataSource,
this.DataMember];
DataView view = (DataView)cm.List;
view.AllowNew = false;

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Chris Plowman" <ch***********@hilton.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Hi all,
I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell (multi-select without modifier keys). I
got that working fine, but I also wanted to keep rows selected after a sort, which I do by storing the row's id in an arraylist. The idea was to do the sort and then go back and re-select the rows with that row id, which will
now be in a different location. The problem is that to walk through the
datagrid I have to set the current cell and for some reason that is messing up the array's values. I am at a total loss. Anyone know why this is
happening and/or know a fix? Have I screwed the code up somewhere? Any
help would be dearly appreciated. Here is my code:

public class RowSelectDataGrid : DataGrid

{

private const int OFFSET = 5;

private bool multiselect;

private string id_field;

private ArrayList data_id_array;
// these are used for single selects

private int lastrow;

private int lastID;

/// <summary>

/// Constructor for the row select data grid

/// </summary>

/// <param name="id_field_name">Name of the field that holds a record id for your dataset</param>

/// <param name="multi">Boolean value to enable the multiselect feature of
the datagrid</param>

public RowSelectDataGrid(string id_field_name, bool multi) : base()

{

this.data_id_array = new ArrayList();

this.lastrow = -1; // default value

this.lastID = -1; // default value

this.id_field = id_field_name;

this.multiselect = multi;

}

/// <summary>

/// Select the rows that contain ids in the selections array of ints

/// </summary>

/// <param name="selections">ArrayList of the record ids to be
selected</param>

public void SetSelectionList( ArrayList selections )

{

this.data_id_array.Clear();

foreach( int id in selections )

{

if( this.multiselect )

this.data_id_array.Add( id );

else // single select only has 1 entry max

this.data_id_array[0] = id;

}

RefreshSelects();

}

/// <summary>

/// Get or Set the multiselect datagrid option

/// </summary>

public bool MultiSelect

{

get

{

return this.multiselect;

}

set

{

// when this changes, the selections are cleared

this.data_id_array.Clear();

this.multiselect = value;

}

}

/// <summary>

/// Reprocess the entire datagrid line by line, selecting previously

/// specified rows

/// </summary>

public void RefreshSelects()

{

// Debugging -- this works, just selects the wrong row

// this.Select(this.lastrow);

// go through each line and select if it is in the list, unselect otherwise
int iRow;

DataGridCell checkCell = new DataGridCell();

checkCell.ColumnNumber = 1;

BindingManagerBase bm;

DataRowView drv;

DataTable myTable = ((DataSet) this.DataSource).Tables[this.DataMember];

for( iRow = 0; iRow < myTable.Rows.Count; iRow++ )

{

// position at the first column of the current row

checkCell.RowNumber = iRow;

this.CurrentCell = checkCell; // ***************** THIS IS THE PROBLEM
LINE -- HOW DOES IT CHANGE THE PRIVATE ARRAYLIST???

bm = BindingContext[this.DataSource, this.DataMember];

drv = (DataRowView) bm.Current;

// if this row has an id in the selection list, make sure it is selected

if( this.data_id_array.Contains( Int32.Parse(
drv[this.id_field].ToString() ) ) )

{

this.Select( iRow );

// if single select, update the row (don't need to update the value)

if( !this.multiselect )

this.lastrow = iRow;

}

// else

// this.UnSelect( iRow );

}

}

/*

* Note that we can just use the datagrid's select(int row) method to do

* multiple selects and unselect to remove them.

* You should capture a column header click so that you can make sure

* the correct rows are selected after the sort

* */

protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)

{

DataGrid.HitTestInfo hti = this.HitTest(e.X, e.Y);

if( hti.Type == HitTestType.Cell )

{

// set up the data row view

DataGridCell clickedCell = new DataGridCell();

clickedCell.RowNumber = hti.Row;

clickedCell.ColumnNumber = hti.Column;

this.CurrentCell = clickedCell;

BindingManagerBase bm = BindingContext[this.DataSource, this.DataMember];

DataRowView drv = (DataRowView) bm.Current;

// if click on the append row (couldn't get it to not show) do nothing

if( drv[this.id_field].ToString() == "" )

return;

// otherwise select or unselect the row and add or remove it from the array
else

{

// if the row is currently in the selection list

if( this.data_id_array.Contains( Int32.Parse(
drv[this.id_field].ToString() ) ) )

{

this.data_id_array.Remove( Int32.Parse( drv[this.id_field].ToString() ) );

this.UnSelect( hti.Row );

// for single selects, clear the last selected row

if( !this.multiselect )

{

this.lastrow = -1;

this.lastID = -1;

}

}

// if it is not in the selection list

else

{

this.data_id_array.Add( Int32.Parse( drv[this.id_field].ToString() ) );

this.Select( hti.Row );

// for single selects, unselect the old, remove it from the list

// and update lastrow

if( !this.multiselect )

{

if( this.lastrow != -1 )

{

this.UnSelect( this.lastrow );

this.data_id_array.Remove( this.lastID );

}

this.lastrow = hti.Row;

this.lastID = Int32.Parse( drv[this.id_field].ToString() );

}

}

}

}

// sort and then fix the selections (since rows have changed)

else if( hti.Type == HitTestType.ColumnHeader )

{

base.OnMouseDown(e);

// this.RefreshSelects();

}

else

{

base.OnMouseDown(e);

}

}

protected override void OnCurrentCellChanged(System.EventArgs e)

{

base.OnCurrentCellChanged(e);

if(Control.MouseButtons != MouseButtons.Left)

{

Rectangle rect = this.GetCellBounds(this.CurrentCell);

MouseEventArgs e1 = new MouseEventArgs(MouseButtons.Left, 0, OFFSET, rect.Y + OFFSET, 0);

OnMouseDown(e1);

}

}

}


/// <summary>

/// This section of is very basic, but effective. By overriding the Edit
function, a cell in the column

/// cannot become active for editing, allowing the datagrid events to be
handled.

/// </summary>

public class DataGridNoActiveCellColumn : DataGridTextBoxColumn

{

protected override void Edit(System.Windows.Forms.CurrencyManager source,

int rowNum, System.Drawing.Rectangle bounds, bool readOnly, string
instantText,

bool cellIsVisible)

{

// Empty. Do NOT call the base class!

}

}


Nov 15 '05 #2
thanks for the info -- I was able to fix the problem using a temp variable
in the function itself as a copy of the datagrid's local arraylist and using
that. At the end of the function I overwrite the now screwed up local
arraylist with the copy, restoring it to its original data. I also tracked
down the error is caused because setting the current cell of the datagrid
(this.CurrentCell = checkCell;) causes the OnCurrentCellChange event to
fire, which in turn calls the mousedown event! Pitiful oversight on my
part. Thanks for the help.

Thank you for the info about hiding the new row, I will definetly give that
a try.

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:e7**************@TK2MSFTNGP10.phx.gbl...
Hi Chris,

Just some general observations:

1. The grid itself cannot modify data it knows nothing about. Therefore,
it's your code that actually corrupts the array list. Set breakpoints in
every function that modifies the list of identifiers and run the application in the debugger to see how this happens.

2. The new row can be hidden by the following code:

CurrencyManager cm = (CurrencyManager)BindingContext[this.DataSource,
this.DataMember];
DataView view = (DataView)cm.List;
view.AllowNew = false;

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Chris Plowman" <ch***********@hilton.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Hi all,
I was wondering if anyone can help me with a really annoying problem I

have
been having. I made a derived datagrid class that will select the row

when
a user clicks anywhere on a cell (multi-select without modifier keys). I got that working fine, but I also wanted to keep rows selected after a

sort,
which I do by storing the row's id in an arraylist. The idea was to do

the
sort and then go back and re-select the rows with that row id, which will now be in a different location. The problem is that to walk through the
datagrid I have to set the current cell and for some reason that is

messing
up the array's values. I am at a total loss. Anyone know why this is
happening and/or know a fix? Have I screwed the code up somewhere? Any
help would be dearly appreciated. Here is my code:

public class RowSelectDataGrid : DataGrid

{

private const int OFFSET = 5;

private bool multiselect;

private string id_field;

private ArrayList data_id_array;
// these are used for single selects

private int lastrow;

private int lastID;

/// <summary>

/// Constructor for the row select data grid

/// </summary>

/// <param name="id_field_name">Name of the field that holds a record id

for
your dataset</param>

/// <param name="multi">Boolean value to enable the multiselect feature of the datagrid</param>

public RowSelectDataGrid(string id_field_name, bool multi) : base()

{

this.data_id_array = new ArrayList();

this.lastrow = -1; // default value

this.lastID = -1; // default value

this.id_field = id_field_name;

this.multiselect = multi;

}

/// <summary>

/// Select the rows that contain ids in the selections array of ints

/// </summary>

/// <param name="selections">ArrayList of the record ids to be
selected</param>

public void SetSelectionList( ArrayList selections )

{

this.data_id_array.Clear();

foreach( int id in selections )

{

if( this.multiselect )

this.data_id_array.Add( id );

else // single select only has 1 entry max

this.data_id_array[0] = id;

}

RefreshSelects();

}

/// <summary>

/// Get or Set the multiselect datagrid option

/// </summary>

public bool MultiSelect

{

get

{

return this.multiselect;

}

set

{

// when this changes, the selections are cleared

this.data_id_array.Clear();

this.multiselect = value;

}

}

/// <summary>

/// Reprocess the entire datagrid line by line, selecting previously

/// specified rows

/// </summary>

public void RefreshSelects()

{

// Debugging -- this works, just selects the wrong row

// this.Select(this.lastrow);

// go through each line and select if it is in the list, unselect

otherwise

int iRow;

DataGridCell checkCell = new DataGridCell();

checkCell.ColumnNumber = 1;

BindingManagerBase bm;

DataRowView drv;

DataTable myTable = ((DataSet) this.DataSource).Tables[this.DataMember];

for( iRow = 0; iRow < myTable.Rows.Count; iRow++ )

{

// position at the first column of the current row

checkCell.RowNumber = iRow;

this.CurrentCell = checkCell; // ***************** THIS IS THE PROBLEM
LINE -- HOW DOES IT CHANGE THE PRIVATE ARRAYLIST???

bm = BindingContext[this.DataSource, this.DataMember];

drv = (DataRowView) bm.Current;

// if this row has an id in the selection list, make sure it is selected

if( this.data_id_array.Contains( Int32.Parse(
drv[this.id_field].ToString() ) ) )

{

this.Select( iRow );

// if single select, update the row (don't need to update the value)

if( !this.multiselect )

this.lastrow = iRow;

}

// else

// this.UnSelect( iRow );

}

}

/*

* Note that we can just use the datagrid's select(int row) method to do

* multiple selects and unselect to remove them.

* You should capture a column header click so that you can make sure

* the correct rows are selected after the sort

* */

protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
{

DataGrid.HitTestInfo hti = this.HitTest(e.X, e.Y);

if( hti.Type == HitTestType.Cell )

{

// set up the data row view

DataGridCell clickedCell = new DataGridCell();

clickedCell.RowNumber = hti.Row;

clickedCell.ColumnNumber = hti.Column;

this.CurrentCell = clickedCell;

BindingManagerBase bm = BindingContext[this.DataSource, this.DataMember];
DataRowView drv = (DataRowView) bm.Current;

// if click on the append row (couldn't get it to not show) do nothing

if( drv[this.id_field].ToString() == "" )

return;

// otherwise select or unselect the row and add or remove it from the

array

else

{

// if the row is currently in the selection list

if( this.data_id_array.Contains( Int32.Parse(
drv[this.id_field].ToString() ) ) )

{

this.data_id_array.Remove( Int32.Parse( drv[this.id_field].ToString() ) );
this.UnSelect( hti.Row );

// for single selects, clear the last selected row

if( !this.multiselect )

{

this.lastrow = -1;

this.lastID = -1;

}

}

// if it is not in the selection list

else

{

this.data_id_array.Add( Int32.Parse( drv[this.id_field].ToString() ) );

this.Select( hti.Row );

// for single selects, unselect the old, remove it from the list

// and update lastrow

if( !this.multiselect )

{

if( this.lastrow != -1 )

{

this.UnSelect( this.lastrow );

this.data_id_array.Remove( this.lastID );

}

this.lastrow = hti.Row;

this.lastID = Int32.Parse( drv[this.id_field].ToString() );

}

}

}

}

// sort and then fix the selections (since rows have changed)

else if( hti.Type == HitTestType.ColumnHeader )

{

base.OnMouseDown(e);

// this.RefreshSelects();

}

else

{

base.OnMouseDown(e);

}

}

protected override void OnCurrentCellChanged(System.EventArgs e)

{

base.OnCurrentCellChanged(e);

if(Control.MouseButtons != MouseButtons.Left)

{

Rectangle rect = this.GetCellBounds(this.CurrentCell);

MouseEventArgs e1 = new MouseEventArgs(MouseButtons.Left, 0, OFFSET,

rect.Y
+ OFFSET, 0);

OnMouseDown(e1);

}

}

}


/// <summary>

/// This section of is very basic, but effective. By overriding the Edit function, a cell in the column

/// cannot become active for editing, allowing the datagrid events to be
handled.

/// </summary>

public class DataGridNoActiveCellColumn : DataGridTextBoxColumn

{

protected override void Edit(System.Windows.Forms.CurrencyManager source,
int rowNum, System.Drawing.Rectangle bounds, bool readOnly, string
instantText,

bool cellIsVisible)

{

// Empty. Do NOT call the base class!

}

}

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Joe Bloggs | last post by:
I am trying display the contents of a table in a web page, select certain rows from that table and then display the fields that I have selected (now table columns) as text in a Label object....
5
by: Jeff | last post by:
IDE: VS 2003 :NET OS: XP Pro My app have a form with a tab-control on it. The tab-control have 2 tabpages. One of the tabpages displays a datagrid, and the other tabpage displays details (order...
2
by: Steve Chatham | last post by:
I use the following code: Private Sub RbtnExport_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RbtnExport.SelectedIndexChanged Dim sFile As String =...
4
by: The Alchemist | last post by:
I am having a problem with a dynamically-generated Datagrid. It is important to point out that this problem does not exist with a design-time created Datagrid, but only with a dynamically generated...
7
by: Neo Geshel | last post by:
Greetings. I have a serious problem. I have multiple sets of tables, several of which are chained more than two tables deep. That is, I have a parent, a child, and a great-grandchild table. ...
7
by: Girish | last post by:
OK.. phew. Playing with data grids for the past few days has been fun and a huge learning experience.. My problem. I have a requirement to display a gird with a gird. Within the embedded grid,...
0
by: rupalirane07 | last post by:
Both grids displays fine. But the problem is only parent datagrid sorting works fine but when i clik on child datagrid for sorting it gives me error: NullReferenceException error Any...
1
by: Brock | last post by:
Thanks in advance... (you can see a screenshot of what my form looks like currently at http://www.juggernautical.com/DataGrid.jpg - the Datalist is super-imposed in 'design view' but the DataGrid...
2
by: =?Utf-8?B?Y3JlYXZlczA2MjI=?= | last post by:
I have a nested datagrid in a xaml file, the parent datagrid loads the vendor information and the details loads the documents for that vendor in a datagrid. Everything is working fine until I click...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.