Jump to content
Software FX Community

vaioklm

Members
  • Posts

    13
  • Joined

  • Last visited

vaioklm's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. The DataBinding Event. That is where I am adding all of my columns to the Grid.
  2. It didn't seem to make a difference. If I moved the entire block of code to the Init, the column didn't show on the grid. When I left the Columns.Add in the Databinding Event and moved the rest to the Init, it rendered ok, but still behaved the same on callbacks or postbacks.
  3. I create a template column with the following code: Dim tcTemplateColumn As New GridFX.WebForms.TemplateColumntcTemplateColumn.Title = "Template Test"Dim itTest As New itTestTemplatetcTemplateColumn.ItemTemplate = itTestColumns.Add(tcTemplateColumn) The template is very basic. It does nothing more than create a literal containing the word "Test". The grid will initially render fine and I see my template column as expected. However, if I attempt to Sort, Group, Hide a Column, etc... (essentially anything that causes a callback), the Grid goes out to lunch and I eventually get a window asking if I'd like to continue waiting. If something causes the entire page to postback, I get the following error: [ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index] System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) +62 System.ThrowHelper.ThrowArgumentOutOfRangeException() +12 System.Collections.Generic.List`1.get_Item(Int32 index) +2583412 cq.c() +101 cq.e() +167 cq.r() +24 cq.a(Grid A_0) +34 GridFX.WebForms.TemplateColumn.e() +88 GridFX.WebForms.GridColumn.a(Grid A_0) +34 GridFX.WebForms.GridColumnCollection.b(GridColumn A_0) +96 GridFX.WebForms.GridColumnCollection.d(GridColumn A_0) +31 GridFX.WebForms.ObservableList`1.Add(T item) +164 GridFX.WebForms.GridColumnCollection.b(lq A_0) +201 GridFX.WebForms.Grid.b(lq A_0) +87 GridFX.WebForms.Grid.c(Object A_0) +115 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +251 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +142 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +300 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +142 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +300 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +142 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +300 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +142 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +300 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +142 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +300 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +142 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +300 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +142 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +300 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +142 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +300 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +142 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +300 System.Web.UI.Page.LoadAllState() +520 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3444
  4. I create a lookup field using the following code: Dim luSysNo As GridFX.WebForms.LookupFieldluSysNo = New GridFX.WebForms.LookupFieldluSysNo.DataPath = "cll_sys_no"luSysNo.ReadOnly = FalseluSysNo.MissingValueText = "Missing"Dim liItem As New GridFX.WebForms.LookupItemliItem.Text = "Test"liItem.Value = "0"luSysNo.LookupItems.Add(liItem)DataFields.Add(CType(luSysNo, GridFX.WebForms.DataField))Dim fcSysNo As GridFX.WebForms.FieldColumnfcSysNo = New GridFX.WebForms.FieldColumn(CType(luSysNo, GridFX.WebForms.DataField))fcSysNo.Title = ""fcSysNo.Visible = TruefcSysNo.Style.Wrap = FalseColumns.Add(fcSysNo) The grid renders fine and I see my "Test" and "Missing" values as I would expect. But as soon as I put it into edit mode, I get the following error: There was a problem while processing your request. The specific error message was: Exception type: System.NullReferenceExceptionMessage: Object reference not set to an instance of an object.Stack Trace: at GridFX.WebForms.LookupField.n() at GridFX.WebForms.LookupField.p() at GridFX.WebForms.LookupField.q() at GridFX.WebForms.LookupField.a(ListItemCollection A_0, LookupFieldInputSettings A_1) at GridFX.WebForms.LookupField.a(IFieldControl A_0, Object A_1) at GridFX.WebForms.DataField.i(IFieldControl A_0) at dc.b() at l3.k() at System.Web.UI.Control.EnsureChildControls() at l3.c(EventArgs A_0) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) at GridFX.WebForms.OutputCellContainer.b.a(Int32 A_0, OutputCell A_1) at GridFX.WebForms.OutputCellContainer.a(Object A_0, ListChangeEventArgs`1 A_1) at GridFX.WebForms.GridItem.a(Object A_0, ListChangeEventArgs`1 A_1) at GridFX.WebForms.ObservableList`1.a(ListChangeEventArgs`1 A_0) at GridFX.WebForms.ObservableList`1.Add(T item) at is.d() at GridFX.WebForms.GridItem.t() at GridFX.WebForms.GridItem.set_Editing(Boolean value) at GridFX.WebForms.GridCommands.g(CellContainerCommandArgs`1 A_0) at GridFX.WebForms.Command`1.b(TArgs A_0) at GridFX.WebForms.Command`1.a(CommandArgs A_0) at GridFX.WebForms.Grid.a(String A_0, pb A_1) at GridFX.WebForms.Grid.i(String A_0) If I remove the lookup field, the grid will go into edit mode without error.
  5. When creating a lookup field that will display as a drop down list during updates, is there a way to filter the items displayed in the drop down based on the value of another column in that row?
  6. vaioklm

    Grid state

    In the most basic test that I've done, I do not add anything to ViewState. In our more complex custom controls, we do store some property values in ViewState. I do have IE Dev Toolbar installed. If it helps, here is the ASPX page I've used to test this. It is very basic with no code behind. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %> <% @ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms" TagPrefix="chartfx7" %><%@ Register Assembly="GridFX.WebForms" Namespace="GridFX.WebForms" TagPrefix="GridFX" %> <% @ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns="http://www.w3.org/1999/xhtml" >< head runat="server"><title>Untitled Page</title> </ head>< body> <form id="form1" runat="server"> <div> <asp:Button ID="Button1" runat="server" Text="Button" /></div> <GridFX:Grid ID="Grid1" runat="server" DataSourceID="SqlDataSource1"> <Columns> <GridFX:FieldColumn Field="report_name"> </GridFX:FieldColumn> <GridFX:FieldColumn Field="report_desc"> </GridFX:FieldColumn> <GridFX:FieldColumn Field="report_type"> </GridFX:FieldColumn> <GridFX:FieldColumn Field="report_id"> </GridFX:FieldColumn> <GridFX:FieldColumn Field="db_table_id"> </GridFX:FieldColumn> </Columns> <DataFields> <GridFX:TextField DataPath="report_name"> <Format> <DigitalPanel Height="50px" Width="200px"> </DigitalPanel> </Format> </GridFX:TextField> <GridFX:TextField DataPath="report_desc"> <Format> <DigitalPanel Height="50px" Width="200px"> </DigitalPanel> </Format> </GridFX:TextField> <GridFX:NumberField DataPath="report_type"> </GridFX:NumberField> <GridFX:NumberField DataPath="report_id" ReadOnly="True"> </GridFX:NumberField> <GridFX:NumberField DataPath="db_table_id"> </GridFX:NumberField> </DataFields> </GridFX:Grid> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Par80ConnectionString2 %>" SelectCommand="SELECT * FROM [TWR115_REPORT_DESC]"></asp:SqlDataSource></form> </ body></ html>
  7. vaioklm

    Grid state

    The Grid appears to be losing state when something else on the page causes a postback. For instance, I drop a grid and a button on the page and populate the grid with enough data to cause it to page. I go to the 3rd page of the grid. I then click the button which causes the page to postback. My grid has returned to page 1 after the postback. I've also seen it lose my sort and my groupings. This seems to happen whether I drop the Grid directly onto the page through the Designer or put it in a custom control. I've tried setting EnableViewState = True, but this seemed to have no effect. Is there some other property I need to set? Thanks
  8. vaioklm

    Sorting

    In the example I gave, yes; but there are many other scenarios where this wouldn't be the case. Our applications often show text descriptions for alphanumeric codes, but when the user sorts the description, they actually want the sort based on the code rather than the description they are looking at. What I'm really looking for is functionality similar to the .NET datagrid if you create a BoundColumn and set the BoundColumn.DataField = "col_a" and the BoundColumn.SortExpression = "col_b".
  9. vaioklm

    Sorting

    I've got a datetime field that can sometimes contain a NULL. When NULL, the user wants to see "00/00/0000 00:00"; but they want NULL to be treated as "12/31/9999" when sorting. Is it possible to create a column that displays one item in my dataset, but sorts based on a different item?
  10. vaioklm

    Refresh button

    I'm able to get the grid to show in the custom control, but it still behaves erratically when it comes to grouping, sorting, etc... As for the Refresh button, an event would be great. Thanks.
  11. vaioklm

    Refresh button

    I am using the grid in a custom control; therefore, I am binding my datasource to the grid in the Grid.DataBinding event. However, because I don't want to call back to my database every time the Grid.DataBinding event fires, I have my dataset stored in a Session variable which gets bound each time the event fires. I would like to be able to call back to the database and update my Session variable if the user clicks the refresh button, but I do not see a way for me to know that the refresh button has been clicked. Is there an event being raised or something I can override to expose this information to me.
  12. 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
  13. 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
×
×
  • Create New...