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.
hello all
i would like to know how to set the size of displayed table dynamically according to gdbgsize and also how des one set the size of controls dynamically at run time ?
ADAdministrator Syncfusion Team May 11, 2006 09:12 AM UTC
Hi Cheryl,
To set the size of grid, you need to handle the Grid.Model.QueryColWidth as explained in these KBs:
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=70
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=304
Please refer to the Forum thread for more details.
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=18493
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=11002
Let us know if you need any further assistance.
Best Regards,
Haneef
CHcherylMay 12, 2006 11:49 AM UTC
hello haneef
iv tried the following code :-
Private Sub Model_QueryColWidth(ByVal sender As Object, ByVal e As GridRowColSizeEventArgs)
Try
Dim clientsize As Int32
Dim gridsize As Integer = gdbgip.ClientSize.Width
Dim dbgmodel As Integer = gdbgip.Model.ColWidths.GetTotal(0, Me.gdbgip.DataBoundGridModel.ColCount)
clientsize = gridsize - dbgmodel
e.Size = clientsize / gdbgip.Model.ColCount
e.Handled = True
the problem is im getting the value in a msgbox but also system.stackoverflowexception:exception of type system.stackoverflowexception was thrown
Why is this happening ?
>Hi Cheryl,
>
>To set the size of grid, you need to handle the Grid.Model.QueryColWidth as explained in these KBs:
>http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=70
>
>http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=304
>
>Please refer to the Forum thread for more details.
>http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=18493
>http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=11002
>
>Let us know if you need any further assistance.
>Best Regards,
>Haneef
ADAdministrator Syncfusion Team May 12, 2006 01:19 PM UTC
Hi Cheryl,
Even calling the ColWidths.GetTotal() within QueryColWidth event handler will trigger QueryColWidth event again leading to the recursive loop. You need to call the GetTotal() in Form''s load event.Here is a code snippet.
Dim dbgmodel As Integer
Private Sub Form_Load(ByVal sender As Object, ByVal e As EventArg)
dbgmodel = gdbgip.Model.ColWidths.GetTotal(0, Me.gdbgip.DataBoundGridModel.ColCount)
EndSub
Private Sub Model_QueryColWidth(ByVal sender As Object, ByVal e As GridRowColSizeEventArgs)
Try
Dim clientsize As Int32
Dim gridsize As Integer = gdbgip.ClientSize.Width
clientsize = gridsize - dbgmodel
e.Size = clientsize / gdbgip.Model.ColCount
e.Handled = True
gdbgip.Invalidate();
EndSub
Please let me know if this helps.
Best Regards,
Haneef