September 9, 2014

Convert a comma separated list into table

In this post, we are going to learn “how we can convert a comma separated list into a table using a recursive CTE”. Below is the code: Why OPTION MAXRECURSION? Hint OPTION(MAXRECURSION 32767) is a query hint which instructs to compiler to iterate 32767 times. Default, max recursion of a loop in SQL is 100 and in case we […]

Convert a comma separated list into table Read More »

Set Width of gridview columns dynamically when AutoGenerateColumns is true

Introduction I faced a lot of problems when I asked to set the width of a gridview dynamically, that is the property AutoGenerateColumns set to AutoGenerateColumns=”true” and the gridview was directly bounded from a dataset in code behind. Thus, we don’t have bound fields to set the width of columns individually. I tried a lot

Set Width of gridview columns dynamically when AutoGenerateColumns is true Read More »