Hi,
e.Layout.RowScrollRegions[0].Scroll(
.Bottom) is not scrolling to bottom.
I am increasing the hieght of few rows in paint method that could be the reason it is not scrolling to bottom.
Is there any way make it scroll to bottom.
Thanks
You are probably correct. Changing the height of the row in the Paint method is probably not a good idea. At the very least, it's inefficient.
If you want all the rows in the grid to be the same height, anyway, then why are you looping through the rows?Or did you just use the same height for example purposes?
Either way, looping through every row in the grid inside the paint event it extremely inefficient. Try using the InitializeRow event instead and just set the height on one row at a time.
I have to show two different fileds data in a single cell and the first filed data fornt color and second field data color should be different. So I am using paint method to increase the cell width and add another line using e.Graphics.DrawString . Is any other way I can do that so I will not use paint method.
Yes, you could use an unbound column and set it's Style to FormattedText. Then you could use xml to display text in two different colors, just as if you were using the FormattedTextEditor control.
Thanks for your advise I want to get rid of paint method.
Could you give any sample code how can I use XML to display text in two different colors.
The grid uses the same custom XML format that the FormattedTextEditor control uses. So you can consult the documentation for that control's Value property. Or... what I like to do is simply place an UltraFormattedTextEditor control on a form and go to the Value property in the property grid. You can open up the designer and there are buttons to format text and then you can look at the XML that is generated.
Hi
I have place UltraFormattedTextEditor control on the form and opened the designer .
I am seeing it generating the XML. But I dont know what to do next. Please could you send me sample code as it is little urgent.
Never mind I got it.
Thanks.