Seriel no with in query to bind in gridview
  • To put s.no in grid we can select serial no in query to use over function like below


    Select *,ROW_NUMBER()  OVER (ORDER BY  st_id) As SrNo from
    (
    select distinct(scd.St_id),IncBr.Cyear,tick=0 /*case isnull(cyear,0) when 0 then 0 else 1 end*/ from sem_cadata scd
    left join tblmytest IncBr on scd.st_id=IncBr.st_id and scd.sem=IncBr.Esem and scd.c_year=IncBr.Eyear
    where
    ----scd.sem=@sem and scd.c_year=@year
    scd.sem + '-' + cast(scd.c_year as varchar)=@semester
    ) t
    order by st_id

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week