Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
78 views
In my code behind file, I have set the property enabled = "false" for my Grid. I tried to click on the check box for an item row to select it and it was disabled as one would expect. I then double clicked on the check box for an item row and all the check boxes are deselected. For some reason the grid will allow the user to deselect items by double clicking while the grid is disabled. See attached Screenshots. However, this action does not work once the items have been deselected and a user tries to double click a check box, the items are not reselected.

Is there something that I am missing? I would not expect this functionality when the grid is disabled.
Eyup
Telerik team
 answered on 25 Feb 2013
2 answers
226 views
I have two dropdown columns in a grid, if i change one dropdown i want to be able to change the contents of the other dropdown in the grid depending on the chosen value in dropdown 1. I can get the dropdown to autopost but I am unsure on how to repopulate the second drop down as this is currently being done in the itemdatabound method. Can someone tell me if this is possible?
Jayesh Goyani
Top achievements
Rank 2
 answered on 25 Feb 2013
12 answers
669 views
I have just updated my Telerik AJAX from 2012 Q2 To 2012 Q3 recently.
I found out that the RadButton, when set to Link ButtonType, unlike the previous version, it does not have transparency background. Is there anyway to fix it?

Attached, please find following pic:
* "Before.png" picture, which show the RadButton (Link ButtonType) in 2012 Q2 Version.
* "After.png" picture, which shown the RadButton (Link ButtonType) in 2013 Q3 Version.

Thanks

Lamk
Bozhidar
Telerik team
 answered on 25 Feb 2013
2 answers
298 views
I've been having issues with RadEditor exporting a very simple and basic version of the actual HTML I've added.

I've attached 2 screen shots. 
1. How it appears in a browser when launched from Dreamweaver
2. The exported PDF

It's really frustrating that the HTML code has to be so specific and that it ignores all of the formatting (inline styles and css styles)

Any tips for getting exported PDFs to use CSS styles?
Jason
Rumen
Telerik team
 answered on 25 Feb 2013
2 answers
173 views
So I've been trying to use the RadEditor to export content to PDF but I've had very mixed results on what HTML can be added.

I've been reading HTML from another source and then adding it to the content:
RadEditor.Content = stringOfHTML

Here's the HTML I've been using for my content:
<div style="width:700px;">
<div style="width:100%;"><img src="http://www.cloudprojecthosting.com/1050140/Web/Images/imgDCheaderGraphic.png" width="100%" /></div>
 
 
<div style="width:49%; float:left;">
   (%NULL:Author Display Name%)<br/>
  (%NULL:Author Company%)<br/>
 (%NULL:Question%)
</div>
 
<div style="width:49%; float:right;">
   (%NULL:Answer Display Name%)<br/>
   (%NULL:Answer Company%)<br/>
(%NULL:Answer%)
</div>
</div>

If I just add this line it renders in the PDF:
<div style="width:100%;"><img src="http://www.cloudprojecthosting.com/1050140/Web/Images/imgDCheaderGraphic.png" width="100%" /></div>
 But adding any additional lines causes the PDF to open blank?

I've seen older posts where <Table> can't be used because it needs Colgroup and col or something but that was from 2009? 
Do I need to add the content as a specific mode or something?
Rumen
Telerik team
 answered on 25 Feb 2013
0 answers
238 views
Since Q1 2013, the wrapping element of RadButton was changed from an anchor <a> tag to a <span> because the HTML5 specification does not allow nesting <input> elements into <a> tags. If you are using any custom CSS cascades based on the <a> tag, they should be changed to use the <span> tag, e.g.

Old syntax:
a.RadButton .rbDecorated
{
      color: red;
}

New syntax:
span.RadButton .rbDecorated
{
      color: red;
}

You should not experience problems in custom styling scenarios when an anchor was not used in the CSS cascade.
Telerik Admin
Top achievements
Rank 1
Iron
 asked on 25 Feb 2013
4 answers
199 views
I have a hierarchical RadGrid which contains a NestedViewTemplate that has a Panel, TabStrip, and MultiPage inside of it.  On row expand, an ajax request is fired and loads the first tab.  However I would like all of the subsequent tabs to be ajaxified as well.  How can I achieve this?  

Even when I use Design mode and try to add these AjaxControl/AjaxUpdatedControl relationships, I do not have an option for my NestedViewTemplate, TabStrip, and MultiPage (while they are inside the grid)

My code is:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
  <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="RadMenu1">
      <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="RadGrid1" UpdatePanelHeight="100%"/>
      </UpdatedControls>
    </telerik:AjaxSetting>
    <telerik:AjaxSetting AjaxControlID="RadGrid1">
      <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="RadGrid1"/>
      </UpdatedControls>
    </telerik:AjaxSetting>
      <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
          <UpdatedControls>
              <telerik:AjaxUpdatedControl ControlID="NestedViewPanel1" />
          </UpdatedControls>
      </telerik:AjaxSetting>
      <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
          <UpdatedControls>
              <telerik:AjaxUpdatedControl ControlID="NestedViewPanel1" />
          </UpdatedControls>
      </telerik:AjaxSetting>
  </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadGrid ID="RadGrid1"
                 runat="server"
                 DataKeyNames="PrimaryKey"
                 OnItemCommand="RadGrid1_ItemCommand"
                 OnNeedDataSource="RadGrid1_OnNeedDataSource"
                 EnableViewState="false">
  <MasterTableView>
    <NestedViewSettings>
      <ParentTableRelation>
        <telerik:GridRelationFields DetailKeyField="PrimaryKey" MasterKeyField="PrimaryKey" />
      </ParentTableRelation>
    </NestedViewSettings>
    <NestedViewTemplate>
     <asp:Panel ID="NestedViewPanel1" runat="server" CssClass="viewWrap bordered-bottom">
        <telerik:RadTabStrip runat="server" ID="RadTabStrip1" AutoPostBack="true" MultiPageID="RadMultiPage1"></telerik:RadTabStrip>
        <telerik:RadMultiPage runat="server" ID="RadMultiPage1" EnableEmbeddedScripts="true"></telerik:RadMultiPage>
      </asp:Panel>
    </NestedViewTemplate>
  </MasterTableView>
</telerik:RadGrid>

And my tabs are created programmatically:

string[] testing = { "Test1", "Test2", "Test3", "Test4", "Test5", "Test6" };
 
foreach (string tabName in testing)
{
    RadTab tab = new RadTab();
    tab.Text = tabName;
    RadTabStrip1.Tabs.Add(tab);
    RadPageView pageView = new RadPageView();
    RadMultiPage1.PageViews.Add(pageView);
    pageView.ID = "Page" + RadTabStrip1.Tabs.Count.ToString();
    pageView.Controls.Add(new LiteralControl(pageView.ID);
    RadTabStrip1.SelectedIndex = 0;
    RadTabStrip1.MultiPageID = RadMultiPage1.ID;
    RadTabStrip1.DataBind();
}
Kostadin
Telerik team
 answered on 25 Feb 2013
1 answer
102 views
Hi 
I am not able to get the changed values in the controls in edit mode when I am using either "Popup" (or editforms) modes. Using 'GridEditFormItem' to retrieve the values and it returns old value and not the changed ones. Here is my code:
======================================================================
ASPX:
=================================================================
 <telerik:RadGrid ID="radFootNotes" runat="server" Width="100%" AutoGenerateColumns="false" BackColor="Beige" AllowPaging="false" AllowSorting="false" OnItemCommand="radFootNotes_ItemCommand" onneeddatasource="radFootNotes_NeedDataSource"  >
<MasterTableView AutoGenerateColumns="false" DataKeyNames="FootNoteID" InsertItemPageIndexAction="ShowItemOnCurrentPage" EditMode="PopUp" CommandItemDisplay="TopAndBottom" CommandItemSettings-AddNewRecordText="Add Footnote">
      <Columns>
                 <telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>                           <telerik:GridBoundColumn UniqueName="FootNoteText" DataField="FootNoteText" HeaderText="Foot Note" ReadOnly="true" />                            <telerik:GridButtonColumn ConfirmDialogType="RadWindow" CommandName="Rules" ConfirmDialogHeight="100px" ConfirmDialogWidth="220px" Text="Rules"></telerik:GridButtonColumn>
        </Columns>
                       <EditFormSettings EditFormType="Template" PopUpSettings-Width="400px">
                  <PopUpSettings Height="500" Width="800"  Modal="true"   />                               <FormTemplate> 
     <table>
                                <tr><td class="style1">Disclosure Number</td><td><asp:TextBox ID="txtDisclosureNumber" Text='<%# Eval("DisclosureNumber") %>' runat="server" ></asp:TextBox></td></tr>
                                    <tr><td class="style1">FootNote Text</td><td><asp:TextBox ID="txtFootnoteText" Text='<%# Eval("FootnoteText") %>' runat="server" Height="150px" TextMode="MultiLine" Width="670px" ></asp:TextBox></td></tr>
                                    <tr><td class="style1">Font Name</td><td><asp:TextBox ID="txtFontName" Text='<%# Eval("FontName") %>' runat="server" Width="197px" ></asp:TextBox></td></tr>
                                    <tr><td class="style1">Font Size</td><td><asp:TextBox ID="txtFontSize" Text='<%# Eval("FontSize") %>' runat="server" Width="195px" ></asp:TextBox></td></tr>
                                    <tr><td class="style1">Font Color</td><td><asp:TextBox ID="txtFontColor" Text='<%# Eval("FontColor") %>' runat="server" Width="196px" ></asp:TextBox></td></tr>
                                    <tr><td class="style1">List Order</td><td><asp:TextBox ID="txtListOrder" Text='<%# Eval("ListOrder") %>' runat="server" Width="30px" ></asp:TextBox></td></tr>
                                    <tr><td class="style1">Is Active</td><td><asp:CheckBox ID="chkActive" Checked='<%# Eval("IsActive") %>' DataField="IsActive" HeaderText="Active" UniqueName="IsActive" runat="server"></asp:CheckBox></td></tr>
                                    <tr><td class="style1"></td><td><br /></td></tr>
                                    <tr><td class="style1"></td><td>                                         <asp:Button ID="btnUpdate" runat="server" Text='<%# IIf (TypeOf Container is GridEditFormInsertItem, "Insert", "Update") %>'                                                                CommandName='<%# IIf (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>'></asp:Button>
                                         <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"/>
                                    </td></tr>                               </table>
                            </FormTemplate>                          </EditFormSettings>
                     </MasterTableView>
                     <ClientSettings>
                        <ClientEvents OnRowDblClick="RowDblClick" />
                    </ClientSettings>
                </telerik:RadGrid>

==================================================================
VB:
==================================================================
 Protected Sub radFootNotes_ItemCommand(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs) Handles radFootNotes.ItemCommand
        If e.CommandName = RadGrid.InitInsertCommandName Then '"Add new" button clicked
            Dim editColumn As GridEditCommandColumn = CType(radFootNotes.MasterTableView.GetColumn("EditCommandColumn"), GridEditCommandColumn)
            editColumn.Visible = False
        ElseIf (e.CommandName = RadGrid.RebindGridCommandName AndAlso e.Item.OwnerTableView.IsItemInserted) Then
            e.Canceled = True
        ElseIf e.CommandName = "Update" Then
            If (TypeOf e.Item Is GridEditableItem) AndAlso e.Item.IsInEditMode Then
                Dim item As GridEditableItem = TryCast(e.Item, GridEditableItem)
                Dim footnoteID As Integer = Item.GetDataKeyValue("FootNoteID")
                'Dim dr As dsFootNote.ReportFootNoteRulesRow = ds.ReportFootNoteRules.NewReportFootNoteRulesRow
                Dim dr As dsFootNote.ReportFootNotesRow = ds.ReportFootNotes.FindByFootNoteID(footnoteID)
               ''Dim editDataitem As GridDataItem = e.Item
                'Dim editform As GridEditFormItem = CType(CType(e.Item, GridDataItem).EditFormItem, GridEditFormItem)
                'Dim ditem As Telerik.Web.UI.GridDataItem = CType(e.Item, Telerik.Web.UI.GridDataItem)
                Dim editform As GridEditFormItem = CType(e.Item, GridEditFormItem)                'Dim editTable As GridEditableItem = TryCast(e.Item, GridEditableItem)
                Dim DisclosureNumber As String = TryCast(editform.FindControl("txtDisclosureNumber"), TextBox).Text
                Dim FootNoteText As String = TryCast(editform.FindControl("txtFootNoteText"), TextBox).Text
                Dim FontName As String = TryCast(editform.FindControl("txtFontName"), TextBox).Text
                Dim FontSize As String = TryCast(editform.FindControl("txtFontSize"), TextBox).Text
                Dim FontColor As String = TryCast(editform.FindControl("txtFontColor"), TextBox).Text
                Dim ListOrder As String = TryCast(editform.FindControl("txtListOrder"), TextBox).Text
                Dim IsActive As Boolean = TryCast(editform.FindControl("chkIsActive"), CheckBox).Checked
                dr.FootNoteID = footnoteID
                If String.IsNullOrEmpty(DisclosureNumber) Then
                    dr.SetDisclosureNumberNull()
                Else
                    dr.DisclosureNumber = DisclosureNumber
                End If
                dr.FootNoteText = FootNoteText
                dr.FontName = FontName
                dr.FontSize = FontSize
                dr.FontColor = FontColor
                dr.ListOrder = ListOrder
                dr.IsActive = IsActive
                'Save Footnote
                OCS.DAL.FootNotes.FootNotes.UpdateReportFootNotes(ds, 2)
                'Rebind the FootNotes Grid
                ds = OCS.DAL.FootNotes.FootNotes.GetReportFootNotes(0, 0, 2)
                radFootNotes.Rebind()
                'Close PopUp
                radFootNotes.MasterTableView.ClearEditItems()
            End If
        ElseIf e.CommandName = "Cancel" Then
            Dim editColumn As GridEditCommandColumn = CType(radFootNotes.MasterTableView.GetColumn("EditCommandColumn"), GridEditCommandColumn)
           editColumn.Visible = False
        Else
            Dim editColumn As GridEditCommandColumn = CType(radFootNotes.MasterTableView.GetColumn("EditCommandColumn"), GridEditCommandColumn)
            If Not editColumn.Visible Then
                editColumn.Visible = True
            End If
        End If
    End Sub

Can I get some help??
Shinu
Top achievements
Rank 2
 answered on 25 Feb 2013
2 answers
117 views
i am current able to get all users for the first node (teamLeaderNode), but on the second node (projectGroupNode) it only add one node, even there are more record for projectgroupnode. projectSubGroupNode is only 1 record display even more record on the database. WOuld you be able advise, thank you



 private void BuildProjectTree()
        {
    
            EntityCollection<VwProjectCollectionEntity> collection = GetProjectData();
    
            treProjects.Nodes.Clear();
    
            ArrayList pgnodes = new ArrayList();
    
            RadTreeNode teamLeaderNode = null;
            RadTreeNode projectGroupNode = null;
            RadTreeNode projectSubGroupNode = null;
            RadTreeNode projectUserResponsibleNode = null;
            RadTreeNode projectWorkplaneNodeNode = null;
            RadTreeNode projectNode = null;
    
            foreach (VwProjectCollectionEntity p in collection)
            {
                teamLeaderNode = null;
                foreach (RadTreeNode n in pgnodes)
                {
                    if (n.Text.Trim().ToUpper() == p.TeamLeader.Trim().ToUpper())
                    {
                        
                        teamLeaderNode = n;
                        break;
                      
                    }
                   
                }
                if (teamLeaderNode != null)
                {
                    projectGroupNode = null;
                    foreach (RadTreeNode n in teamLeaderNode.Nodes)
                    {
    
                        if (n.Text.Trim() == p.ProjectGroupName.Trim())
                        {
                            projectGroupNode = n;
                            break;
                        }
    
                    }
    
    
                    if (projectGroupNode != null)
                    {
                        projectSubGroupNode = null;
                        foreach (RadTreeNode n in projectGroupNode.Nodes)
                        {
                            if (n.Text.Trim() == p.ProjectSubGroupName.Trim())
                            {
                                projectGroupNode = n;
                                break;
                            }
    
                        }
                        if (projectSubGroupNode != null)
                        {
                            projectNode = null;
                            foreach (RadTreeNode n in projectSubGroupNode.Nodes)
                            {
                                if (n.Text.Trim() == p.ProjectTitle.Trim())
                                {
                                    projectNode = n;
                                    break;
    
                                }
                            }
                        }
    
                    }
    
    
                }
                else
                {
    
                    teamLeaderNode = new RadTreeNode(p.TeamLeader.ToUpper());
                    projectGroupNode = new RadTreeNode(p.ProjectGroupName.Trim(), String.Empty);
                    projectSubGroupNode = new RadTreeNode(p.ProjectSubGroupName.Trim());
                    projectNode = new RadTreeNode(p.ProjectTitle.Trim() + " (" + p.ReferenceNumber + " " + "-" + " " + p.ProjectStatusName + ")",
                                                                      p.ProjectId.ToString(), BuildProjectNavigationUrl2(p, false));
    
                    pgnodes.Add(teamLeaderNode);
                    teamLeaderNode.Nodes.Add(projectGroupNode);
                    projectGroupNode.Nodes.Add(projectSubGroupNode);
                    projectSubGroupNode.Nodes.Add(projectNode);
                }
    
            }
    
            //pgnodes.Add(teamLeaderNode);
            foreach (RadTreeNode pg in pgnodes)
            {
    
                treProjects.Nodes.Add(pg);
            }
            //treProjects.ExpandAllNodes();
            treProjects.CollapseAllNodes();
            
        }
Bozhidar
Telerik team
 answered on 25 Feb 2013
2 answers
971 views
Can any tell me how to do  using javascript ? I find some code on the code library, but the RadGrid component version is too old.
My RadGrid is the newest !! 
Than's a lot !!
Eyup
Telerik team
 answered on 25 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?