Hi
I am trying to use WHDG in a new web application. I am using code-behind for most of the operations.
I have three questions
1. I want to invert rows and columns of a particular and - basically in cases where there is a single datarow. Is this possible through a class implementing ITemplate ? will it be better to have a usercontrol inside this class which can emit native html or use a table control ? is it possible to maintain the formatting applied to the grid inside this class ?
2. Is there a better option to achieve above ? In WinGrid we used to do these things through cardview or rowlayout ... wonder in which release can we expect these things in WHDG ...
3. is it possible to hide a band programmatically ?
Thanks
Abhishek
Hello,For 1 and 2 my suggestion is to use manual load on demand( please visit the following link for more information - http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=WebHierarchicalDataGrid_Load_On_Demand.html ) and when a new band is about to be loaded to catch the client side event "populating" which is cancelable and to check if the data which is about to be loaded is from a single row. If so then cancel the event and bind the band manualy with switching the rows and columns.For 3 - We currently do not have a property hidden for a band, my suggestion is either to set all the columns to visible="false" or to cancel "expanding" event after checking if the band should be hidden.
Hi Nikifor
Thanks for the reply.
Point no. 3 is OK - I can hide all the columns and it should be fine.
Regarding point no. 1, this band is generally going to be the first band and sometimes the only band. Therefore using manual load on demand would be counter intuitive.
Also inverting rows and columns in data source would not be intuitive as well because in that case the child rowisland can be associated to only one row whereas it is actually child of the record.
Can you please put together a (small) sample showing some initial steps to do this on the server side via itemtemplate or some other such method ?
Hello Abhishek,
Thank you for the follow-up.
I guess that Nikifor meant RowIslandPopulating event handler for this purpose.
The idea with the double columns is if you want to show different columns depending on business logic.
I am not sure what exactly you are trying to implement. Can you explain in more detail (using a dummy data) what do you mean by "Invert columns "?
If this refers only to the order of display you can use the VisibleIndex property of the column .
http://help.infragistics.com/NetAdvantage/ASPNET/2011.2?page=Infragistics4.Web.v11.2~Infragistics.Web.UI.GridControls.ControlDataField~VisibleIndex.html
You can change the order of the columns using this property depending on the conditions.
Please let me know if you need further assistance.
Hope hearing from you
Hi Tsvetelina
Thanks for your reply.
I mean something like this:
http://tim.mackey.ie/HowToInvertDatagridRowsAndColumns.aspx
Thank you for the clarification.
Now I got better idea what you are looking for.
Currently this functionality is not supported by WebHierarchicalDataGrid
I can create a feature request for this in order to be included in the next future releases.
Please let me know if you have further questions.
Can't this be done using ITemplate and adding some control such as verticalgrid shown on the link I gave ?
This control can also take care of hidden property of columns etc while rendering.
I guess that you can add the VerticalGrid in an ItemTemplate but this make the use of WebHierarchicalDataGrid meaningless.
With the same success you can use WebExplorerBar for the purpose
http://samples.infragistics.com/aspnet/Samples/WebExplorerBar/Organization/Templating/Default.aspx?cn=explorer-bar&sid=0c99acc4-dd92-46b9-9aea-94c85c739289
That is why I recommend you creating a feature request about the functionality.
Let me know if you have further questions.