Hi there, i create a WebHierarchicalDataGrid and when i try to expand a row i get this error message:
Can someone tell me what can i do to prevent this error?
Hello,
I'm just checking up to see if you had the time to review or/and modify my sample. Please feel free to send your feedback if you need further assistance after that.
Hello Pedro,
Your markup looks fine. Since I was not able to reproduce this behavior please see the attached sample (it uses sql data source that is inside the App_Data folder) and feel free to modify it in a way to reproduce the error you are getting.
You can also check this thread where some user reports that receiving invalid data from the data source resulted in the same error you are getting. Considering this I can aqdvise you to double check validity of your data.
Another suggestion is to test your sample with the latest Service release for 14.2, which is 14.2.20142.2146.
Do you need the stored procedure ?
I there,
the grid code is this one:
<asp:Content ID="Content3" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
<ig:WebHierarchicalDataGrid ID="WebHierarchicalDataGrid1" runat="server" AutoGenerateColumns="False" Height="100%" Width="100%" DataSourceID="WebHierarchicalDataSource1" DataKeyFields="cvestamp" OnInit="WebHierarchicalDataGrid1_Init" Key="nome"> <Columns> <ig:BoundDataField DataFieldName="usrdata" Key="usrdata"> <Header Text="Data de Contacto" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="nome" Key="nome"> <Header Text="Nome" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="bino" Key="bino"> <Header Text="Nº CC/BI" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="nasc" Key="nasc"> <Header Text="Data de Nascimento" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="tlmvl" Key="tlmvl"> <Header Text="Telemóvel" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="codpost" Key="codpost"> <Header Text="Código Postal" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="local" Key="local"> <Header Text="Concelho" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="u_catprog" Key="u_catprog"> <Header Text="Categoria Profissional" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="U_STATUS" Key="U_STATUS"> <Header Text="Estado" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="U_AVALIACAO" Key="U_AVALIACAO"> <Header Text="Avaliação" /> </ig:BoundDataField> </Columns> <Behaviors> <ig:Filtering Enabled="true" EnableInheritance="true" FilterType="ExcelStyleFilter" /> <ig:Activation> </ig:Activation> <ig:Sorting> </ig:Sorting> </Behaviors> <Bands> <ig:Band Key="" DataMember="SqlDataSource2_DefaultView" DataKeyFields="cvestamp" AutoGenerateColumns="false"> <Columns> <ig:BoundDataField DataFieldName="morada" Key="morada"> <Header Text="Morada" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="tele" Key="tele"> <Header Text="Telefone" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="DISPONIBILIDADE" Key="DISPONIBILIDADE"> <Header Text="Disponibilidade" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="HAB_ACADEMICAS" Key="HAB_ACADEMICAS"> <Header Text="Habilitações" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="HAB_OUTRAS" Key="HAB_OUTRAS"> <Header Text="Outras Habilitações" /> </ig:BoundDataField> </Columns> </ig:Band> </Bands> </ig:WebHierarchicalDataGrid>
<ig:WebHierarchicalDataSource ID="WebHierarchicalDataSource1" runat="server"> <DataRelations> <ig:DataRelation ChildColumns="cvestamp" ChildDataViewID="SqlDataSource2_DefaultView" ParentColumns="cvestamp" ParentDataViewID="SqlDataSource1_Principal" /> </DataRelations> <DataViews> <ig:DataView ID="SqlDataSource1_Principal" DataSourceID="SqlDataSource1" /> <ig:DataView ID="SqlDataSource2_DefaultView" DataSourceID="SqlDataSource2" /> </DataViews> </ig:WebHierarchicalDataSource> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PHCConnectionString %>" SelectCommand="spDataSourceToGrid" SelectCommandType="StoredProcedure"></asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:PHCConnectionString %>" SelectCommand="spDataSourceToGrid" SelectCommandType="StoredProcedure"></asp:SqlDataSource></asp:Content>
and the code behind is:
protected void WebHierarchicalDataGrid1_Init(object sender, EventArgs e) { this.SqlDataSource1.DataBind(); this.SqlDataSource2.DataBind(); }
Im using Infragistics 2014.2
the error occurs when i try to expand a row.
Thank you for posting in the Infragistics community !
I would need you to provide more information on your scenario and configuration in order to reproduce and investigate this error. In order to do so please provide the following answers:
- the version of .NetAdvantage that you are using
- the configuration of the grid - the markup or code behind, is it fully bound initially..etc. However it will be best if you can provide the whole markup and code behind for the grid or a working sample demonstrating this issue
- on which line does the error occur ?
Looking forward to hearing from you.