I am having a column in my table with lengthy text that requires scrolling to see the end. Is there a way to adjust the content to fit within a fixed-width cell?
Here is the UI setup for the GridView:
<asp:GridView ID="GridView1" runat="server" OnPageIndexChanging="PageIndexChanging_Click"
style="height: 166px; width: 217px; z-index: 1; left: 16px; top: 252px; position: absolute"
EmptyDataText="No Records Within this time Frame" >
<PagerSettings LastPageText="Last" />
</asp:GridView>
//Code Behind:
private void GetData()
{
string fromdata = txt_fromdate.Text;//" '2013-09-23 11:06:00.077'";
string todate = txt_todata.Text;//" '2013-09-23 11:28:25.163' ";
string querstring = "select * from gt_transaction_log where LogTimeStamp between" +"'"+ fromdata +"'"+ " and " +"'"+ todate + "'";
SqlDataAdapter adapter = new SqlDataAdapter(querstring, conn);
DataTable dt = new DataTable();
GridView1.AllowPaging = true;
if (TextBox1.Text != "" && int.Parse(TextBox1.Text) != 0)
{
GridView1.PageSize = int.Parse(TextBox1.Text);
}
else
{ GridView1.PageSize = 10; }
adapter.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}