title: disappearing last column from data source in vb.net
body: <p>I have a stored procedure like this:</p>
  
  <pre><code>ALTER procedure [dbo].[fetchkey]
  @carid nvarchar(50) =null
  as
  begin
   select t.TBarcode, t.Status,[dbo].[keyloc](t.status,@carid) as 'keylocation'
   from Transaction_tbl t 
   where t.TBarcode=@carid
  end
  </code></pre>
  
  <p>Also i have function like this:</p>
  
  <pre><code>ALTER function [dbo].[keyloc](@status numeric(18,2),@cardID VARCHAR(50)) RETURNS varchar(50)
  as 
  begin 
    @Ename nvarchar(50)
   , @keylocation  Varchar(50)
  
   if @status=0 
  begin 
   select @keylocation= 0 
  end
   return @keylocation
  end
  </code></pre>
  
  <p>while executing my stored procedure i am getting out put like this:</p>
  
  <pre><code>TBarcode             Status      keylocation
  53012364813          0             0
  </code></pre>
  
  <p>am filling this data to directly data grid view ,here my vb.net code</p>
  
  <pre><code>Dim cmd As New SqlCommand("fetchkey", con.connect) 
  cmd.CommandType = CommandType.StoredProcedure 
  cmd.Parameters.Add("@carid", SqlDbType.Int).Value = carid     
  da.SelectCommand = cmd
  da.Fill(ds)
  DGVDashBoard.DataSource = ds.Tables(0).    
  </code></pre>
  
  <p>if i bind like this,in data grideviw i am getting 3 column.in data grid view i want to display only Tbarcode value and status value.also i want to show the particular data grid view row in red color becouse of the keylocation 0.how i can achieve this.if any one know how to do,please help me.</p>