i looking @ trial of ajax browser control ithit. far seems pretty responsive when comes pulling files across http protocol.
what want @ point have details view pull custom properties excel workbooks. efficient way connect c# code gets custom properties ajax control display correct values?
the easiest way create custom column return custom property webdav server. in example below server returns price in pricesns:retailprice property.
on client side define custom column , specify custom property name , namespace:
{ id: 'mycolumn1', custompropertyname: 'retailprice', custompropertynamespace: 'pricesns', text: 'retail price', width: '150px' } another approach return html formatter function specified column. have full control on being displayed in case.
you can find more details , example in article: http://www.webdavsystem.com/ajaxfilebrowser/programming/grids_customization/
in case webdav server running on hit webdav server engine, return requested property, must implement ihierarchyitem.getproperties method (or asynchronous counterpart):
public ienumerable<propertyvalue> getproperties(ilist<propertyname> names, bool allprop) { if (allprop) { return getpropertyvalues(); } list<propertyvalue> propvals = new list<propertyvalue>(); foreach(propertyname propname in names) { if( (propname.namespace == "pricesns") && (propname.name == "retailprice") ) { // depending on item return different price, // here sake of simplicity return 1 price regerdless of item propvals.add(new propertyvalue(propname, "100")); } else { ... } } return propvals; }
Comments
Post a Comment