views:

32

answers:

0

I have the following (example) column in my GridView:

<Columns>
    <asp:BoundField DataField="EmployeeNumber" HeaderText="Employee"
            ReadOnly="true" SortExpression="EmployeeNumber" >
        <ItemStyle HorizontalAlign="Left" />
    </asp:BoundField>
</Columns>

And I want to use that BoundField as a parameter for my DataSource as follows:

<SelectParameters>
    <asp:ControlParameter ControlID="cphContent$EmployeeNumber"
            Name="pEmployeeNumber" PropertyName="EmployeeNumber" Type="int32" />
</SelectParameters>

Where cphContent is the ID of the gridview's container. However an error shows up saying that the field EmployeeNumber can't be found (I checked the source and it's not there) so I'm trying to figure out how I could reference to that boundField in that markup?