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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Queries relating to Gridlistcontrol celltype in GRID and tabBarSplitterControl

Thread ID:

Created:

Updated:

Platform:

Replies:

59330 Apr 11,2007 11:26 AM UTC Apr 12,2007 05:45 PM UTC WinForms 3
loading
Tags: GridControl
Rahul Hans
Asked On April 11, 2007 11:26 AM UTC

Hi

Two queries.

1. I have a grid in which columns 2 and five of every row and 16,9 have been defined as GridListcontrol celltypes. I am subscribing to the CurrentCellShowingDropDown event of this grid and am formatting the list control as and when the user navigates to the requisite column and or row. I am also forcing showdropdown in currentcellactivated event. The problem is that when I move from one cell to another using the mouse the client area of the Gridlistcontrol is not reset. I have tried using

cr.ListControlPart.Grid.Model.ColWidths.ResizeToFit

amongst other things

Require your inputs on how to solve the problem

2. tabBarSplitterControl

Is need to create a new tabBarpage with a grid on the fly.

I have been able to add the tabbarpage by using
tabBarSplitterControl1.TabBarPages.Add

Now i need to add a grid to the tabbarpage

Is there a specific way to do this ?

Just give me a general idea

Thanks & Regards

Rahul

haneefm [Syncfusion]
Replied On April 11, 2007 06:22 PM UTC

Hi RH,

Issue 1: Format- Resize issue

Please refer the following forum threads for resizing column in a formatted grid list control.
1) http://www.syncfusion.com/support/forums/message.aspx?&MessageID=55725
2) http://www.syncfusion.com/support/forums/message.aspx?&MessageID=55828

Issue 2:

One way you can do this by handling the ActivePageChanged event of the TabBarSplitterControl and add the gridcontrol to the newly added tag page in a TabBarSplitter. Here is a code snippet to show this.

private void tabBarSplitterControl1_ActivePageChanged(object sender, ControlEventArgs e)
{
TabBarPage page = e.Control as TabBarPage;
page.Controls.Add(grid);
}

Best regards,
Haneef

Rahul Hans
Replied On April 12, 2007 03:45 PM UTC

Hi Haneef

As far as Issue no 2 is concerned that is resolved.

However issue no 1 is not resolved.

I dont think that the solution you have given will work for me.

I have attached the snapshots of my app with suitable comments

It is not a big issue right now but it is going to if we dont solve it before User Acceptance Tests

Thanks Once Again
RH
>Hi RH,

Issue 1: Format- Resize issue

Please refer the following forum threads for resizing column in a formatted grid list control.
1) http://www.syncfusion.com/support/forums/message.aspx?&MessageID=55725
2) http://www.syncfusion.com/support/forums/message.aspx?&MessageID=55828

Issue 2:

One way you can do this by handling the ActivePageChanged event of the TabBarSplitterControl and add the gridcontrol to the newly added tag page in a TabBarSplitter. Here is a code snippet to show this.

private void tabBarSplitterControl1_ActivePageChanged(object sender, ControlEventArgs e)
{
TabBarPage page = e.Control as TabBarPage;
page.Controls.Add(grid);
}

Best regards,
Haneef

New Microsoft Word Document (7).zip

haneefm [Syncfusion]
Replied On April 12, 2007 05:45 PM UTC

Hi RH,

If you want to change the width of the DropDown in a GridListControl CellType, then you have to handle the CurrentCellShowingDropDown event, and set e.Size there. (Only the width is applicable in a GridListControl celltype, the height is determined by the DropDownRows parameter. Here is a code snippet to show this.

private void grid_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e)
{
GridCurrentCell cc = this.grid.CurrentCell;
if(cc.ColIndex == 1 ) //dropdown column
{
GridDropDownGridListControlCellRenderer cr = cc.Renderer as GridDropDownGridListControlCellRenderer;
if(cr != null)
{ //change teh height
((GridDropDownGridListControlPart)cr.ListControlPart).DropDownRows = 10;
//change the width
e.Size = new Size(400, e.Size.Height);
}
}
}

Best Regards,
Haneef

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;