<
telerik:RadGrid
ID
=
"grd1"
runat
=
"server"
AllowFilteringByColumn
=
"True"
AllowPaging
=
"True"
AllowCustomPaging
=
"true"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
OnItemDataBound
=
"grd1_OnItemDataBound"
OnItemCreated
=
"grd1_ItemCreated"
Width
=
"100%"
Skin
=
"Windows7"
ShowGroupPanel
=
"false"
CellSpacing
=
"0"
PageSize
=
"50"
OnNeedDataSource
=
"grd1_NeedDataSource"
OnPageIndexChanged
=
"grd1_PageIndexChanged"
OnPageSizeChanged
=
"grd1_PageSizeChanged"
>
protected void grd1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
grd1.VirtualItemCount = 100000;
grd1.DataSource = GetDataSource();
grd1.DataBind();
}
private IEnumerable<
SearchClass
> Select(int pageSize, int pageIndex)
{
IQueryable<
SearchClass
> searchObj = DataClassLib.Search(pageSize, pageIndex).AsQueryable();
try
{
searchObj = searchObj .Select(x => new SearchClass
{
Id = x.Id,
Name = x.Name,
});
}
catch (Exception ex)
{
throw ex;
}
return searchObj;
}
private IEnumerable<
SearchClass
> GetDataSource()
{
int pageIndex = grd1.CurrentPageIndex;
int pageSize = grd1.PageSize;
if (pageIndex == 0)
pageIndex = 1;
IEnumerable<
SearchClass
> data = Select(pageSize,pageIndex);
return data == null ? new List<
SearchClass
>() : data.Skip(pageSize * pageIndex).Take(pageSize);
}
GetDataSource()
that returns 50 records but when debug point comes to grd1.DataSource = GetDataSource();
this line in datasource it show me 0 count.@(Html.Telerik().Grid<CustomerProductPriceModel>()
.Name("Grid")
.DataKeys(x =>
{
x.Add(y => y.Customer_Id);
})
.DataBinding(dataBinding =>
{
dataBinding.Ajax()
.Select("CustomerProductPriceList", "controller", new { productVariantId = Model.Id })
.Update("CustomerPriceUpdate", "controller", new { productVariantId = Model.Id })
.Delete("CustomerPriceUpdate", "controller", new { productVariantId = Model.Id });
})
.Columns(columns =>
{
columns.Bound(y => y.Customer_name).Width(200).ReadOnly();
columns.Bound(y => y.Price).Width(100);
columns.Command(commands =>
{
commands.Edit().Text(T("Admin.Common.Edit").Text);
commands.Delete().Text(T("Admin.Common.Delete").Text);
}).Width(180);
})
.Editable(x =>
{
x.Mode(GridEditMode.InLine);
})
.EnableCustomBinding(true)
)
Hi everyone,
I'd like you to check this web designer created using Knockout.js, JQuery JQueryui and other cool js plugins.
It's part of a Javascript framework WUIC, i developed in the last year.
You can create pages and dashboards using HTML, SVG, 3D primitives (for 3D your browser need to support WebGL and currently only Chrome works flawlessly. Firefox need to enable WebGL in about:config).
Click on "Tutorial" button to watch the clips that shows what you can do with it.
 
What do you think ?
Any feedback is really appreciated.
 
Kind Regards
 
Lorenzo Castrico
 
http://www.wuic.it
http://designer.wuic.it
Hello!
I would like to know how to delete the telerik user account I had to create in order to download a trial version a while ago. Unfortunately, I couldn't find any hints on how to do this. :-( Maybe someone here can help me to remove the account?
Any help appreciated.
Thanks in advance!