This is a migrated thread and some comments may be shown as answers.

[Solved] Grid is not displaying right data for Int64

1 Answer 107 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Munish
Top achievements
Rank 1
Munish asked on 22 Jun 2012, 08:17 PM
Hi ,
I am showing data of a table in Telerik MVC Grid.
But Grid is not showing right values for columns with datatype Int64.

I have put code below and attached screen shot of Database data and grid.
See, it is always replacing last value with 0.

Please help me to solve.

Thanks!
Munish S.

@(Html.Telerik().Grid<PowerEPC.Management.DAL.AffiliatePixel>()
        .Name("Grid")
        .DataKeys(keys => keys.Add(c => c.ID))
            
        .Columns(columns =>
        {
            columns.Bound(c => c.ID).Width(150).Title("ID");          
            columns.Bound(c => c.AffiliateId).Width(80).Title("Affiliate ID");
            columns.Bound(c => c.CampaignId).Width(80).Title("Campaign ID")
            .ClientTemplate("<a href=\"PixelRule/Index?CampaignId=<#= CampaignId #>\"><#= CampaignId #></a>");
             
            columns.Bound(o => o.PixelUrl).Width(300).Title("Pixel Url");         
            columns.Bound(o => o.ScrubPercentage).Width(50).Title("Scrub").ClientTemplate("<#= ScrubPercentage #> %");
            columns.Bound(c => c.TrackedEntityId).Width(150).Title("Tracked Entity ID");
            columns.Bound(o => o.ID).Width(60).ClientTemplate("<a  href=\"/AffiliatePixel/Edit?affiliateId=<#= AffiliateId #>&CampaignId=<#= CampaignId #>\">Edit</a>").Title("");
            columns.Bound(o => o.ID).Width(60).ClientTemplate("<a  href=\"/AffiliatePixel/Delete?affiliateId=<#= AffiliateId #>&CampaignId=<#= CampaignId #>\">Delete</a>").Title("");  
        })
          .DataBinding(dataBinding => dataBinding.Ajax().Select("_Index", "AffiliatePixel"))
                                             .Sortable(sorting => sorting
                                        .OrderBy(sortOrder => sortOrder.Add(o => o.AffiliateId))
                            ).Scrollable()
                                             .Pageable(paging => paging.PageSize(10)).Filterable()  
         
 
 
    )
//
       // GET: /AffiliatePixel/
 
       public ViewResult Index()
       {
           return View();
       }
 
 
 
       [GridAction]
       public ActionResult _Index()
       {
 
           return PartialView(new GridModel<AffiliatePixel>
           {
               Data = db.AffiliatePixels.Where(c=>c.IsDeleted==false)
           });
 
       }

1 Answer, 1 is accepted

Sort by
0
Munish
Top achievements
Rank 1
answered on 29 Jun 2012, 08:59 AM
Can Some body from telerik provide me Suppor.
i am waiting for last three days
Tags
General Discussions
Asked by
Munish
Top achievements
Rank 1
Answers by
Munish
Top achievements
Rank 1
Share this question
or