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
Rowshan Ali
NA
64
143.2k
Export to excel gridview based on specific column.?
May 27 2013 11:00 PM
hello dear
i m in problems.
i need to export gridview to excel based on specidic column such as WONo, Description, QtyWo. how can i do it ? if any body help me best regurds.
<
table
class
=
"style1"
>
<
tbody
>
<
tr
>
<
td
colspan
=
"4"
>
<
div
id
=
"ContentPlaceHolder1_divbix"
>
<
div
>
<
table
id
=
"ContentPlaceHolder1_GridView1"
border
=
"1"
rules
=
"all"
cellspacing
=
"0"
style
=
"width: 900px; border-collapse: collapse;"
>
<
tbody
>
<
tr
style
=
"background-color: #9933ff; color: aqua;"
>
<
th
scope
=
"col"
>
VIEW
</
th
>
<
th
scope
=
"col"
>
Update
</
th
>
<
th
scope
=
"col"
>
WOId
</
th
>
<
th
scope
=
"col"
>
WONo
</
th
>
<
th
scope
=
"col"
>
PRNo
</
th
>
<
th
scope
=
"col"
>
Description
</
th
>
<
th
scope
=
"col"
>
QtyWo
</
th
>
<
th
scope
=
"col"
>
Date
</
th
>
<
th
scope
=
"col"
>
Price
</
th
>
<
th
scope
=
"col"
>
Approval
</
th
>
<
th
scope
=
"col"
>
WOSL
</
th
>
<
th
scope
=
"col"
>
Usersn
</
th
>
</
tr
>
<
tr
>
<
td
>
<
span
style
=
"background-color: activecaption; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbView_0"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl02$ChbView"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbView_0"
>
13
</
label
>
</
span
>
</
td
>
<
td
>
<
span
style
=
"background-color: red; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbUpdate_0"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl02$ChbUpdate"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbUpdate_0"
>
13
</
label
>
</
span
>
</
td
>
<
td
title
=
"13"
>
13
</
td
>
<
td
title
=
"WO-1"
>
WO-1
</
td
>
<
td
title
=
"PR-1"
>
PR-1
</
td
>
<
td
title
=
"FB LABEL_NANO TAG"
>
FB LABEL_NANO TAG
</
td
>
<
td
title
=
"15000"
>
15000
</
td
>
<
td
title
=
"5/15/2013"
>
5/15/2013
</
td
>
<
td
title
=
"20.0000"
>
20.0000
</
td
>
<
td
title
=
"True"
>
True
</
td
>
<
td
title
=
"52"
>
52
</
td
>
<
td
title
=
" "
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
span
style
=
"background-color: activecaption; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbView_1"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl03$ChbView"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbView_1"
>
13
</
label
>
</
span
>
</
td
>
<
td
>
<
span
style
=
"background-color: red; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbUpdate_1"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl03$ChbUpdate"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbUpdate_1"
>
13
</
label
>
</
span
>
</
td
>
<
td
title
=
"13"
>
13
</
td
>
<
td
title
=
"WO-1"
>
WO-1
</
td
>
<
td
title
=
"PR-1"
>
PR-1
</
td
>
<
td
title
=
"Master carton 52*80_NANO TAG"
>
Master carton 52*80_....
</
td
>
<
td
title
=
"5000"
>
5000
</
td
>
<
td
title
=
"5/15/2013"
>
5/15/2013
</
td
>
<
td
title
=
"20.0000"
>
20.0000
</
td
>
<
td
title
=
"True"
>
True
</
td
>
<
td
title
=
"53"
>
53
</
td
>
<
td
title
=
" "
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
span
style
=
"background-color: activecaption; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbView_2"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl04$ChbView"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbView_2"
>
14
</
label
>
</
span
>
</
td
>
<
td
>
<
span
style
=
"background-color: red; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbUpdate_2"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl04$ChbUpdate"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbUpdate_2"
>
14
</
label
>
</
span
>
</
td
>
<
td
title
=
"14"
>
14
</
td
>
<
td
title
=
"Wo-ch"
>
Wo-ch
</
td
>
<
td
title
=
"PR-ch"
>
PR-ch
</
td
>
<
td
title
=
"Gray color_Gray color"
>
Gray color_Gray colo....
</
td
>
<
td
title
=
"500"
>
500
</
td
>
<
td
title
=
"5/19/2013"
>
5/19/2013
</
td
>
<
td
title
=
"20.0000"
>
20.0000
</
td
>
<
td
title
=
"True"
>
True
</
td
>
<
td
title
=
"54"
>
54
</
td
>
<
td
title
=
"rowshan"
>
rowshan
</
td
>
</
tr
>
<
tr
>
<
td
>
<
span
style
=
"background-color: activecaption; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbView_3"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl05$ChbView"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbView_3"
>
15
</
label
>
</
span
>
</
td
>
<
td
>
<
span
style
=
"background-color: red; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbUpdate_3"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl05$ChbUpdate"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbUpdate_3"
>
15
</
label
>
</
span
>
</
td
>
<
td
title
=
"15"
>
15
</
td
>
<
td
title
=
"PRE1888-WO-1"
>
PRE1888-WO-1
</
td
>
<
td
title
=
"PRE1888-PR-01"
>
PRE1888-PR-01
</
td
>
<
td
title
=
"MASTER CARTON UNPRINTED - 50X27 30.5_"
>
MASTER CARTON UNPRIN....
</
td
>
<
td
title
=
"5000"
>
5000
</
td
>
<
td
title
=
"5/11/2013"
>
5/11/2013
</
td
>
<
td
title
=
"100.0000"
>
100.0000
</
td
>
<
td
title
=
"False"
>
False
</
td
>
<
td
title
=
"55"
>
55
</
td
>
<
td
title
=
"rowshan"
>
rowshan
</
td
>
</
tr
>
<
tr
>
<
td
>
<
span
style
=
"background-color: activecaption; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbView_4"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl06$ChbView"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbView_4"
>
15
</
label
>
</
span
>
</
td
>
<
td
>
<
span
style
=
"background-color: red; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbUpdate_4"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl06$ChbUpdate"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbUpdate_4"
>
15
</
label
>
</
span
>
</
td
>
<
td
title
=
"15"
>
15
</
td
>
<
td
title
=
"PRE1888-WO-1"
>
PRE1888-WO-1
</
td
>
<
td
title
=
"PRE1888-PR-01"
>
PRE1888-PR-01
</
td
>
<
td
title
=
"MASTER CARTON UNPRINTED - 58X37 22.5_"
>
MASTER CARTON UNPRIN....
</
td
>
<
td
title
=
"4000"
>
4000
</
td
>
<
td
title
=
"5/11/2013"
>
5/11/2013
</
td
>
<
td
title
=
"200.0000"
>
200.0000
</
td
>
<
td
title
=
"False"
>
False
</
td
>
<
td
title
=
"56"
>
56
</
td
>
<
td
title
=
"rowshan"
>
rowshan
</
td
>
</
tr
>
<
tr
>
<
td
>
<
span
style
=
"background-color: activecaption; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbView_5"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl07$ChbView"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbView_5"
>
18
</
label
>
</
span
>
</
td
>
<
td
>
<
span
style
=
"background-color: red; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbUpdate_5"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl07$ChbUpdate"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbUpdate_5"
>
18
</
label
>
</
span
>
</
td
>
<
td
title
=
"18"
>
18
</
td
>
<
td
title
=
"WO-Yea"
>
WO-Yea
</
td
>
<
td
title
=
"PR-Y"
>
PR-Y
</
td
>
<
td
title
=
"10% cotton_"
>
10% cotton_
</
td
>
<
td
title
=
"200"
>
200
</
td
>
<
td
title
=
"5/27/2013"
>
5/27/2013
</
td
>
<
td
title
=
"10.0000"
>
10.0000
</
td
>
<
td
title
=
"False"
>
False
</
td
>
<
td
title
=
"57"
>
57
</
td
>
<
td
title
=
"rowshan"
>
rowshan
</
td
>
</
tr
>
<
tr
>
<
td
>
<
span
style
=
"background-color: activecaption; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbView_6"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl08$ChbView"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbView_6"
>
18
</
label
>
</
span
>
</
td
>
<
td
>
<
span
style
=
"background-color: red; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbUpdate_6"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl08$ChbUpdate"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbUpdate_6"
>
18
</
label
>
</
span
>
</
td
>
<
td
title
=
"18"
>
18
</
td
>
<
td
title
=
"WO-Yea"
>
WO-Yea
</
td
>
<
td
title
=
"PR-Y"
>
PR-Y
</
td
>
<
td
title
=
"10% cotton_100% cotton"
>
10% cotton_100% cott....
</
td
>
<
td
title
=
"1000"
>
1000
</
td
>
<
td
title
=
"5/27/2013"
>
5/27/2013
</
td
>
<
td
title
=
"10.0000"
>
10.0000
</
td
>
<
td
title
=
"False"
>
False
</
td
>
<
td
title
=
"58"
>
58
</
td
>
<
td
title
=
"rowshan"
>
rowshan
</
td
>
</
tr
>
<
tr
>
<
td
>
<
span
style
=
"background-color: activecaption; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbView_7"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl09$ChbView"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbView_7"
>
19
</
label
>
</
span
>
</
td
>
<
td
>
<
span
style
=
"background-color: red; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbUpdate_7"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl09$ChbUpdate"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbUpdate_7"
>
19
</
label
>
</
span
>
</
td
>
<
td
title
=
"19"
>
19
</
td
>
<
td
title
=
"PRE1888-WO-02"
>
PRE1888-WO-02
</
td
>
<
td
title
=
"PRE1888-PR-02"
>
PRE1888-PR-02
</
td
>
<
td
title
=
"FB LABEL_HAND TAG"
>
FB LABEL_HAND TAG
</
td
>
<
td
title
=
"16500"
>
16500
</
td
>
<
td
title
=
"5/26/2013"
>
5/26/2013
</
td
>
<
td
title
=
"12500.0000"
>
12500.0000
</
td
>
<
td
title
=
"False"
>
False
</
td
>
<
td
title
=
"59"
>
59
</
td
>
<
td
title
=
" "
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
span
style
=
"background-color: activecaption; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbView_8"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl10$ChbView"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbView_8"
>
19
</
label
>
</
span
>
</
td
>
<
td
>
<
span
style
=
"background-color: red; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbUpdate_8"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl10$ChbUpdate"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbUpdate_8"
>
19
</
label
>
</
span
>
</
td
>
<
td
title
=
"19"
>
19
</
td
>
<
td
title
=
"PRE1888-WO-02"
>
PRE1888-WO-02
</
td
>
<
td
title
=
"PRE1888-PR-02"
>
PRE1888-PR-02
</
td
>
<
td
title
=
"WK-STRICKER_NANO TAG"
>
WK-STRICKER_NANO TAG
</
td
>
<
td
title
=
"10000"
>
10000
</
td
>
<
td
title
=
"5/26/2013"
>
5/26/2013
</
td
>
<
td
title
=
"1222.0000"
>
1222.0000
</
td
>
<
td
title
=
"False"
>
False
</
td
>
<
td
title
=
"60"
>
60
</
td
>
<
td
title
=
" "
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
span
style
=
"background-color: activecaption; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbView_9"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl11$ChbView"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbView_9"
>
18
</
label
>
</
span
>
</
td
>
<
td
>
<
span
style
=
"background-color: red; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbUpdate_9"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl11$ChbUpdate"
/>
<
label
for
=
"ContentPlaceHolder1_GridView1_ChbUpdate_9"
>
18
</
label
>
</
span
>
</
td
>
<
td
title
=
"18"
>
18
</
td
>
<
td
title
=
"WO-Yea"
>
WO-Yea
</
td
>
<
td
title
=
"PR-Y"
>
PR-Y
</
td
>
<
td
title
=
"10% cotton_"
>
10% cotton_
</
td
>
<
td
title
=
"300"
>
300
</
td
>
<
td
title
=
"5/27/2013"
>
5/27/2013
</
td
>
<
td
title
=
"20.0000"
>
20.0000
</
td
>
<
td
title
=
"False"
>
False
</
td
>
<
td
title
=
"61"
>
61
</
td
>
<
td
title
=
" "
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
span
style
=
"background-color: activecaption; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbView_10"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl12$ChbView"
/>
</
span
>
</
td
>
<
td
>
<
span
style
=
"background-color: red; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbUpdate_10"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl12$ChbUpdate"
/>
</
span
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
span
style
=
"background-color: activecaption; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbView_11"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl13$ChbView"
/>
</
span
>
</
td
>
<
td
>
<
span
style
=
"background-color: red; color: aqua; font-weight: bold;"
>
<
input
id
=
"ContentPlaceHolder1_GridView1_ChbUpdate_11"
type
=
"checkbox"
name
=
"ctl00$ContentPlaceHolder1$GridView1$ctl13$ChbUpdate"
/>
</
span
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
"Grand Total"
>
Grand Total
</
td
>
<
td
title
=
"57500"
>
57500
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
<
td
title
=
" "
>
</
td
>
</
tr
>
</
tbody
>
</
table
>
</
div
>
</
div
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style5"
>
</
td
>
<
td
class
=
"style6"
>
</
td
>
<
td
>
</
td
>
</
tr
>
</
tbody
>
</
table
>
Reply
Answers (
1
)
C sharp multiple inheritence...
C# specefic language features