Jump to content
Software FX Community

Using the Grid in a custom control


vaioklm

Recommended Posts

We are evaluating GridFX for use in our software shop.  The majority of our code is encapsulated in custom controls.  Ideally, we would like to be able to use GridFX within these custom controls.  However, the Grid does not function properly when created within one of these controls as opposed to putting it directly on the ASPX web form.  The grid will render fine, but the various features like grouping, hiding, sorting, etc... either do not work at all, or work intermittently.  I will include a very simplistic example of what we are trying to do.  Do you think it will be possible to use the Grid in this manner?

Public

Class pnlOrderViewInherits System.Web.UI.WebControls.Panel

Dim WithEvents gfxNonPharm As GridFX.WebForms.Grid

Protected Overrides Sub CreateChildControls() MyBase.CreateChildControls() gfxNonPharm = New GridFX.WebForms.Grid gfxNonPharm.EnableViewState = True Controls.Add(gfxNonPharm)End Sub

Private Sub gfxNonPharm_DataBinding(ByVal sender As Object, ByVal e As System.EventArgs) Handles gfxNonPharm.DataBinding Dim netBLPhysician As pgBLPhysician.clsOrders = Nothing Dim dvData As Data.DataView

netBLPhysician =

New pgBLPhysician.clsOrders dvData = netBLPhysician.GetNonPharm(ConnectionString, VisitIntId, PersonIntID, ManIntID, UserIntId, CareGiverIntId, StartDate, EndDate, VisitsBack,   OrderType, OrderCode).Tables(0).DefaultView gfxNonPharm.DataSource = dvDataEnd Sub

Private Sub pnlOrderView_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init EnsureChildControls()End SubPrivate Sub pnlOrderView_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then   gfxNonPharm.DataBind() End IfEnd Sub

End

Class
Link to comment
Share on other sites

Hi,

Thanks for using Grid FX.  I am psyched to see someone using Grid inside some custom controls.  It should work in custom controls. I used your test example (had to use different data though), and saw only one problem where the sort descending icon didn't show up.  I didn't have any other strange behaviors, which is strange. Do have the latest version? Do me a favor and check at http://support.softwarefx.com/ShowInteractive.aspx?Product=GridFX10&option=0

Regardless, I did see some strangeness and will look deeper into it.  Grid FX will, once I'm done, work smoothly inside a custom control.  So please bear with me and we'll get it taken care of.

Thanks!  Talk to you soon.

Link to comment
Share on other sites

It looks like my version was up to date with the exception of some documentation.  A specific example of some of the strangeness I'm seeing would be if I try to hide a column; the column hides fine, but if I then try to hide another column the first column hidden reappears and the second column is not hidden.  Once this has happened, I can then group on a column, but I can't expand the groups.

We do use ChartFX in our shop and I currently have 6.2 installed.  The powers that be are working with your company on a licensing agreement, so we haven't upgraded to the latest version yet.  I know that the charting is pretty tightly integrated into the Grid.  Could my older version of ChartFX be a problem?

 Thanks

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...