Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
179 views
I have a grid that has a hidden column (the Id) 

 

<telerik:GridBoundColumn DataField="Id" Display="False" Visible="false" 
           FilterControlAltText="Filter column column" UniqueName="column" >
       </telerik:GridBoundColumn>

This works fine for the grid, however when I edit or add a new record (in a popup) the Id shows up.  I can set ReadOnly="true"  which works fine for inserting a new record, this however does not work for editing an existing record.  When ReadOnly is set to true I am unable to get the Id of the record for an update. 

What am I missing here?

Thanks
Antonio Stoilkov
Telerik team
 answered on 24 Nov 2011
8 answers
344 views
Hi,

I am using RadEditor inside RadDock. In my application (Sharepoint webparts) the radDocks are dynamically created using an hidden updatepanel. In each raddock I have an UpdatePanel in order to update dynamically its content.

The first time I open a raddock with an editor inside, the editor is not editable in chrome, internet explorer and firefox. The tools are not rendered  in internet explorer. If I refresh the page with full postback, the editor starts to work correctly in all browsers.

I tried to place an hidden radeditor  (style="display: none") in my page in order to load javascript files the first time page is rendered but it does not solved my problem.

Any ideas?



Michael Pinheiro
Rumen
Telerik team
 answered on 24 Nov 2011
1 answer
158 views
Hi,
 
I am trying to open a new radtab on every Search button click. So basically the home page,
opens in a tab which shows a textbox & search button. Then Everytime a user clicks on Search button I need to grab the search result & display in a  grid in a new tab. (so if search is clicked 3 times.. there will be 3 additional tabs). How can I achive this functionality?

I was able to create a new tab for each click on button ("search"). The tab opens fine but the grid doesnt display. Not sure where I am going wrong. Can somebody please throw some light if there is any example scenario will be highly appreciated.

During the debug I can see the result set is passsed to the new tab without any issue.

Thank you
Dimitar Terziev
Telerik team
 answered on 24 Nov 2011
1 answer
125 views

We have implemented telerik TABs Load On Demand method.  We have added RadTabStrip in main usercontrol ( TopTab.ascx ).  For each pageview of tab strip, we have added separate usercontrols and set RadAjaxManager property EnabledAjax="true"

 

We are facing problem as javascript functions and validations written on usercontrols of child tabs are not getting rendered.


Below is our page structure

 

Master Page >  Client.aspx > TopTab.ascx ( user control ) > RadTabStrip ( RadTabStrip contains multiple tabs)

 

Out Of these multiple tabs we have sub tabs in 2 Tabs. For each of these sub tabs including main tabs, we have usercontrols.

 

Please suggest for rendering javascripts which are part of child / sub tabs used in our scenario.

Regards,

Sunil

Bozhidar
Telerik team
 answered on 24 Nov 2011
4 answers
229 views
Hi Telerik,

When i add a control on my page I am getting sys.argumentundefinedexception value cannot be undefined. I have not written any code just added a control on my page and its showing above javascript exception. I am using 2010.3.1317.35 telerik.Web.UI dll.
Attached file is snap shot of error got.
Manishkumar
Top achievements
Rank 1
 answered on 24 Nov 2011
0 answers
108 views
Hi,

 I am opening a Radwindow (say mainwindow) which has usercontrol in it. The user control contains some buttons and a radgrid. I am trying to open one more child radwindow by clicking on one of the buttons 2nd radwindow opens.

The issue is when if place radgrid  in usercontrol then 2nd radwindow does not open, but if I remove radgrid then 2nd radwindow opens.

Can anyone tell me what might be the issue.

from MainPage---> opens Radwindow(usercontrol with button & radgrid)------->button click opens-------->radwindow (if radgrid on usercontrol doesnot exists)

Regards,
Shobha
sho
Top achievements
Rank 1
 asked on 24 Nov 2011
1 answer
61 views
Hi,
I am creating  a  dynamic nested  grid  to replicate grid displayed in following site.
 http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx

When I expand  an item in child grid to display grandChild grid, the nestedview template on top level  is empty and  I lose all controls. How can I persist nested grids  on post back.


Here is my code to create root grid, child grid is also created with same logic.

1.
  protected void Page_Init(object source, System.EventArgs e)
        {
            try
            {      
                RadGrid rootGrid = CreateDynamicGrid("Ticket");
                NGridPlaceHolder.Controls.Add(rootGrid);
            }
            catch(Exception ex)
            {
                WIMProject.ShowMessageBox(ex.ToString());
            }
        }


2.
 public RadGrid CreateDynamicGrid(string tableName)
        {
            RadGrid radGrid = new RadGrid();
            try
            {
                radGrid.ID = tableName + "_RootGrid";
                radGrid.AutoGenerateColumns = true;
                radGrid.PageSize = 20;
                radGrid.MasterTableView.AllowPaging = true;
                radGrid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
                radGrid.MasterTableView.DataKeyNames = new string[] {"ID" };
                radGrid.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerOnDemand;
                radGrid.MasterTableView.TableLayout = GridTableLayout.Auto;
                radGrid.MasterTableView.NestedViewTemplate = new NestedGridTemplate();
                radGrid.ItemCommand += new GridCommandEventHandler(radGrid_ItemCommand);
                radGrid.ItemDataBound += new GridItemEventHandler(radGrid_ItemDataBound);

              radGrid.NeedDataSource += new GridNeedDataSourceEventHandler(radGrid_NeedDataSource);

        .........}


3.
        void radGrid_ItemDataBound(object sender, GridItemEventArgs e)
        {
                  string gridID = e.Item.OwnerID;
                  string tableName = gridID.Replace("_RootGrid", "");

                  if (e.Item.GetType() == typeof(GridDataItem) && e.Item.Expanded)
                      {
                          GridDataItem currentDataItem = (e.Item as GridDataItem);
                          string selectedRowID = currentDataItem.GetDataKeyValue("ID").ToString();

                          Panel currentPanel = new Panel();
                          currentPanel.CssClass = "GridWrapperPanel";

                          NestedGridTemplate nestedGridTemplate = new NestedGridTemplate();
                          nestedGridTemplate.CreateTabStrip(tableName, currentPanel, selectedRowID);

                         (currentDataItem as GridDataItem).ChildItem.NestedViewCell.Controls.Add(currentPanel);
                      }
           
        }


Thanks,
Prava
Pavlina
Telerik team
 answered on 24 Nov 2011
1 answer
97 views
I am experiencing an issue with RadCompression. It does improve my intranet web application performance however I just found an issue, a web page will lose its viewstate if we leave it for around 10 minutes. It has never happened before we use RadCompression since we never let our session timeout. Does anyone know how to solve this problem?
Johny
Top achievements
Rank 1
 answered on 24 Nov 2011
1 answer
225 views
Hi, 
I am getting the error 'ChartSeriesType' is ambiguous in the namespace 'Telerik.Charting'. I have Telerik.Web.UI dll in my bin folder. 
Here is the code

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Web.UI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="phCon1" Runat="Server">
<table><tr><td><asp:Label ID="lblMessage" Visible="false" runat="server" /></td></tr></table>
    <table>
        <tr>
        <td>From :
        <telerik:RadDatePicker ID="DateTextCalendar1" runat="server"></telerik:RadDatePicker></td>
        <td>To :<telerik:RadDatePicker ID="DateTextCalendar2" runat="server"></telerik:RadDatePicker>
</td>
        <td><asp:Button runat="server" ID="btnSubmit" Text="Apply" /></td>
    </tr>
    </table>
  <asp:PlaceHolder ID="phTestDash" Visible="true" runat="server">
        
      <telerik:RadChart ID="RadChart1" DataSourceID="SqlDataSource1" runat="server" Skin="Vista"
                        Width="465px" Height="260px" DefaultType="Line" 
                        AutoLayout="true" AutoTextWrap="true" CreateImageMap="false"  >
                        <ChartTitle>
                            <TextBlock Text="Test">
                            </TextBlock>
                          </ChartTitle>
                        <Series>
                            <telerik:ChartSeries Name="Actions" Type="Line" DataYColumn="iActions">
                                <Appearance LegendDisplayMode="ItemLabels">
                                </Appearance>
                            </telerik:ChartSeries>
                        </Series>
                        </telerik:RadChart>
  </asp:PlaceHolder>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Test %>" ProviderName="System.Data.SqlClient" 
        SelectCommandType="StoredProcedure" SelectCommand="Test_GET">
        <SelectParameters>
            <asp:Parameter Name="TestID" DbType="Guid" />
            <asp:Parameter Name="iTestStartDateID" Type="Int32" />
            <asp:Parameter Name="iTestEndDateID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:content>

And the code behind is

Imports Telerik.Web.UI
Protected Sub LoadGraph()
             Try
                    dt = function(test)

                If dt Is Nothing Or dt.Rows.Count <= 0 Then
                    ShowMessage("No Data Available", False)
                    phTestDash.Visible = False
                    Exit Sub
                End If

            Catch ex As Exception
                ShowMessage(ex.Message, True)
            End Try
        End Sub


I went thru the forum and removed the reference from the corresponding dll. We are your customer and we need a solution for it to go forward.







Ves
Telerik team
 answered on 24 Nov 2011
4 answers
179 views
Hi

I am trying to prevent empty rows with “No Child records to display” from showing the expand/colapse image. Using the code from here: http://www.telerik.com/help/aspnet-ajax/grid-hide-expand-collapse-images-when-no-records.html removed ALL of the images, even rows that did have child records to display. Could you please look at my code and see if I am missing something.

Files are attached.
<telerik:radscriptmanager id="RadScriptManager1" runat="server">
</telerik:radscriptmanager>
<telerik:radgrid id="RadGrid1G" runat="server" cellspacing="0" datasourceid="SqlDS1_General" gridlines="None" autogeneratecolumns="False" enableembeddedskins="False"
imagespath="~/LM2_Vista_Skin/Images" skin="LM2_Vista_Skin" showheader="False" width="800px" onprerender="RadGrid1G_PreRender">
<ClientSettings>
<ClientEvents OnRowMouseOver="RowMouseOver" OnRowMouseOut="RowMouseOut" />
</ClientSettings>
<MasterTableView DataSourceID="SqlDS1_General" DataKeyNames="Model_ID" HierarchyDefaultExpanded="True">
<DetailTables>
<telerik:GridTableView runat="server" NoDetailRecordsText="" DataKeyNames="DocType_ID" DataSourceID="SqlDS2_General">
<DetailTables>
<telerik:GridTableView runat="server" DataSourceID="SqlDS3_General">
    <ParentTableRelation>
        <telerik:GridRelationFields DetailKeyField="DocType_ID" MasterKeyField="DocType_ID" />
    </ParentTableRelation>
    <CommandItemSettings AddNewRecordImageUrl="~/LM2_Vista_Skin/Images\AddRecord.gif" ExportToCsvImageUrl="~/LM2_Vista_Skin/Images\ExportToCsv.gif"
        ExportToExcelImageUrl="~/LM2_Vista_Skin/Images\ExportToExcel.gif" ExportToPdfImageUrl="~/LM2_Vista_Skin/Images\ExportToPdf.gif" ExportToPdfText="Export to PDF"
        ExportToWordImageUrl="~/LM2_Vista_Skin/Images\ExportToWord.gif" RefreshImageUrl="~/LM2_Vista_Skin/Images\Refresh.gif" />
    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" FilterImageUrl="~/LM2_Vista_Skin/Images\Filter.gif"
        SortAscImageUrl="~/LM2_Vista_Skin/Images\SortAsc.gif" SortDescImageUrl="~/LM2_Vista_Skin/Images\SortDesc.gif">
        <HeaderStyle Width="20px" />
    </RowIndicatorColumn>
    <ExpandCollapseColumn CollapseImageUrl="~/LM2_Vista_Skin/Images\SingleMinus.gif" ExpandImageUrl="~/LM2_Vista_Skin/Images\SinglePlus.gif"
        FilterControlAltText="Filter ExpandColumn column" FilterImageUrl="~/LM2_Vista_Skin/Images\Filter.gif" SortAscImageUrl="~/LM2_Vista_Skin/Images\SortAsc.gif"
        SortDescImageUrl="~/LM2_Vista_Skin/Images\SortDesc.gif">
        <HeaderStyle Width="20px" />
    </ExpandCollapseColumn>
<Columns>
<telerik:GridTemplateColumn DataField="Link_Name" FilterControlAltText="Filter ddLink_Name_General column" FilterImageUrl="~/LM2_Vista_Skin/Images\Filter.gif"
ReadOnly="True" Reorderable="False" Resizable="False" ShowSortIcon="False" SortAscImageUrl="~/LM2_Vista_Skin/Images\SortAsc.gif"
SortDescImageUrl="~/LM2_Vista_Skin/Images\SortDesc.gif" UniqueName="ddLink_Name_General">
                          
<ItemTemplate>
<table cellspacing="1" cellpadding="1" >
<tr>
<td style="width:500px; text-align:left;">
<asp:Label ID="ddTitles_General" runat="server" Text='<%# Eval("Link_Name") %>' CssClass="dCol1"></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
 
</telerik:GridTemplateColumn>
</Columns>
    <EditFormSettings>
        <EditColumn CancelImageUrl="~/LM2_Vista_Skin/Images\Cancel.gif" EditImageUrl="~/LM2_Vista_Skin/Images\Edit.gif"
            FilterControlAltText="Filter EditCommandColumn column" FilterImageUrl="~/LM2_Vista_Skin/Images\Filter.gif" InsertImageUrl="~/LM2_Vista_Skin/Images\Update.gif"
            SortAscImageUrl="~/LM2_Vista_Skin/Images\SortAsc.gif" SortDescImageUrl="~/LM2_Vista_Skin/Images\SortDesc.gif"
            UpdateImageUrl="~/LM2_Vista_Skin/Images\Update.gif">
        </EditColumn>
    </EditFormSettings>
    <PagerStyle FirstPageImageUrl="~/LM2_Vista_Skin/Images\PagingFirst.gif" LastPageImageUrl="~/LM2_Vista_Skin/Images\PagingLast.gif"
        NextPageImageUrl="~/LM2_Vista_Skin/Images\PagingNext.gif" PrevPageImageUrl="~/LM2_Vista_Skin/Images\PagingPrev.gif" />
</telerik:GridTableView>
</DetailTables>
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="Model_ID" MasterKeyField="Model_ID" />
</ParentTableRelation>
<CommandItemSettings AddNewRecordImageUrl="~/LM2_Vista_Skin/Images\AddRecord.gif" ExportToCsvImageUrl="~/LM2_Vista_Skin/Images\ExportToCsv.gif"
ExportToExcelImageUrl="~/LM2_Vista_Skin/Images\ExportToExcel.gif" ExportToPdfImageUrl="~/LM2_Vista_Skin/Images\ExportToPdf.gif" ExportToPdfText="Export to PDF"
ExportToWordImageUrl="~/LM2_Vista_Skin/Images\ExportToWord.gif" RefreshImageUrl="~/LM2_Vista_Skin/Images\Refresh.gif" />
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" FilterImageUrl="~/LM2_Vista_Skin/Images\Filter.gif"
SortAscImageUrl="~/LM2_Vista_Skin/Images\SortAsc.gif" SortDescImageUrl="~/LM2_Vista_Skin/Images\SortDesc.gif">
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn CollapseImageUrl="~/LM2_Vista_Skin/Images\SingleMinus.gif" ExpandImageUrl="~/LM2_Vista_Skin/Images\SinglePlus.gif"
FilterControlAltText="Filter ExpandColumn column" FilterImageUrl="~/LM2_Vista_Skin/Images\Filter.gif" SortAscImageUrl="~/LM2_Vista_Skin/Images\SortAsc.gif"
SortDescImageUrl="~/LM2_Vista_Skin/Images\SortDesc.gif" Visible="True">
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<ItemStyle CssClass="detailLevel_1" />
<AlternatingItemStyle CssClass="detailLevel_1_alt" />
<Columns>
<telerik:GridTemplateColumn DataField="Model_ID" UniqueName="dModel_ID_General" FilterImageUrl="~/LM2_Vista_Skin/Images/Filter.gif" SortAscImageUrl="~/LM2_Vista_Skin/Images/SortAsc.gif"
SortDescImageUrl="~/LM2_Vista_Skin/Images/SortDesc.gif" ShowFilterIcon="False" ReadOnly="True" Reorderable="False" Resizable="False"
ShowSortIcon="False" FilterControlAltText="Filter dModel_ID_General column">
<ItemTemplate>
<table cellspacing="1" cellpadding="1" >
<tr>
<td style="width:540px; text-align:left;">
<asp:Label ID="dTitles_General" runat="server" Text='<%# Eval("Link_Name") %>' CssClass="dCol1"></asp:Label>
<asp:Label ID="DocType_NameLabel" runat="server" Text='<%# Eval("DocType_Name") %>' CssClass="dCol1" Visible="False"></asp:Label>
<asp:Label ID="Model_IDLabel" runat="server" Text='<%# Eval("Model_ID") %>' CssClass="dCol1" Visible="False"></asp:Label>
                               
</td>
</tr>
</table>
</ItemTemplate>
 
<ItemStyle CssClass="dCol1" />
 
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="dLangsLinks__General" FilterControlAltText="Filter dLangsLinks__General column">
<ItemTemplate >
<table id="LLinkTable" cellspacing="0" cellpadding="0" style="width:152px;" >
<tr>
<td class="LLinks_td">
<a href='<%#Eval("Link_Path_en") %>'>en</a>
</td>
<td class="LLinks_td">
<a class="LLinks" href="<%#Eval("Link_Path_de") %>">de</a>
</td>
<td class="LLinks_td">
<a class="LLinks" href="<%#Eval("Link_Path_es") %>">es</a>
</td>
<td class="LLinks_td">
<a class="LLinks" href="<%#Eval("Link_Path_cn") %>">cn</a>
</td>
<td class="LLinks_td">
<a class="LLinks" href="<%#Eval("Link_Path_cn") %>">fr</a>
</td>
<td class="LLinks_td">
   
</td>
<td class="LLinks_td">
   
</td>
 
</tr>
</table>
                     
</ItemTemplate>
</telerik:GridTemplateColumn>
 
</Columns>
<EditFormSettings>
<EditColumn CancelImageUrl="~/LM2_Vista_Skin/Images\Cancel.gif" EditImageUrl="~/LM2_Vista_Skin/Images\Edit.gif"
    FilterControlAltText="Filter EditCommandColumn column" FilterImageUrl="~/LM2_Vista_Skin/Images\Filter.gif" InsertImageUrl="~/LM2_Vista_Skin/Images\Update.gif"
    SortAscImageUrl="~/LM2_Vista_Skin/Images\SortAsc.gif" SortDescImageUrl="~/LM2_Vista_Skin/Images\SortDesc.gif"
    UpdateImageUrl="~/LM2_Vista_Skin/Images\Update.gif">
</EditColumn>
</EditFormSettings>
<PagerStyle FirstPageImageUrl="~/LM2_Vista_Skin/Images\PagingFirst.gif" LastPageImageUrl="~/LM2_Vista_Skin/Images\PagingLast.gif"
NextPageImageUrl="~/LM2_Vista_Skin/Images\PagingNext.gif" PrevPageImageUrl="~/LM2_Vista_Skin/Images\PagingPrev.gif" />
</telerik:GridTableView>
</DetailTables>
<CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordImageUrl="~/LM2_Vista_Skin/Images\AddRecord.gif"
ExportToCsvImageUrl="~/LM2_Vista_Skin/Images\ExportToCsv.gif" ExportToExcelImageUrl="~/LM2_Vista_Skin/Images\ExportToExcel.gif"
ExportToPdfImageUrl="~/LM2_Vista_Skin/Images\ExportToPdf.gif" ExportToWordImageUrl="~/LM2_Vista_Skin/Images\ExportToWord.gif"
RefreshImageUrl="~/LM2_Vista_Skin/Images\Refresh.gif"></CommandItemSettings>
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" FilterImageUrl="~/LM2_Vista_Skin/Images\Filter.gif"
SortAscImageUrl="~/LM2_Vista_Skin/Images\SortAsc.gif" SortDescImageUrl="~/LM2_Vista_Skin/Images\SortDesc.gif">
</RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" CollapseImageUrl="~/LM2_Vista_Skin/Images\SingleMinus.gif"
ExpandImageUrl="~/LM2_Vista_Skin/Images\SinglePlus.gif" FilterImageUrl="~/LM2_Vista_Skin/Images\Filter.gif"
SortAscImageUrl="~/LM2_Vista_Skin/Images\SortAsc.gif" SortDescImageUrl="~/LM2_Vista_Skin/Images\SortDesc.gif" Visible="True">
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="Model_ID" FilterControlAltText="Filter mModel_ID_General column" SortExpression="Model_ID"
UniqueName="mModel_ID_General" FilterImageUrl="~/LM2_Vista_Skin/Images\Filter.gif" SortAscImageUrl="~/LM2_Vista_Skin/Images\SortAsc.gif"
SortDescImageUrl="~/LM2_Vista_Skin/Images\SortDesc.gif" AllowFiltering="False" AllowSorting="False" ReadOnly="True" Reorderable="False"
Resizable="False" ShowSortIcon="False" Display="True">
 
<ItemStyle BackColor="#E0E0E0" BorderStyle="None" Font-Bold="True" Font-Names="Verdana" ForeColor="#003399" Width="520px" Font-Size="12px" />
 
</telerik:GridBoundColumn>
 
<telerik:GridBoundColumn DataField="LanguageChoice" FilterControlAltText="Filter LanguageChoice column" FilterImageUrl="~/LM2_Vista_Skin/Images\Filter.gif"
SortAscImageUrl="~/LM2_Vista_Skin/Images\SortAsc.gif" SortDescImageUrl="~/LM2_Vista_Skin/Images\SortDesc.gif"
SortExpression="LanguageChoice" UniqueName="mLanguageChoice_General" AllowFiltering="False" AllowSorting="False" ReadOnly="True" Reorderable="False"
Resizable="False" ShowSortIcon="False" Display="True">
 
<ItemStyle BackColor="#E0E0E0" BorderStyle="None" Font-Bold="True" Font-Names="Verdana" ForeColor="#003399" Width="162px" Font-Size="13px" />
 
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings EditColumn-ShowFilterIcon="False" EditColumn-ShowSortIcon="False" EditColumn-Reorderable="False" EditColumn-Display="False" EditColumn-Resizable="False" EditColumn-Visible="False">
<EditColumn FilterControlAltText="Filter EditCommandColumn column" CancelImageUrl="~/LM2_Vista_Skin/Images\Cancel.gif"
EditImageUrl="~/LM2_Vista_Skin/Images\Edit.gif" FilterImageUrl="~/LM2_Vista_Skin/Images\Filter.gif" InsertImageUrl="~/LM2_Vista_Skin/Images\Update.gif"
SortAscImageUrl="~/LM2_Vista_Skin/Images\SortAsc.gif" SortDescImageUrl="~/LM2_Vista_Skin/Images\SortDesc.gif"
UpdateImageUrl="~/LM2_Vista_Skin/Images\Update.gif">
</EditColumn>
</EditFormSettings>
<ItemStyle Font-Bold="False" Font-Names="Rod" />
<PagerStyle FirstPageImageUrl="~/LM2_Vista_Skin/Images\PagingFirst.gif" LastPageImageUrl="~/LM2_Vista_Skin/Images\PagingLast.gif"
NextPageImageUrl="~/LM2_Vista_Skin/Images\PagingNext.gif" PrevPageImageUrl="~/LM2_Vista_Skin/Images\PagingPrev.gif" />
</MasterTableView>
<PagerStyle FirstPageImageUrl="~/LM2_Vista_Skin/Images\PagingFirst.gif" LastPageImageUrl="~/LM2_Vista_Skin/Images\PagingLast.gif"
NextPageImageUrl="~/LM2_Vista_Skin/Images\PagingNext.gif" PrevPageImageUrl="~/LM2_Vista_Skin/Images\PagingPrev.gif" />
<FilterMenu EnableImageSprites="False">
</FilterMenu>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
</HeaderContextMenu>
</telerik:radgrid>
</td>
</tr>
<tr>
<td style="width: 100%;">
   
</td>
</tr>
</table>
<asp:SqlDataSource ID="SqlDS1_General" runat="server" ConnectionString="<%$ ConnectionStrings:LM_Docs %>" SelectCommand="SELECT m.Model_ID, m.Cat_ID, m.InActive, md.Model_Lang_ID_Group, md.Model_Desc_Eng, md.LanguageChoice
FROM  Models as m INNER JOIN Model_Descriptions as md ON m.Model_ID = md.Model_ID
WHERE m.Cat_ID = 1 and m.InActive = @InActive and md.Model_Lang_ID_Group = @Model_Lang_ID_Group
ORDER BY m.Model_ID">
<SelectParameters>
<asp:Parameter DefaultValue="false" Name="InActive" />
<asp:Parameter DefaultValue="1" Name="Model_Lang_ID_Group" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDS2_General" runat="server" ConnectionString="<%$ ConnectionStrings:LM_Docs %>" SelectCommand="spRadGrid_General_Level2" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:SessionParameter Name="Model_ID" SessionField="Model_ID" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDS3_General" runat="server" ConnectionString="<%$ ConnectionStrings:LM_Docs %>" SelectCommand="spRadGrid_General_Level3" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:SessionParameter DefaultValue="" Name="DocType_ID" SessionField="DocType_ID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
</form>


using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Mail;
using System.Net.Mime;
using System.IO;
using System.ComponentModel;
 
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Text.RegularExpressions;
 
 
public partial class LM2general : BasePage
{
 
    protected void RadGrid1G_PreRender(object sender, EventArgs e)
    {
        HideExpandColumnRecursive(RadGrid1G.MasterTableView);
    }
 
    public void HideExpandColumnRecursive(GridTableView tableView)
    {
        GridItem[] nestedViewItems = tableView.GetItems(GridItemType.NestedView);
        foreach (GridNestedViewItem nestedViewItem in nestedViewItems)
        {
            foreach (GridTableView nestedView in nestedViewItem.NestedTableViews)
            {
                if (nestedView.Items.Count == 0)
                {
                    TableCell cell = nestedView.ParentItem["ExpandColumn"];
                    cell.Controls[0].Visible = false;
                    cell.Text = " ";
                    nestedViewItem.Visible = false;
                }
                if (nestedView.HasDetailTables)
                {
                    HideExpandColumnRecursive(nestedView);
                }
            }
        }
    }
}


Thank you.

Mike

Pavlina
Telerik team
 answered on 24 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?