Click here to Skip to main content
15,893,814 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends
In my applicaion error given in data binding in Repeater control error is "DataBinding: 'System.Data.Common.DataRecordInternal' does not contain a property with the name" and my code like below

It will give error my want to bind Refcode of the station but that is give error as like i have mention above.

SO pls help me.....The Repeater control code in given below just i add one column Code in my Repeater control view.

Thanks
Sudhir Baldaniya



XML
<asp:Repeater ID="Repeater2" runat="server" EnableTheming="True" EnableViewState="true">
                                                                                <HeaderTemplate>
                                                                                    <tr align="left" class="trRepeaterHeader">
                                                                                        <td style="width: 10%" align="center" class="tdRepeater">
                                                                                            <asp:LinkButton ID="LinkButton1" ForeColor="white" CommandName="LinkButton" ToolTip="Click Here For Sort Record(s)"
                                                                                                CommandArgument="Date" runat="server" Text="Date"></asp:LinkButton></td>
                                                                                        <td style="width: 25%" class="tdRepeater">
                                                                                            <asp:LinkButton ID="LinkButton2" ForeColor="white" CommandName="LinkButton" ToolTip="Click Here For Sort Record(s)"
                                                                                                CommandArgument="Name" runat="server" Text="Sold By"></asp:LinkButton></td>
                                                                                        <td style="width: 25%" class="tdRepeater">
                                                                                            <asp:LinkButton ID="LinkButton3" ForeColor="white" CommandName="LinkButton" ToolTip="Click Here For Sort Record(s)"
                                                                                                CommandArgument="RefCode" runat="server" Text="Station Code"></asp:LinkButton></td>
                                                                                    </tr>
                                                                                </HeaderTemplate>
                                                                                <ItemTemplate>
                                                                                    <tr align="left" class="trRepeaterItemLine">
                                                                                        <td align="center" class="tdRepeater">
                                                                                            <%# ClsGeneral.CheckNull(Eval("Date"))%>
                                                                                        </td>
                                                                                        <td class="tdRepeater">
                                                                                            <%# ClsGeneral.CheckNull(Eval("Name"))%>
                                                                                        </td>
                                                                                         <td class="tdRepeater">
                                                                                            <%# ClsGeneral.CheckNull(Eval("RefCode"))%>
                                                                                        </td>
                                                                                    </tr>
                                                                                </ItemTemplate>
                                                                                <AlternatingItemTemplate>
                                                                                    <tr align="left" class="trRepeaterAlternateItemLine">
                                                                                        <td align="center" class="tdRepeater">
                                                                                            <%# ClsGeneral.CheckNull(Eval("Date"))%>
                                                                                        </td>
                                                                                        <td class="tdRepeater">
                                                                                            <%# ClsGeneral.CheckNull(Eval("Name"))%>
                                                                                        </td>
                                                                                        <td class="tdRepeater">
                                                                                            <%# ClsGeneral.CheckNull(Eval("RefCode"))%>
                                                                                        </td>
                                                                                    </tr>
                                                                                </AlternatingItemTemplate>
                                                                            </asp:Repeater>
Posted
Updated 15-Feb-17 20:19pm

This post may help you.

http://forums.asp.net/t/1426173.aspx

~Amol
 
Share this answer
 
This error means that data source does not have property that you have bounded to the control. Please check data source has Property name "Date","Name" and "RefCode"

hope this will help..
 
Share this answer
 
<asp:LinkButton ID="LinkButton1" runat="server" Text='<%#Eval("Text") %>' CommandArgument='<%#Eval("value") %>'
 
Share this answer
 
Comments
Richard Deeming 16-Feb-17 13:34pm    
This question was asked and answered 5½ YEARS AGO.

Your "solution" doesn't even attempt to answer the question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900