Click to See Complete Forum and Search --> : Using <asp:datagrid>


orionbrock32
03-27-2006, 03:14 PM
I am having trouble in asp.net using a variable in my datagrid. the trouble is i don't know how to do it.

<ItemTemplate>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
DataSourceID="AccessDataSource1">
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
SortExpression="ID" />


</Columns>
</asp:GridView>

I need to insert a variable value you in my table that actually totals the number of certain fields,

i am a novice asp.net, with a little asp knowledge.

handshakeit
03-28-2006, 04:27 AM
Hi

which type of variable you are inserting?????//
what have you done????
give some more code

regards
Abhi
www.handshakeit.com

orionbrock32
03-28-2006, 10:12 AM
Well coming from a limited asp background i tried to set it up like you would in asp

<asp:TextBox ID="TotalPointsTextBox" runat="server"
Text='<%=VariableName %>'

It tells me i need to declare the variable but no matter where i put the dim statement it doesn't seem to recognize it.

The variable is a total of the previous checkboxes. Its like a grading system, the user checks certain boxes which are each worth 1 point if checked. I am trying to total the poins then display.

sajjad27s
03-29-2006, 01:48 AM
I recommend you to use all code or variebales in CODE file not in aspx page. SO it will be easy for you.