Currently, I have below.
<asp:DataGrid ID="dgSearch" runat="server" DataSourceID="SqlDataSourc
e1" AllowPaging="True"
CellPadding="4" ForeColor="#333333" GridLines="None" PageSize="2" Font-Bold="False"
Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"
OnPageIndexChanged="dgSear
ch_PageInd
exChanged"
AllowCustomPaging="True" Width="600px"
PagerStyle-HorizontalAlign
="Right">
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditItemStyle BackColor="#2461BF" />
<SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" Font-Bold="False" Font-Italic="False" Font-Overline="False"
Font-Strikeout="False" Font-Underline="False" ForeColor="White" HorizontalAlign="Right"
Mode="NumericPages" Position="Top" />
<AlternatingItemStyle BackColor="White" />
<ItemStyle BackColor="#EFF3FB" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" Font-Italic="False"
Font-Overline="False" Font-Strikeout="False" Font-Underline="False" />
</asp:DataGrid>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CaasConn
ectionStri
ng %>"
SelectCommand="Select AccountID, UserID, FullName, Case RoleType When 0 Then 'Admin' Else 'User' End 'Role', t2.CompanyName, Case T1 When 1 Then 'Y' Else 'N' End 'T1', Case T2 When 1 Then 'Y' Else 'N' End 'T2', Case T3 When 1 Then 'Y' Else 'N' End 'T3', Case BT When 1 Then 'Y' Else 'N' End 'BT', Case t1.Status When 1 Then 'Active' Else 'Disabled' End 'Status'
From tblAccount t1 Inner Join tblCompany t2 On t1.CompanyID = t2.CompanyID
Where 1 = 0
Order By UserID"></asp:SqlDataSourc
e>
However, I have some problem. When there are no rows returned, I see 1 digit "1" at the top right of the paging row.
- I do not want to see the "1" when there are no rows. I want empty text for the page numbering.
When there are more than 1 rows, I see the paging 1 2 3 at the top LEFT.
- I need it to be at the right hand corner. How come after I click search button, the paging numbering end up at the left instead of right?
How do I set columns to be a hyperlink? And how do I add a new column at the end to be a checkbox column?
I do not have much points left.