Wednesday, January 20, 2010

Telerik RAD Grid

Its been long writing here as friends became quiet busy with personal life....
Finally got to do some interesting work and hence found something to share with you all.
The problem is how would you create a Hierarchy of data (something which shows of hierarchy of staff in an organization) with in a grid , say it could be ListView, DataGrid, Gridview etc...
One thing comes to our mind is to use the nested controls and create them dynamically as and whenrequired.
Very true, I can place the ListView, DataGrid, orGridview within a ListView, DataGrid, or Gridview and show them accordingly. But do we know how much would the depth of the tree be and how many controls do you have to define at design time.
And What kind of coding complexity might come to you to get this done?
So, finally I switched to RAD Controls for the same feature is available at the below link with an example:
http://www.telerik.com/help/aspnet/grid/grdselfreferencinghierarchy.html
And it worked so cool that the development time was also too less...
Just get the code as required but the following fields are important:
MasterTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" EnableNoRecordsTemplate="false" DataKeyNames= "ID,ParentID" Width="100%">
DataKeyNames attributes are the one table columns which are used through in the Grid Query and to use RadGrid1.MasterTableView.FilterExpression
ParentKeyName is the column to find the root of hierarchy and KeyName is the column which is associated with parentId.
You can enable expand and column hierarchy by just making the property ClientSettings AllowExpandCollapse="true" />
Inorder to make the columns width fixed as you collapse, make the property as : would show the pager only for master data instead of hierarchical data and columns are fixed in lenght as and when you expland the tree structure.
And one more thing, if you want the header to be shown for child records,
You need to tweak some code as follows:
if (e.Item is GridHeaderItem && e.Item.OwnerTableView != Grid1.DetailsView) { e.Item.Style["display"] = "none"; }
in the RadGrid_itemcreated event.
This was quite interesting to do with less effort and much more productive work.
Note that using trial version of Telerik may not work as expected or documented in telerik site, so use the developer version of the controls.
Happy Coding....

Saturday, November 15, 2008

Inactive Connections in Oracle9i

Few days ago, there was a strange problem I came across in my site. The site was down displaying " TNS listener couldnt be found" and on analyzing, we found that there were already 150 connections to database and hence has to increase the connections to 300. But this dint solve the problem? There were both active and inactive connections to database wherein inactive connections were not getting closed automatically. Ideally speaking, they should be closed if there is no transaction or query procession done.
On further analysing, a new issue was known to me that .Net Data provider when connected to Oracle, keeps the connections inactive or idle connections. A workaround for this issue recommended by Microsoft was to kill the asp.net worker processes manually, but even this couldnt be an ideal solution.
This problem was fixed in Oracle Data Provided Provided by Oracle Corporation which works with .Net Framework with service Pack 2.
Hope this helps you too.

Friday, October 31, 2008

PERFECTION IN DEVELOPMENT...

Can a developer be perfect in her development?
Is there a need to be perfect in it?
Who is responsible for bugs hindering the perfection?

Business Value of Virtualization.

Virtualization is getting more and more popular these days. Obviously, there is a lot of value to adopt this in the infrastructure. But what would these add in for a Business?




  • Adopting a simple virtualized infrastructure can result in a reduction of up to 35%
    of total annual server costs per user compared with an unvirtualized static x86
    server configuration. It is commonly applied to test and development environments, along with at least some production use.



  • Research finds that the use of more advanced virtualization technology, along
    with increasingly sophisticated systems management tools that manage both the
    guest environments and the virtualization engines themselves, can further extend
    the benefits of virtualization significantly.



  • An optimally managed or "advanced virtualization" infrastructure, described as an
    infrastructure that includes penetration of virtualized servers of more than 25%,
    storage virtualization, and the use of systems management tools, can deliver a
    total reduction of up to 52% per user per year.


There are three types of deployment:
1. Unvirtualized . physical x86 server/physical OS usage/no virtualization and
systems configured at less than 10% capacity
2. Basic virtualization . x86 server consolidation via virtualization without
advanced functionality such as live migration and with limited automation and
management applied selectively; systems achieve from 20% to 40% capacity
utilization; common deployment for test and development scenarios, but limited
production use
3. Advanced virtualization . widely virtualized infrastructure (>25%), including
both server virtualization and at least some storage virtualization; use of
management tools and automation tools such as workload redistribution and
automatic workload migration . used both on live VMs and on cold OS images
. for meeting service-level agreements and availability goals; systems achieve
40% to 60% or more capacity utilization.




By so doing, organizations will gain better utilization of server resources and reductions in
acquisition, deployment, and power and cooling costs.
Further, the reduction of staffing costs and increasing business agility translate into
long-term benefits that for years to come will deliver ongoing returns on the
investment required to put this in place initially.