Bind Large length data in GridView
-
I am showing a description field with 2000 Chars to a grid view. i want to display in the grid view the only first 20 or 30 characters only and not all the characters in this field. At the END of the 20/ 30 chars I wish to display More.. Hyperlink. When the user explicitly click the link, then I wish to display all the 2000 chars. Help me get start with. Thanks
Jey
-
I am showing a description field with 2000 Chars to a grid view. i want to display in the grid view the only first 20 or 30 characters only and not all the characters in this field. At the END of the 20/ 30 chars I wish to display More.. Hyperlink. When the user explicitly click the link, then I wish to display all the 2000 chars. Help me get start with. Thanks
Jey
-
I am showing a description field with 2000 Chars to a grid view. i want to display in the grid view the only first 20 or 30 characters only and not all the characters in this field. At the END of the 20/ 30 chars I wish to display More.. Hyperlink. When the user explicitly click the link, then I wish to display all the 2000 chars. Help me get start with. Thanks
Jey
Use
substring
function either in your query or in GridView itemdatabound event. More link also can be added from ItemDataBound event
-
Satips wrote:
Hope this[^] will give an idea.
Satips, This article talks about some other concept not related to the original question. I am not getting why you are passing links and doing googling for them :confused:.
-
Use
substring
function either in your query or in GridView itemdatabound event. More link also can be added from ItemDataBound event
Navneeth, Thanks for your reply. Actaully I would like to Bind data in gridview. I have been used Export to Excel functionality also. I have been used below piece of style to show only one line... ; Export Excel also works fine & displays whole text. text-overflow:ellipsis; overflow:hidden I will try with your idea and let you know.
Jey