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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

setting the grid row height

Thread ID:




26578 Mar 27,2005 09:07 AM UTC WinForms 0
Tags: FAQ
Asked On March 27, 2005 09:07 AM UTC

Hi, I am having a problem with setting the grid row height.i am taking the datagrid rows dynamically by using reflection with below code. System.Reflection.MethodInfo mi = typeof(System.Windows.Forms.DataGrid).GetMethod("get_DataGridRows",System.Reflection.BindingFlags.FlattenHierarchy | System.Reflection.BindingFlags.IgnoreCase | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static); System.Array dgra = (System.Array)mi.Invoke(((DataGrid)customGrid),null); rowObjects = new ArrayList(); foreach (object dgrr in dgra) { if (dgrr.ToString().EndsWith("DataGridRelationshipRow")==true) rowObjects.Add(dgrr); } what my requirement is that the textboxcolumn should be multiline.the user will enter the data into the column, while showing the grid i have to show the height of the row with the multiples of width of the column means if the text size is 240 and the width of the column i set is 60 the height of the column should 4 times that of default size to see all the text. what i have done for this is while painting the column i am calculating the required height and setting the height for that row in the grid. The height was set properly.But the grid is re-painting and re-painting and so on....the paint is calling continuosly. Can anyone suggest me what is the right way of setting the row height according to the text in the column and another thing is that instead of setting the wordwrap,multiline properties to true the text is not wrapping if the height increases for the row also. Any suggestion is greatly appreciated. Regards, Ramnadh.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon