IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
Using RadGrid Binder, you can generate additional items like if you want to render dynamic header / footer.
Using RadGrid Binder, you can generate addtional items like if you want to render dynamic header / footer.
The idea is pretty simple, binder fires a OnClientDataBound after binding of all the data item is complete, there you can access the "sender" parameters for additional properties, by which you can dynamic change your content according to the current selection or data.
function
OnSectionDataBound(sender, args) {
var
count = sender.get_itemCount();
context = sender.get_context();
if
(count > 0) {
(context[
"Title"
]) {
$(
"#<%= lblHeader.ClientID %>"
).text(context[
]);
}
"Description"
"#<%= lblDesc.ClientID %>"
So, here you can see that there are two properties that can be useful
public
CollectionContext<MyObject> SomeMethod(
string
param1,
provider)
{
IList<UISectionItem> list = GetMyItems();
var collectionContext =
new
CollectionContext<UISectionItem>(list)
TotalCount = list.Count
};
collectionContext.Context =
Dictionary<
,
>();
collectionContext.Context.Add(
"My Title"
);
"My description"
return
collectionContext;
As, it seems its nothing but a dictionary of strings, that is set to the CollectionContext and which is finally passed to the client via RadGridBinder.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important