title: Conversion failed when converting the nvarchar value "XX" to data type int while sorting
body: <p>I want to sort my grid view by title of article with a dropdownlist like below picture.
  I connect my grid view to a dataSqlsouce.
  but it gave me this error:
  Conversion failed when converting the nvarchar value "XX" to data type int.
  <img src="https://i.stack.imgur.com/CmFlU.png" alt="enter image description here"></p>
  
  <p>my Sql cod in datasqlsource is:</p>
  
  <pre><code>SELECT addtitle.title, 
         submitmanuscript.status, 
         addarticletype.type, 
         addarticletype.username                           AS Expr1, 
         addarticletype.articletype, 
         submitmanuscript.date, 
         submitmanuscript.articlenum, 
         addarticletype.articleid, 
         CONVERT (VARCHAR(10), submitmanuscript.date, 103) AS date1, 
         addarticletype.checkfinish, 
         rolinfo.* 
  FROM   addarticletype 
         INNER JOIN addtitle 
                 ON addarticletype.articleid = addtitle.articleid 
         INNER JOIN submitmanuscript 
                 ON addarticletype.articleid = submitmanuscript.articleid 
         INNER JOIN rolinfo 
                 ON addarticletype.username = rolinfo.username 
  WHERE  ( addarticletype.articleid IN (SELECT articleid 
                                        FROM   addupload_4 AS AddUpload_4_1 
                                        WHERE 
           ( addarticletype.checkfinish = '0' )) ) 
         AND ( addarticletype.type = @Type ) 
  ORDER  BY CASE 
              WHEN @order = 'AddArticleType.ArticleID' THEN addarticletype.articleid 
              WHEN @order = 'Title' THEN CONVERT(VARCHAR, title) 
              WHEN @order = 'family' THEN family 
              WHEN @order = 'AddArticleType.ArticleType' THEN 
              addarticletype.articletype 
            END 
  </code></pre>
  
  <p>Can any body help me?</p>