Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
52 views
Hello Telerik Community!

I'm encountering a situation where the header text becomes blank for all columns within a RadGrid NestedViewTemplate after expanding a sibling NestedViewTemplate row.  Here's the breakdown (you might need to draw this one out):

RadGrid1 contains it's own columns along with a NestedViewTemplate.  We'll call this column "Summary.NVT".  Within "Summary.NVT" is RadGrid2 with it's own unique columns.  We'll call this child grid, "Details".  The "Details" table is dynamically generated upon callback "Summary_ItemCreated".  When "Summary.NVT" is expanded for row 0, the "Details" grid and all of it's columns are properly displayed.  When "Summary.NVT" is then expanded for row 1, "Details row 0" retained it's rows but without column header text and "Details row 1" is now properly displayed with column header text.

Following me?  Tricky to explain.  There is one variable which changes the above behavior.  For the "Details" grid, if I specify "AutoGenerateColumns" as true, my column headers will work all the time.  This is great aside from losing formatting capabilities.  I would prefer to add dynamically created columns via "GridBoundColumn" objects.  

The reason for the dynamically generated nested details grid is to display different detail columns for each expanded summary record.  Some summaries will have different detail columns than others.

Any advice on retaining my column header text when expanding multiple rows containing dynamically generated grids?
Antonio Stoilkov
Telerik team
 answered on 11 Oct 2012
2 answers
130 views
Heey my question is how to change the date type in grid so that 2012-11-11-01 00:00:00 is just 2012-11-11 
is this something in codebehind or just a grid option 
thx for help 
Nikola
Top achievements
Rank 2
 answered on 11 Oct 2012
4 answers
37 views
I see that a lot of my controls in editor have a header and footer sub elements. For example, I have a RadTextBox that has sub elements "Header" and "Footer." I haven't figured out what these two things are. What are they?
Maria Ilieva
Telerik team
 answered on 11 Oct 2012
2 answers
72 views
Hi all:
    My front code is below:


<telerik:RadGrid ID="rgLeaveHistory" runat="server" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" AllowFilteringByColumn="True">
                <MasterTableView DataKeyNames="ActionLinkArg" AllowFilteringByColumn="True">
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="RgLeaveHistory_Cancel">
                            <HeaderTemplate>
                                <asp:Label ID="lblHeaderRgLeaveHistory_Cancel" runat="server" Text='<%#UIUtil.GetLabel("Cancel",UIUtil.GetLangCode(request))%>'></asp:Label></HeaderTemplate><ItemTemplate>
                                <asp:ImageButton ID="btnRgLeaveHistory_Cancel" runat="server" ImageUrl='<%# Tier_Common.GetStr_ImagePath("Delete")  %>' CommandName="Cancel"/>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="RgLeaveHistory_RefId">
                            <HeaderTemplate>
                                <asp:Label ID="lblHeaderRgLeaveHistory_RefId" runat="server" Text='<%#UIUtil.GetLabel("RefId",UIUtil.GetLangCode(request))%>'></asp:Label></HeaderTemplate><ItemTemplate>
                                <asp:Label ID="lblItemRgLeaveHistory_RefId" runat="server" Text='<%#Eval("RefId")%>' />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="RgLeaveHistory_Status">
                            <HeaderTemplate>
                                <asp:Label ID="lblHeaderRgLeaveHistory_Status" runat="server" Text='<%#UIUtil.GetLabel("Status",UIUtil.GetLangCode(request))%>'></asp:Label></HeaderTemplate><ItemTemplate>
                                <asp:Label ID="lblItemRgLeaveHistory_Status" runat="server" Text='<%#Eval("Status")%>' />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="RgLeaveHistory_LvType">
                            <HeaderTemplate>
                                <asp:Label ID="lblHeaderRgLeaveHistory_LeaveType" runat="server" Text='<%#UIUtil.GetLabel("LeaveType",UIUtil.GetLangCode(request))%>'></asp:Label></HeaderTemplate><ItemTemplate>
                                <asp:Label ID="lblItemRgLeaveHistory_LeaveType" runat="server" Text='<%#Eval("LeaveType")%>' />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="RgLeaveHistory_FromDate">
                            <HeaderTemplate>
                                <asp:Label ID="lblHeaderRgLeaveHistory_FromDate" runat="server" Text='<%#UIUtil.GetLabel("FromDate",UIUtil.GetLangCode(request))%>'></asp:Label></HeaderTemplate><ItemTemplate>
                                <asp:Label ID="lblItemRgLeaveHistory_FromDate" runat="server" Text='<%#Eval("FromDate")%>' />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="RgLeaveHistory_FromTime">
                            <HeaderTemplate>
                                <asp:Label ID="lblHeaderRgLeaveHistory_FromTime" runat="server" Text='<%#UIUtil.GetLabel("FromTime",UIUtil.GetLangCode(request))%>'></asp:Label></HeaderTemplate><ItemTemplate>
                                <asp:Label ID="lblItemRgLeaveHistory_FromTime" runat="server" Text='<%#Eval("FromTime")%>' />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="RgLeaveHistory_ToDate">
                            <HeaderTemplate>
                                <asp:Label ID="lblHeaderRgLeaveHistory_ToDate" runat="server" Text='<%#UIUtil.GetLabel("ToDate",UIUtil.GetLangCode(request))%>'></asp:Label></HeaderTemplate><ItemTemplate>
                                <asp:Label ID="lblItemRgLeaveHistory_ToDate" runat="server" Text='<%#Eval("ToDate")%>' />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="RgLeaveHistory_ToTime">
                            <HeaderTemplate>
                                <asp:Label ID="lblHeaderRgLeaveHistory_ToTime" runat="server" Text='<%#UIUtil.GetLabel("ToTime",UIUtil.GetLangCode(request))%>'></asp:Label></HeaderTemplate><ItemTemplate>
                                <asp:Label ID="lblItemRgLeaveHistory_ToTime" runat="server" Text='<%#Eval("ToTime")%>' />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="RgLeaveHistory_TotalDays">
                            <HeaderTemplate>
                                <asp:Label ID="lblHeaderRgLeaveHistory_TotalDays" runat="server" Text='<%#UIUtil.GetLabel("TotalDays",UIUtil.GetLangCode(request))%>'></asp:Label></HeaderTemplate><ItemTemplate>
                                <asp:Label ID="lblItemRgLeaveHistory_TotalDays" runat="server" Text='<%#Eval("TotalDays")%>' />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="RgLeaveHistory_TotalDays">
                            <HeaderTemplate>
                                <asp:Label ID="lblHeaderRgLeaveHistory_Remarks" runat="server" Text='<%#UIUtil.GetLabel("Remarks",UIUtil.GetLangCode(request))%>'></asp:Label></HeaderTemplate><ItemTemplate>
                                <asp:Label ID="lblItemRgLeaveHistory_Remarks" runat="server" Text='<%#Eval("Remarks")%>' />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                     </Columns>
                 </MasterTableView>
                 <FilterMenu EnableImageSprites="False"></FilterMenu>
            </telerik:RadGrid>

It shows error: "Multiple controls with the same ID 'FilterTextBox_' were found. FindControl requires that controls have unique IDs."
But when I set the property AllowFilteringByColumn to be false , It shows no problem.

Could you help me? Thanks
Singl Pang
Top achievements
Rank 1
 answered on 11 Oct 2012
10 answers
170 views
I have a RadEditor nested inside a FormView so that I can bind database data inside.  This is working nicely.  In trying to save the content of the RadEditor back to the database, however, my CodeFile isn't recognizing my RadEditor.  Here's my .aspx:
<asp:FormView ID="FormView1" runat="server" DataSourceID="editcontentDS"
      DefaultMode="Edit">
<EditItemTemplate>
  <telerik:RadEditor ID="RadEditor1" runat="server" EnableResize="False" Skin="Sunset" Width="950px" Content='<%# Bind("content_detail") %>'>
      <Tools>
          <telerik:EditorToolGroup>
              <telerik:EditorTool Name="Bold" />
              <telerik:EditorTool Name="Italic" />
              <telerik:EditorTool Name="FindAndReplace" />
              <telerik:EditorTool Name="AjaxSpellCheck" />
              <telerik:EditorTool Name="ForeColor" />
              <telerik:EditorTool Name="Undo" />
              <telerik:EditorTool Name="Redo" />
          </telerik:EditorToolGroup>
      </Tools>
  </telerik:RadEditor>
  <br />
  <asp:Button ID="UpdateButton" runat="server" CausesValidation="false" CommandName="Update" Text="Update" />
  <input id="UpdateCancelButton" type="button" value="Cancel" onclick="history.go(-1);return false;" />
</EditItemTemplate>
</asp:FormView>
Then there's my SqlDataSourse:
<asp:SqlDataSource ID="editcontentDS" runat="server"
    ConnectionString="<%$ ConnectionStrings:myconnection %>"
    SelectCommand="SELECT content_detail FROM content_items WHERE pages_id = 1"
    UpdateCommand="UPDATE content_items SET content_detail=@pageContent WHERE pages_id = 1">
    <UpdateParameters>
        <asp:Parameter Name="pageContent" Type="String" />
    </UpdateParameters>
</asp:SqlDataSource>
And lastly my lonely CodeFile:
Protected Sub editcontentDS_Updating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs) Handles editcontentDS.Updating
    Dim updatedContent As String = RadEditor1.Content
 
End Sub
RadEditor1 has the following error: 'RadEditor1' is not declared. It may be inaccessible due to its protection level.

Any ideas?
Abhishek
Top achievements
Rank 1
 answered on 11 Oct 2012
1 answer
196 views
Hi,

I my web application, i implemented radconfirm to validate the fileds.When the alert is showing the backround contents are invisible.

Please find the attachment for your referrence.

Thanks,
Venkatesh S

Maria Ilieva
Telerik team
 answered on 11 Oct 2012
1 answer
87 views
I have attached related files for a clearer explanation...

I created a custom skin using your online tool and that went well.  I downloaded and unzipped the file and installed the contents in my .net 4.0 web site project (VS2012). I named the custom skin "Custom" for the sake of brevity and easy testing.  You can see the resulting structure in ProjectLayout.png.

I turned off embedded skins in the menu control and included the name of the skin as well.  Please refer to menucontrol.png for that definition.  One note...this is in a user control and not being placed directly on a web page.

When the page/user control is displayed, there are no styles being applied to the menu (please refer to DisplayedMenu.png).  If I change the "embedded skins" property to true and the name of the skin to one of the included skins, it displays just fine according to the selected embedded skin.

In addition, no skin/css files are being called for during the page display.  You can see that in the included Fiddler screen capture.

I'm pretty certain I'm missing something really stupid, but I have followed the instructions in the video for the Visual Style Builder (which was an otherwise good video).

Can anyone tell me what I am missing?

Thanks in advance for assistance!

Lynn
Kate
Telerik team
 answered on 11 Oct 2012
1 answer
125 views
Hello,

I've search high and low for help on what I am trying to do, which seems pretty simple.

Basically, I want to create a number of RadDocks depending upon how many rows I have in a table which holds photos and data associated with them.  I am trying to add a few buttons to the RadDock that will do stuff, like delete a photo.

Here is what I have so far:

DataTable dtPhotos = GetAllByGalleryID(ID);
 
        if (dtPhotos.Rows.Count > 0)
        {
            foreach (DataRow dr in dtPhotos.Rows)
            {
                RadDock dock = new RadDock();
                dock.ID = "rd" + dr["ID"].ToString();
                dock.Title = "<div style=\"position:relative; top:7px; height:70px;\"><img class=\"galleryPhoto\" src=\"/properties/images/" + dr["ImgName"].ToString() + "\" /></div>";
                dock.EnableDrag = true;
                dock.DockMode = DockMode.Docked;
                dock.UniqueName = Guid.NewGuid().ToString();
                dock.EnableEmbeddedSkins = false;
                dock.Width = Unit.Pixel(100);
                dock.Height = Unit.Pixel(75);
                dock.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.Close;
                 
                dock.ContentContainer.CssClass = "photoButtons";
 
                Button delete = new Button();
                delete.Text = "Delete";
                delete.CssClass = "deleteButton";
 
                delete.Command += new DockCommandEventHandler(DeletePhoto);
                delete.CommandArgument = dr["ID"].ToString();
                delete.CommandName = "DeletePhoto";
                delete.OnClientClick = "return confirm('Are you sure you want to delete this photo?')";
 
                dock.ContentContainer.Controls.Add(delete);
 
                RadDockLayout1.Controls.Add(dock);
                dock.Dock(rdz1);
            }
        }


How do I wire up a simple Button inside the RadDock to an Event Handler?
Slav
Telerik team
 answered on 11 Oct 2012
6 answers
215 views
We have an ASP.NET 4 web app and we are using RadSessionPageStateCompression by configuring it in the BrowserFile.browser file like this:

<browsers>
  <browser refID="Default">
    <controlAdapters>
      <adapter controlType="System.Web.UI.Page" adapterType="Telerik.Web.UI.RadSessionPageStateCompression, Telerik.Web.UI, Version=2011.2.712.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />
    </controlAdapters>
  </browser>
</browsers> When working in just one tab in the browser ViewState is OK. When working in several tabs (IE 8/9, Chrome 14.x) part of the ViewState is lost. Can you advice what is wrong? Regards, alexander
David
Top achievements
Rank 1
 answered on 11 Oct 2012
3 answers
162 views
I have a web application which use telerik controls.
I'm using viewstate compression

In web.config:
-----------------
<httpModules>
            <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
</httpModules>

 <modules runAllManagedModulesForAllRequests="true">
   <remove name="RadCompression" />
   <add name="RadCompression" type="Telerik.Web.UI.RadCompression"
    preCondition="integratedMode" />
  </modules>

In browser file:
------------------
 <browser refID="Default">
        <controlAdapters>
            <adapter controlType="System.Web.UI.Page"
                     adapterType="Telerik.Web.UI.RadHiddenFieldPageStateCompression"/>
           <!-- <adapter controlType="System.Web.UI.Page"
                     adapterType="Telerik.Web.UI.RadSessionPageStateCompression"/>-->
        </controlAdapters>            
    </browser>

The problem is when open a web page and do some actions like building a grid or filling RadComboBox, and then wait while doing nothing in the page (receive a call as i work in a call center and filling the data from this call) after about 10 minutes the page lost its data that has been filled (ComboBox items disappear and RagGrid rows disappear completely).

The page seems to be come from the server without running the load event at least.

This happened in many pages around the web application.

I Hope you can help me cause I'm stuck in it.

Thank you.
David
Top achievements
Rank 1
 answered on 11 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?