This is a migrated thread and some comments may be shown as answers.

Telerik Grid Master and Detail Table view alignment issue

1 Answer 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pardha Saradhi
Top achievements
Rank 1
Pardha Saradhi asked on 19 Dec 2010, 06:26 PM
Hi,

I have been working on telerik grid master and detail table view alignment ie i need to align the detail table column width with parent grid row.If i increase/decrease column width of the detail table,then the same alignment must be applied for  master grid and also if i change the parent grid alignment it should be apply to detail table also.
I am trying with the following code ,but not able to get it.

function dragGridColSize()

        {

            debugger;

              var grid = window["<%= grdSearch.ClientID %>"];

                    var masterTableView = $find("<%= grdSearch.ClientID %>").get_masterTableView();

                     for (var masterIndex = 0; masterIndex < masterTableView.get_dataItems().length; masterIndex++)

                     {

                          var masterDataItem = masterTableView.get_dataItems()[masterIndex];

                       

                          var detailtableView=$find('ctl00_cntPageHolder_grdSearch').get_detailsTableView();

                         

                          for(var detailIndex=masterIndex; detailIndex < detailtableView.get_dataItems().length; detailIndex++)

                          {

                             var detailDataItem = detailtableView.get_dataItems()[detailIndex];

                             detailDataItem._element.style.position= masterDataItem._element.style.position;

                          }

                         

                          

                     }

        }

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 23 Dec 2010, 09:11 AM
Hello Pardha,

Do you mean that the javascript throws an error or it does not change anything? If it is the second, have you tried calling repaint() on the grid after you change its dimensions/alignment? Also, is it only position setting that causes problems or width-setting too?

Kind regards,
Tsvetina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Pardha Saradhi
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or