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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Scrollable Cell

Thread ID:

Created:

Updated:

Platform:

Replies:

47718 Aug 10,2006 04:09 PM UTC Aug 17,2006 10:12 AM UTC WinForms 5
loading
Tags: GridControl
Sivaiah Boppana
Asked On August 10, 2006 04:09 PM UTC

I need to make a cell scrollable, I am using the following code to achieve this

private void mmpGrid_TableControlPrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPrepareViewStyleInfoEventArgs e)
{
GridCurrentCell cc = this.mmpGrid.TableControl.CurrentCell;
if(showPreview)
{
for(int count=0;count {
if(e.TableControl.TableDescriptor.Columns[count].MappingName=="psummary" )
{
e.Inner.Style.Enabled =true;
e.Inner.Style.AllowEnter = true;
e.Inner.Style.WrapText = true;
e.Inner.Style.VerticalScrollbar = true;
e.Inner.Style.TextColor =Color.Red ;

e.Inner.Cancel =true;

}
}
}

}



But it works downward only, if I click from top to bottom cells it works properly , if I change the order of clicks it is not showing scroll in the cells except the first cell. Please let me know the solution


Administrator [Syncfusion]
Replied On August 11, 2006 06:49 AM UTC

Hi Sivaiah,

By setting the style.wraptext = true and the style.VerticalScrollbar = true in the QueryCellStyleInfo event handler, a vertical scrollbar will appear as you edit the cell. You need to have sufficient row height, to see the text getting wrapped in the cell.
Try the attached sample, that works fine in displaying the vertical scrollbar properly when the cell content is one more than one line tall.

Here is a sample
http://www.syncfusion.com/Support/user/uploads/GGC_ScrollableCell_8b5e188a.zip

Let me know if you need any further assistance.
Thanks for using Syncfusion Products.

Regards,
Rajagopal

Sivaiah Boppana
Replied On August 11, 2006 10:04 AM UTC


Hi Rajagopal
I tried this as well ,it is working when I click in the order 1st row, 2nd row, 3rd row….

If i go back to 1st row after 3rd row scroll bar is not showing on the 1st row. I think you got it.
Thanks
siva

>I need to make a cell scrollable, I am using the following code to achieve this

private void mmpGrid_TableControlPrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPrepareViewStyleInfoEventArgs e)
{
GridCurrentCell cc = this.mmpGrid.TableControl.CurrentCell;
if(showPreview)
{
for(int count=0;count {
if(e.TableControl.TableDescriptor.Columns[count].MappingName=="psummary" )
{
e.Inner.Style.Enabled =true;
e.Inner.Style.AllowEnter = true;
e.Inner.Style.WrapText = true;
e.Inner.Style.VerticalScrollbar = true;
e.Inner.Style.TextColor =Color.Red ;

e.Inner.Cancel =true;

}
}
}

}



But it works downward only, if I click from top to bottom cells it works properly , if I change the order of clicks it is not showing scroll in the cells except the first cell. Please let me know the solution


Administrator [Syncfusion]
Replied On August 11, 2006 11:33 AM UTC

Hi Sivaiah,

Please modify the code as below in the TableControlCurrentCellChanged event, to get this working properly.
//
GridCurrentCell cc = e.TableControl.CurrentCell;
this.gridGroupingControl1.TableModel.RowHeights.ResizeToFit( GridRangeInfo.Row(cc.RowIndex) );
//

Thanks,
Rajagopal

Sivaiah Boppana
Replied On August 16, 2006 11:23 AM UTC


Hi Rajagopal
My grid is read only , so TableControlCurrentCellChanged event never fired.
Thanks
Sivaiah

>Hi Sivaiah,

Please modify the code as below in the TableControlCurrentCellChanged event, to get this working properly.
//
GridCurrentCell cc = e.TableControl.CurrentCell;
this.gridGroupingControl1.TableModel.RowHeights.ResizeToFit( GridRangeInfo.Row(cc.RowIndex) );
//

Thanks,
Rajagopal

Administrator [Syncfusion]
Replied On August 17, 2006 10:12 AM UTC

Hi Sivaiah,

I have created the sample as per your requirement. Please refer to the attached sample and let me know if you are trying something different.

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/GGC_ScrollableCell_217027e1.zip

Let me know if this helps.
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

;