The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi:
I''m trying to hide several columns in a GridListControl cell using the TableControlCurrentCellShowingDropDown event, but first time I dropdown the cell the grid has the width of the original grid without hiding columns. Second time the gridlistcontrol has resized and appears fine.
How can I adjust the gridlistcontrol width first time I display it in the cell?
Thanks in advance
ADAdministrator Syncfusion Team December 3, 2004 11:06 AM UTC
Are you adjusting e.Inner.Size to reflect the columns you have hidden. Maybe
//cr is the cell renderer
int height = cr.ListControlPart.Grid.ColWidths.GetTotal(0,cr.ListControlPart.Grid.ColCount);
e.Inner.Size = new Size(e.Inner.Width, height);
PLPaul LaudemanDecember 7, 2004 10:27 AM UTC
Jose,
With some help from Clay in a previous post, I''ve used the "CurrentCellShowingDropDown" event and wrote the following code to set the visibility of a column:
Private Sub Grid_CurrentCellShowingDropDown(ByVal sender As Object, ByVal e As GridCurrentCellShowingDropDownEventArgs) Handles _grid.CurrentCellShowingDropDown
if (someCondtion = True) then
grid.Model.Cols.Hidden(1) = True
end if
end sub
Hope that helps,
-Paul
PLPaul LaudemanDecember 7, 2004 10:29 AM UTC
I abbreviated my code example for you and forgot to include the "grid" object variable declaration (add inside the "if" condition check):
Dim grid As GridControl = CType(cc.Renderer, GridDropDownGridListControlCellRenderer).ListControlPart.Grid