TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kartheek nekkanti
NA
15
3.9k
.net
Apr 30 2015 1:46 AM
in mobile responsive gridview header text is coming in footer,i done my project in three tire-----iam geeting header text of slot type ,no of dates ,unit price etc like below
and here unit price is the total of no slots total he booked and grand total is total of all slots
:
No of Dates
:
SlotType
: Grand Total
Unit Price
: 32,000.00
my grird.....
Add Id
Selected Dates
No of Dates
SlotType
Unit Price
Select
1069
2015-05-04,2015-05-05,
2
FullPage
2000.0000
Select
1070
2015-05-19,2015-05-05,2015-05-21,
3
FullPage
3000.0000
Select
1078
09-05-2015,10-05-2015,
2
FullPage
2000.0000
Select
1081
2015-05-08,
1
FullPage
1000.0000
Select
1085
25-05-2015,27-05-2015,29-05-2015,
3
FullPage
3000.0000
Select
1086
15-05-2015,22-05-2015,23-05-2015,16-05-2015,
4
FullPage
4000.0000
Select
1087
11-06-2015,18-06-2015,17-06-2015,
3
FullPage
3000.0000
Select
1088
19-06-2015,24-06-2015,25-06-2015,26-06-2015,
4
FullPage
4000.0000
Select
1089
21-05-2015,20-05-2015,
2
FullPage
2000.0000
Select
1090
16-05-2015,15-05-2015,12-05-2015,
3
FullPage
3000.0000
Select
1091
22-05-2015,28-05-2015,
2
FullPage
2000.0000
Select
1092
22-05-2015,29-05-2015,19-05-2015,
3
FullPage
3000.0000
Grand Total
32,000.00
mobile grid like this.....
Add Id
Selected Dates
1069
2015-05-04,2015-05-05,
:
Select
No of Dates
:
2
SlotType
:
FullPage
Unit Price
:
2000.0000
1070
2015-05-19,2015-05-05,2015-05-21,
1078
09-05-2015,10-05-2015,
1081
2015-05-08,
1085
25-05-2015,27-05-2015,29-05-2015,
1086
15-05-2015,22-05-2015,23-05-2015,16-05-2015,
1087
11-06-2015,18-06-2015,17-06-2015,
:
Select
No of Dates
:
3
SlotType
:
FullPage
Unit Price
:
3000.0000
1088
19-06-2015,24-06-2015,25-06-2015,26-06-2015,
1089
21-05-2015,20-05-2015,
1090
16-05-2015,15-05-2015,12-05-2015,
:
Select
No of Dates
:
3
SlotType
:
FullPage
Unit Price
:
3000.0000
1091
22-05-2015,28-05-2015,
:
Select
No of Dates
:
2
SlotType
:
FullPage
Unit Price
:
2000.0000
1092
22-05-2015,29-05-2015,19-05-2015,
:
Select
No of Dates
:
3
SlotType
:
FullPage
Unit Price
:
3000.0000
:
No of Dates
:
SlotType
: Grand Total-----------------------this is my problem area
Unit Price
: 32,000.00 please send soluton as posssible
this is my grid
-----------------
<asp:GridView ID="GridTotal" runat="server" AutoGenerateColumns="False" AutoGenerateSelectButton="True" CssClass="footable"
CellPadding="4" GridLines="None" OnRowDataBound="GridTotal_RowDataBound"
OnRowEditing="GridTotal_RowEditing" OnSelectedIndexChanged="GridTotal_SelectedIndexChanged" ShowFooter="True" OnPageIndexChanging="GridTotal_PageIndexChanging" ForeColor="#333333" Style="max-width: 1000px">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<%--<asp:TemplateField HeaderText="Price Id">
<ItemTemplate>
<div class="section">
<label class="field ">
<%#Container.DataItemIndex+1 %>
</label>
</div>
</ItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField HeaderText="Add Id">
<ItemTemplate>
<div class="section">
<label class="field">
<asp:Label ID="lbladdid" runat="server" Text='<%# Eval("AdvAddId") %>'></asp:Label>
</label>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Selected Dates" SortExpression="AdvtPostingDates">
<ItemTemplate>
<div class="section">
<label class="field">
<%#Eval("AdvtPostingDates","{0:DD/MM/YYYY}") %>
</label>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="No of Dates">
<ItemTemplate>
<div class="section">
<label class="field ">
<%#Eval("TotalPostingDays") %>
</label>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField FooterStyle-Height="50px" HeaderText="SlotType">
<ItemTemplate>
<div class="section">
<label class="field ">
<%#Eval("SlotType") %>
</label>
</div>
</ItemTemplate>
<%--<FooterTemplate>
<asp:Label runat="server" Text="Total Price"></asp:Label>
</FooterTemplate>--%>
<FooterStyle Height="50px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Unit Price">
<ItemTemplate>
<div class="section">
<label class="field ">
<%#Eval("TotalPrice") %>
</label>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<%-- <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />--%>
</asp:GridView>
<script type="text/javascript">
$(function () {
$('[id*=GridTotal]').footable();
});
</script>
<link href="../css/footable.min.css"
rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/footable.min.js"></script>
</div>
--------------------------------------
And .cs code is of bindgrid
private void BindGrid()
{
dbo.AdvertiserId = Convert.ToInt32(Session["AId"]);
dt = bl.AdvertiserTotalPrice(dbo);
//foreach(DataRow orow in dt.Rows)
GridTotal.DataSource = dt;
GridTotal.DataBind();
//code here.
if (GridTotal.PageCount != 0)
{
GridTotal.HeaderRow.Cells[0].Attributes["data-hide"] = "phone";
GridTotal.HeaderRow.Cells[1].Attributes["data-class"] = "expand";
//Attribute to hide column in Phone.
//GridTotal.HeaderRow.Cells[2].Attributes["data-hide"] = "phone";
GridTotal.HeaderRow.Cells[3].Attributes["data-hide"] = "phone";
GridTotal.HeaderRow.Cells[4].Attributes["data-hide"] = "phone";
GridTotal.HeaderRow.Cells[5].Attributes["data-hide"] = "phone";
//GridTotal.HeaderRow.Cells[5].Attributes["data-class"] = "expand";
GridTotal.HeaderRow.TableSection = TableRowSection.TableHeader;
decimal total = dt.AsEnumerable().Sum(row => row.Field<decimal>("TotalPrice"));
GridTotal.FooterRow.Cells[4].Text = "Grand Total";
GridTotal.FooterRow.Cells[4].HorizontalAlign = HorizontalAlign.Right;
GridTotal.FooterRow.Cells[5].Text = total.ToString("N2");
}
Reply
Answers (
0
)
How to get the controller session value in layout page
Need to save the date month year in asp.net using calendar