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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

setting size of displayed table dynamically according to gdbgsize

Thread ID:

Created:

Updated:

Platform:

Replies:

44023 May 11,2006 06:16 AM UTC May 12,2006 01:19 PM UTC WinForms 3
loading
Tags: GridControl
cheryl
Asked On May 11, 2006 06:16 AM UTC

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 ?

Administrator [Syncfusion]
Replied On 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

cheryl
Replied On May 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

Administrator [Syncfusion]
Replied On 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

CONFIRMATION

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.

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

;