We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GridDataBoundGrid like GridListControl

Hi,

I would to make the GridDataBoundGrid behave more like GridListControl.

Here are the following wishlist:
1) Full row selection without the single selected box. Maybe if the cell is editable and of type TextBox.
2) No row header. I need a way to hide it or move it all together.

3) A way to setup celltype ahead of time per column if posible. (Note: they must be editable)

4) I would like to add a combox as a column. e.g. [My Column Name: [ DD TextValue editable and auto-complete ]
]


Thanks,

-- Alex





8 Replies

AD Administrator Syncfusion Team March 26, 2008 11:45 AM UTC

Hi Alex,

1) You can select a full row using ListBoxSelectionMode and AllowSelection property.
Please refer the code snipppet below for more detail.


this.gridDataBoundGrid1.ListBoxSelectionMode = SelectionMode.MultiExtended;
this.gridDataBoundGrid1.AllowSelection = GridSelectionFlags.Any | GridSelectionFlags.AlphaBlend;
this.gridDataBoundGrid1.AlphaBlendSelectionColor = Color.Blue;


Please refer the sample in the below link that illustrates the above.

http://websamples.syncfusion.com/samples/Grid.Windows/F72504_1/main.htm

2) You can hide the row header using Hidden property as follows :


this.gridDataBoundGrid1.Model.Cols.Hidden[0] = true;


Please refer the sample in the below link that illustrates the above.

http://websamples.syncfusion.com/samples/Grid.Windows/F72504_2/main.htm

3) To setup celltype ahead, please refer the sample in the below link.

http://websamples.syncfusion.com/samples/Grid.Windows/F72504_3/main.htm

4) Please refer the sample in the below link that shows how you can add the combobox to column.

http://websamples.syncfusion.com/samples/Grid.Windows/F72504_4/main.htm

Please let me know if you have any questions.

Regards,
Asem.



AL Alex March 31, 2008 05:28 AM UTC

Thanks Asem.

I have some additional questions.

Using GridDataBoundGrid control for Syncfusion version: 4.201.0.60.


1) How do I remove the background color of the editting cell? I want to make the selected row all the same color and yet editable.


2) How do I make the columns in the grid resize proportionally. That way when the user resize the window all the columns grow in respect the initial size. And I dont need the horizontal scroll.

3) In case I do need the H Scroll how I make it so that it does a smooth scroll. Just like the GridGroupingControl.

Thanks,


-- Alex





AD Administrator Syncfusion Team March 31, 2008 12:46 PM UTC


Hi Alex,

Thanks for the interest in Syncfusion products.

1) You can set the background color of the editing cell so that it has same color with your AlphaBlendSelectionColor. You can set the

backgroound color of the editing cell using PrepareViewStyleInfo as follows.


private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if (e.RowIndex == cc.RowIndex && e.ColIndex == cc.ColIndex)
e.Style.BackColor = Color.LightPink;
}


Please refer the sample in the below link that illustrates the above.

http://websamples.syncfusion.com/samples/Grid.Windows/GDBG_Selections/main.htm

2) You can make the columns in the grid resize proportionally using GridColSizeHelper class and you can set the GridColSizeBehavior

as follows.


GridColSizeHelper.GridColSizeBehavior behavior = GridColSizeHelper.GridColSizeBehavior.EqualProportional;
colSizeHelper.ColSizeBehavior = behavior;
this.gridDataBoundGrid1.Refresh();


Please refer the sample in the below link that illustrates the above.

http://websamples.syncfusion.com/samples/Grid.Windows/ColSizeHelperSample/main.htm

3) If your intention is to show the horizontal scrollbar, you can set the HScrollPixel to true as follows.


this.gridDataBoundGrid1.HScrollPixel = true;


Please let me know if this is not what you needed.

Regards,
Asem.



AM Alex Maldonado April 18, 2008 09:04 PM UTC

Thanks Asem for you quick response.

1a) How do I chg. the color so that it matches the blend? In ur ex. u had Color.Red and Color.LightRed.
I have the following Alpha Blend color: Color.FromArgb(127, 157, 185);

1b) For Dropdowns and NumericBoxes is still leaves some white space all around. How can I affect these controls as well.

3a) I tried setting the following property to true to no affect. I still don't have smooth scrolling.

this.gridDataBoundGrid1.HScrollPixel = true;

Am using GridDataBoundGrid control with Syncfusion 4.201.0.60


-- Alex



AD Administrator Syncfusion Team April 30, 2008 02:28 PM UTC

Hi Alex,

Sorry for delay in replying.

1) You can set Color.FromArgb(232, 232, 241) for selected Cell which gives similar color with Color.FromArgb(127, 157, 185) of Alpah Blend. Please refer the sample for (3).

2) We are working on it and we will update you as soon as possible.

3) I am afraid that I was not able to reproduce the issue. Also I have created a simple sample to test this issue with 1000 rows and it is available in the following link

http://websamples.syncfusion.com/samples/Grid.Windows/72504C/main.htm

Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample so that we could sort out the cause of the issue and provide you a solution?

Please let me know if you have any questions.

Regards,
Asem.




AM Alex Maldonado May 5, 2008 02:31 PM UTC

If you take your example and expand each column. Then click and hold the Horizontal scroll bar u'll see the grid does not smooth scroll even though you set the HScrollPixel = true setting.

-- Alex



AD Administrator Syncfusion Team May 6, 2008 03:42 PM UTC

Hi Alex,

Thanks for your update,

If you want to enable to hold the HorizontalScroll and scroll, you can achieve this behavior by setting VerticalThumbTrack to true. Please refer the following code snippet that shows how we can set VerticalThumbTrack to true.


this.gridDataBoundGrid1.VerticalThumbTrack = true;
this.gridDataBoundGrid1.VerticalScrollTips = true;


Please refer the modified sample in the below link that illustrates the above.

http://websamples.syncfusion.com/samples/Grid.Windows/72504D/main.htm

Please let me know if you have any questions.

Regards,
Asem.



AM Alex Maldonado May 29, 2008 10:07 PM UTC

Great thanks. Setting the following property worked for me.

grid.HorizontalThumbTrack = true;


btw, any word on the issue#2 previously discussed?



Loader.
Live Chat Icon For mobile
Up arrow icon