ID

Uploaded

Status

Description

Work Items

Action

12757
by sweinberger
Aug 22, 2012
10:18 PM

Being evaluated

Anther fix!

Issue:
Unable to resize a column that is larger than the scrollable display width of the grid.

Solution:
I edited the Resiable.cs method in SourceGrid\SourceGrid\Cells\Controllers to handle this case.

Regards,

Sarah Weinberger
ButterflyVista

11107

Download

12756
by sweinberger
Aug 22, 2012
7:55 PM

Being evaluated

Hello,

New Patch and Update to just posted patch, sorry no edit capability

Update: Grid scroll issue
New: Added sample 62 (basic samples)

------------------------------
Update to Grid Scroll Issue
------------------------------
I realized why the original author coded the GetScrollColumns() method the way that he did. The original method did not take fixed columns (e.g. row headers) into account.

The updated function takes one fixed row into account. You can test with the new sample, sample 62.

I included the updated GridVirtual.cs) in the attached zip file.

-----------------------
New Basic Sample 62
-----------------------
I created a new sample, sample 62, which has both column and row headers and allows the user to visually play with the number of rows and columns. Visual options include the ability to allow/disallow scrolling of the header row column (column zero) and allow/disallow the ability to sort the header row column (column zero).

Please place frmSample62*.* in the SourceGrid.Examples | GridSamples | BasicConcepts folder.

Thanks,

Sarah Weinberger
ButterflyVista

Download

12755
by sweinberger
Aug 22, 2012
5:45 PM

Being evaluated

Hello,

I created a discussion thread, started August 7th, on this issue, which goes into the explanation in much more depth as well as the fix.

Here is the explanation / summary from that thread.

Patch attached.

I am not familiar with the procedure to modify the source code and implement a bug fix / feature add to the master source code repository for this product, so that future releases will incorporate the fix / change.

(Bug fix or feature add depends upon one's point of view, so I include both terms.)

I started another thread for the feature/bug in question, but since then I fixed it. In this thread, I would like the change incorporated.

Problem: Sorting a table with header rows causes the the row header to sort as well. That is a bug. Microsoft Excel and other spreadsheets/tables do not have this behavior.

I modified Grid.cs to incorporate the fix. I also added a new property, called SortRowHeader, which I set by default to true, so that previous behavior is left unchanged and only those that want this new behavior will get it by explicity setting this grid property to true.

Note, that none of the samples have row headers. I added one on my end. I am not sure if I can add a new sample too. If I can add a new sample to the master code repository, then let me know the procedure. I needed something to test / play with while I implemented the change.

Changes made to 4.40 source base:

Addition: Add the following 7 lines after line 524 (last line is a blank line)

Thanks,

Sarah Weinberger
ButterflyVista

Download

12753
by sweinberger
Aug 22, 2012
5:30 PM

Being evaluated

Hello,

I found and fixed a problem dealing with scrolling. If the second to last column or any of the latter columns got bigger than a certain size, then scrolling the source grid resulted in the last position showing an empty spreadsheet rather than the expected last column.

I traced the problem to the GetScrollColumns() method in GridVirtual.cs.

New Code Fragment:
//Calculate the columns to be scrolled
for (int c = Columns.Count - 1; c >= ActualFixedColumns; c--)
{
int icxWidth = Columns.GetWidth(c);
if (icxWidth > displayWidth)
icxWidth = displayWidth;
currentWidth += icxWidth;

scrollCols++;

if (currentWidth > displayWidth)
return Columns.Count - scrollCols;
}

Old Code Fragment:
//Calculate the columns to be scrolled
for (int c = Columns.Count - 1; c >= ActualFixedColumns; c--)
{
currentWidth += Columns.GetWidth(c);

if (currentWidth > displayWidth)
return Columns.Count - scrollCols;

scrollCols++;
}

Thanks,

Sarah Weinberger
ButterflyVista

Download

11197
by kaplan_e
Jan 1, 2012
4:45 PM

Being evaluated

Hello,

I had successfully implemented the "RightToLeft" support.
Now sample 44 work OK.
The changes are done in 5 files.
I attached here a zip file with these 5 file.
The base of the files are from the last dump so you can see the changes I made with simple different program.
If you need any help - Do not hesitate to contact me.

I would appropriate very much if you can drop me a note when you make these changes public

Many thanks in advance

Eliezer Kaplansky Phd.
CEO
Ma_Keshet Information system Ltd.
kaplan.eliezer@gmail.com

Download

9401
by alicew
May 13, 2011
1:04 PM

Applied

Shift-selection with the keyboard now works as it does with the mouse. The selected region is a rectangle with one corner at the position of the first cell that was selected, and the other at the position of the last cell that was selected. Previously the selected cells were just any that had been visited.


Applied Jul 13, 2012: Applied

7661

Download

5552
by jasho
Mar 17, 2010
1:06 PM

Applied

The proposed solution is to hide ( visible = false ) linked controls that fall outside the scrollable area and are not in the fixed rows/cols area of the control


GridVirtual.cs => SourceGrid.GridVirtual.ArrangeLinkedControls()
{
SuspendLayout();
foreach (LinkedControlValue linked in m_LinkedControls)
{
if (linked.Position.IsEmpty())
continue;

Control control = linked.Control;
Cells.ICellVirtual cell = GetCell(linked.Position);

Rectangle rect = PositionToRectangle(linked.Position);

if (cell != null && linked.UseCellBorder)
rect = Rectangle.Round(cell.View.Border.GetContentRectangle(rect));

control.Bounds = rect;

// START FIX
// Hide all linked controls which are not in the fixed area
// and fall outside the scrollable area
if ( ( linked.Position.Row >= FixedRows ) && ( linked.Position.Column >= FixedColumns ) )
{
Range scrollableRange = RangeAtArea(CellPositionType.Scrollable );
Rectangle scrollableRectangle = RangeToRectangle(scrollableRange);

control.Visible = !Rectangle.Intersect( rect, scrollableRectangle ).IsEmpty;
}
// END FIX
}
ResumeLayout(false);
}


Applied Jul 1, 2010: Applied

4336

Download

6227
by jewong
Jul 1, 2010
4:11 AM

Applied

Providing a Grid.Accessibility.cs class under SourceGrid.Grids.
Implements the accessible objects for source grid which provides information to accessibility applications.
Also provides some support for UI automation as mentioned in http://sourcegrid.codeplex.com/Thread/View.aspx?ThreadId=52034
The grid, its rows, and cells can now been seen in the accessibility tree.


Applied Jul 1, 2010: Applied with minor modifications

Download

5329
by os
Feb 22, 2010
12:46 PM

Applied

Attached a sample how to use the RichTextBox cell within a real rich text box editor with tool type buttons.


Applied Mar 5, 2010: applied

Download

4530
by os
Nov 26, 2009
11:27 AM

Applied

Here is my now hopefully working RichTextBox Cell patch.


Applied Dec 13, 2009: applied

Download

View All