to display checkboxes on the right side using template field
-
Yes, you can just go in gridview property and change order of columns.
-
i did check the properties of gridview but where is the ordering of the columns..
scarface
Go to .aspx page.In the gridview inside columns the column names alongwith it's properties are there.You just move that checkbox row to the last order.
-
Go to .aspx page.In the gridview inside columns the column names alongwith it's properties are there.You just move that checkbox row to the last order.
-
well i did try dragging the checkbox column but thats not working..and i checked in the properties but there is no option for that..
scarface
what man u have to just move the checkbox column to the last order in aspx code. say: Like that order only u have to keep.
-
what man u have to just move the checkbox column to the last order in aspx code. say: Like that order only u have to keep.
-
hey that message wasnt getting displayed..i tried in code..but there is no property as ordering of columns..am not getting as to where are you referring to change.. hey thanks for your help..
scarface
<Columns> <asp:BoundField DataField="Country_ID" HeaderText="Country_ID" InsertVisible="False" ReadOnly="True" SortExpression="Country_ID" /> <asp:BoundField DataField="Country_Name" HeaderText="Country_Name" SortExpression="Country_Name" /> <asp:BoundField DataField="Continent_ID" HeaderText="Continent_ID" SortExpression="Continent_ID" /> <asp:BoundField DataField="Continent_Name" HeaderText="Continent_Name" SortExpression="Continent_Name" /> asp:TemplateField <ItemTemplate> <asp:CheckBox ID ="df" runat ="server" /> </ItemTemplate> </asp:TemplateField> </Columns> just replace < and > with< and > resp and try.
-
<Columns> <asp:BoundField DataField="Country_ID" HeaderText="Country_ID" InsertVisible="False" ReadOnly="True" SortExpression="Country_ID" /> <asp:BoundField DataField="Country_Name" HeaderText="Country_Name" SortExpression="Country_Name" /> <asp:BoundField DataField="Continent_ID" HeaderText="Continent_ID" SortExpression="Continent_ID" /> <asp:BoundField DataField="Continent_Name" HeaderText="Continent_Name" SortExpression="Continent_Name" /> asp:TemplateField <ItemTemplate> <asp:CheckBox ID ="df" runat ="server" /> </ItemTemplate> </asp:TemplateField> </Columns> just replace < and > with< and > resp and try.
i dint get this line < and > with < and > resp and try... and am not using bound field..am having a gridview in which am using template field which has checkbox and am filling the data inside it with a datatable which is binded with the gridview..
scarface
-
i dint get this line < and > with < and > resp and try... and am not using bound field..am having a gridview in which am using template field which has checkbox and am filling the data inside it with a datatable which is binded with the gridview..
scarface
can i see the code
-
can i see the code
-
here's my code..
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:TemplateField headertext="select">
<ItemTemplate>
<asp:CheckBox ID="chkbx" runat="server" /></ItemTemplate></asp:TemplateField></Columns>
</asp:GridView>scarface
make the autogeneratecolumns="false" and add whatever columns u need in the columns section as boundfield or temp field watever u like.