Hi Support
I have an application in which I am using UltraWinGrid (infragistics 14.2).
In my grid I have two bands (have two table with relation as data source of grid).
First table (you can say first band) has “Comments” as Last column and second table has “Delete” as Last column.
My requirements are:-
Here I am attaching a demo application for the same, please view what I have did and please suggest the solution.
Thanks in advance.
Hi Umesh,
The reason your code isn't working is that the size of the Band 0 comments column has not yet been updated in Form_Load. The ExtendLastColumn adjustment doesn't occur until the first time the grid paints.
In any case, since you want the columns to stay in synch, it's probably best to just set the column width inside the grid's Paint event. This is a bit heavy-handed and could potentially cause a performance issue, but I think it should be okay.
I am attaching a modified version of your sample here where I hook the Paint event of the grid and set the width there.
The only other thing I changed was to set the Width on the Delete column to 20. You were setting MinWidth and MaxWidth, but you need to set Width, also. The Min and Max only affect user resizing or autosizing so that wasn't doing anything.
Also, it's not important, but I could not run our sample initially because the delete.png file was missing. I just replaced it with an image of my own. But I thought I'd mention it in case you wondered why your delete image changed.
First of all thanks for reply.
Almost I have achieved my target with your suggestion, only issue that Paint event was firing infinitely. fixed the issue by removing delegate once I have get the CellSizeResolved width in Paint event using :
this.ultraGrid1.Paint -= new PaintEventHandler(ultraGrid1_Paint);
Thanks once again.