Custom List with Business Object Scripted
Good Morning, i need an help, because i would have the necessity to implement a Custom List using a
scipted Business Object but I doesn't succeed in managing in corrected
way the interface IPAGEDACCESS and IINDEXACCESS, does someone have an
example to pass me?
thanks a lot
Comments
-
Hi Alex,
Try adding this code snipped to your BO script. Also set your BO to implement IPagedAccess of course. _ds is the variable name for your DataSet-
#region IPagedAccess methods
public virtual int PageSize
{
get
{
return _pageSize;
}
}
public int CurrentPage
{
get
{
return _currentPage;
}
}
public int RequestPage
{
get
{
return CurrentPage;
}
set
{
_currentPage = value;
}
}
public IList<KeyValuePair<string, Metastorm.Runtime.Contracts.SortDirection>> SortColumns
{
get
{
return _sortOrder;
}
set
{
_sortOrder = value;
}
}
public Metastorm.Runtime.Contracts.Mbo.IBusinessObjectFilter Filter
{
get;
set;
}
public int TotalPageCount
{
get
{
int iPages = 0;
if (_ds != null)
{
if (_ds.Tables.Count > 0)
{
iPages = _ds.Tables[0].Rows.Count / PageSize;
if (_ds.Tables[0].Rows.Count % PageSize != 0)
{
iPages++;
}
}
}
return iPages;
}
}
public int TotalRowCount
{
get
{
if (_ds != null)
{
if (_ds.Tables.Count > 0)
{
return _ds.Tables[0].Rows.Count;
}
}
return 0;
}
}
#endregion IPagedAccess methods
0 -
Hi Ari,
thank you for the solution, but i have a last problem with the sort..
i declare a _sort as IList<KeyValuePair<string, Metastorm.Runtime.Contracts.SortDirection>> but with the solution that you propose, the sortColumn not work well..
Can you help me?
Best Regards
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 152 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories