S
Sean
Hi There,
I would like to find out if I can modify some of the properties of a textbox
within a datagrid?
1. How can modify the width of the fields ? when hit the update button all
of the fields are around 200px wide, I have tried to use "size" but I
receive an error.
2. can I validate the fields in a datagrid say for numeric / currency
datatype ?
3. how can I make a password field in a datagrid?
Sean - Thanks in adavnce for your answer
<aspataGrid id="dgUsers" runat="server"
AutoGenerateColumns="False" CellPadding="2" width=400
HeaderStyle-BackColor="purple"
HeaderStyle-ForeColor="White"
HeaderStyle-HorizontalAlign="Center"
HeaderStyle-Font-Bold="True"
EditItemStyle-BackColor="#eeeeee"
OnEditCommand="dgUsers_Edit"
OnUpdateCommand="dgUsers_Update"
OnCancelCommand="dgUsers_Cancel">
<columns>
<asp:EditCommandColumn EditText="Edit Info"
ButtonType="PushButton"
UpdateText="Update" CancelText="Cancel" />
<asp:BoundColumn HeaderText="ID" DataField="CustID"
readonly=true/>
<asp:BoundColumn HeaderText="First Name"
DataField="firstname" />
<asp:BoundColumn HeaderText="Last Name" DataField="lastname"
/>
<asp:BoundColumn HeaderText="Address" DataField="address" />
<asp:BoundColumn HeaderText="Suburb" DataField="suburb" />
<asp:BoundColumn HeaderText="Postcode"
DataField="postcode"/>
<asp:BoundColumn HeaderText="Email Address"
DataField="email" />
</columns>
</aspataGrid>
I would like to find out if I can modify some of the properties of a textbox
within a datagrid?
1. How can modify the width of the fields ? when hit the update button all
of the fields are around 200px wide, I have tried to use "size" but I
receive an error.
2. can I validate the fields in a datagrid say for numeric / currency
datatype ?
3. how can I make a password field in a datagrid?
Sean - Thanks in adavnce for your answer
<aspataGrid id="dgUsers" runat="server"
AutoGenerateColumns="False" CellPadding="2" width=400
HeaderStyle-BackColor="purple"
HeaderStyle-ForeColor="White"
HeaderStyle-HorizontalAlign="Center"
HeaderStyle-Font-Bold="True"
EditItemStyle-BackColor="#eeeeee"
OnEditCommand="dgUsers_Edit"
OnUpdateCommand="dgUsers_Update"
OnCancelCommand="dgUsers_Cancel">
<columns>
<asp:EditCommandColumn EditText="Edit Info"
ButtonType="PushButton"
UpdateText="Update" CancelText="Cancel" />
<asp:BoundColumn HeaderText="ID" DataField="CustID"
readonly=true/>
<asp:BoundColumn HeaderText="First Name"
DataField="firstname" />
<asp:BoundColumn HeaderText="Last Name" DataField="lastname"
/>
<asp:BoundColumn HeaderText="Address" DataField="address" />
<asp:BoundColumn HeaderText="Suburb" DataField="suburb" />
<asp:BoundColumn HeaderText="Postcode"
DataField="postcode"/>
<asp:BoundColumn HeaderText="Email Address"
DataField="email" />
</columns>
</aspataGrid>