C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Wrap Long Text Inside the Gridview Column
WhatsApp
Mukesh Kumar
Oct 05
2015
22.6
k
0
2
<
html
>
<
head
runat
=
"server"
>
<
style
type
=
"text/css"
>
.WrapText {
width: 100%;
word-break: break-all;
}
</
style
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
class
=
"WrapText"
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
>
</
asp:ScriptManager
>
<
asp:GridView
ID
=
"MyGrid"
runat
=
"server"
AutoGenerateColumns
=
"False"
DataKeyNames
=
"First_Name"
ForeColor
=
"#333333"
GridLines
=
"Both"
Width
=
"50%"
>
<
AlternatingRowStyle
BackColor
=
"White"
/>
<
Columns
>
<
asp:BoundField
HeaderText
=
"FirstName"
DataField
=
"First_Name"
>
<
ItemStyle
Width
=
"35"
/>
<
HeaderStyle
Width
=
"100px"
/>
</
asp:BoundField
>
<
asp:BoundField
HeaderText
=
"LastName"
DataField
=
"Last_Name"
>
<
ItemStyle
Width
=
"50"
/>
<
HeaderStyle
Width
=
"100px"
/>
</
asp:BoundField
>
</
Columns
>
</
asp:GridView
>
</
div
>
</
form
>
</
body
>
</
html
>
asp.net
Gridview
Wrap Long Text
Up Next
Wrap Long Text Inside the Gridview Column