C
cpnet
I have searched for this, but I'm not having much luck. I know in my .aspx
page, I can use <%# Eval(...) %> to render values from my SqlDatasource into
my page. But, Eval doesn't support the formatting I want. (I'm pulling a
description field from the database, and if it's more than 57 characters
long, I want to truncate the text and put "..." at the end). I'm not clear
on what GridView event I should be using (but I'm guessing RowDataBound).
I'm also not clear how in my code I get the value from my database field for
the current row, and how I set the proper page contol's text once I've
formatted it the way I want.
page, I can use <%# Eval(...) %> to render values from my SqlDatasource into
my page. But, Eval doesn't support the formatting I want. (I'm pulling a
description field from the database, and if it's more than 57 characters
long, I want to truncate the text and put "..." at the end). I'm not clear
on what GridView event I should be using (but I'm guessing RowDataBound).
I'm also not clear how in my code I get the value from my database field for
the current row, and how I set the proper page contol's text once I've
formatted it the way I want.