Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
181 views
is it possible to have a confirmation popup on a particular menu item click?
I need to perform some server side coding when this particular menu item is clicked, and i need user to confirm this before proceeding to my logic.
thanks in advance
sf
Top achievements
Rank 1
 answered on 11 Nov 2010
3 answers
231 views
Hi there, I'm having a problem with rad tab and window.
One window opens another window in it and the issue is the inner window doesn't show on the taskbar.

/* This is the source */
 
function GetRadWindow() {
 var oWindow = null;
 if (window.radWindow)
   oWindow = window.radWindow;
 else if (window.frameElement.radWindow)
   oWindow = window.frameElement.radWindow;
 return oWindow;
}
 
/* opening new window*/
  var urlvalue = 'www.google.com?id='21312';
  oBrowserWnd = GetRadWindow().BrowserWindow;
  var oManager = GetRadWindow().get_windowManager();
  var otabStrip = GetRadWindow().correspondingTabStrip;
  oManager.open(urlvalue, null);
  oManager.maximizeAll();
 
/* adding tab. this not working correctly I think*/
otabStrip.trackChanges();
var tab = new Telerik.Web.UI.RadTab();
tab.set_text('a');
oWnd.correspondingTab = tab;
otabStrip.get_tabs().add(tab);
otabStrip.repaint();
tab.correspondingWnd = oWnd;
tab.set_imageUrl(item.get_imageUrl());
otabStrip.commitChanges();
tab.select();


Shinee
Top achievements
Rank 1
 answered on 11 Nov 2010
2 answers
113 views

Hi,

RadGrid has a dynamic float column. Some of its values are getting converted incorrectly to datetime (e.g.: 11.9 to 11/09/2010). May I know if there's a way to prevent this without having to go by column name?

Here's the definition of radgrid in the page:
 

  <telerik:RadGrid ID="grdReportData" runat="server" PageSize="20" AllowSorting="True"

                    AllowPaging="True" AutoGenerateColumns="True" CssClass="grid" ClientSettings-Resizing-AllowColumnResize="true"

                    ClientSettings-Resizing-ResizeGridOnColumnResize="true" ShowFooter="true">

                    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
 
                    <MasterTableView Width="100%" TableLayout="Fixed">
                            <NoRecordsTemplate>
                             No records exist for the given criteria.

                            </NoRecordsTemplate>  

                    </MasterTableView>
                </telerik:RadGrid>

Any help is appreciated.
Regards,
Mohan.

 

 

 

 

 

 

 

 

 

Mohan Gali
Top achievements
Rank 1
 answered on 10 Nov 2010
1 answer
175 views
Hello,

I have a grid that I am exporting to ExcelML, when I export to standard Excel, all the columns export, but when I choose ML, only one column is exported, the Date Added Column. 

<telerik:RadGrid ID="gridConditions" runat="server" EnableTheming="False" Skin="WebBlue"
                        AllowPaging="True" AllowSorting="True" GridLines="Both" AutoGenerateColumns="False"
                        OnNeedDataSource="gridConditions_NeedDataSource" PageSize="15" OnItemDataBound="gridConditions_ItemDataBound"
                        ShowGroupPanel="false" AllowFilteringByColumn="false" OnCancelCommand="gridConditions_CancelCommand"
                        OnEditCommand="gridConditions_EditCommand" OnExcelMLExportRowCreated="gridConditions_ExcelMLExportRowCreated"
                        OnExcelMLExportStylesCreated="gridConditions_ExcelMLExportStylesCreated" OnItemCommand="gridConditions_ItemCommand">
                        <PagerStyle Mode="Slider" />
                        <ExportSettings IgnorePaging="true" OpenInNewWindow="true" FileName="ConditionsExport"
                            ExportOnlyData="true">
                            <Excel Format="ExcelML" />
                        </ExportSettings>
                        <MasterTableView NoMasterRecordsText="There are no conditions to display. If you applied filters, you may need to broaden your search."
                            CommandItemDisplay="Bottom">
                            <CommandItemTemplate>
                                <table width="100%">
                                    <tr>
                                        <td align="right">
                                            <asp:Button ID="ExportToExcelButton" runat="server" Width="100%" CommandName="ExportToExcel"
                                                Text="Export To Excel" />
                                        </td>
                                    </tr>
                                </table>
                            </CommandItemTemplate>
                            <ExpandCollapseColumn Visible="True">
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridBoundColumn DataField="ConditionId" SortExpression="ConditionId" UniqueName="ConditionId" Visible="False" />
                                <telerik:GridTemplateColumn HeaderStyle-Width="100px" HeaderText="Condition ID" SortExpression="ConditionIdentifier"
                                    DataField="ConditionIdentifier">
                                    <ItemTemplate>
                                        <asp:HyperLink CssClass="ConditionHyperLink" ID="EditLink" runat="server" Text='<%#Eval("ConditionIdentifier") %>'></asp:HyperLink>
                                    </ItemTemplate>
                                    <HeaderStyle Width="100px"></HeaderStyle>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn AllowSorting="False" DataField="Summary" HeaderText="Summary" UniqueName="Summary" FilterControlWidth="200px" />
                                <telerik:GridBoundColumn DataField="IdentifiedByFullName" HeaderStyle-Width="120px" HeaderText="Identified By" SortExpression="IdentifiedByLastName" UniqueName="IdentifiedByFullName" />
                                <telerik:GridDateTimeColumn DataField="DateCreated" HeaderStyle-Width="100px" HeaderText="Date Added" SortExpression="DateCreated" UniqueName="DateCreated" DataFormatString="{0:d}" />
                                <telerik:GridBoundColumn DataField="ConditionStatusName" HeaderStyle-Width="100px" HeaderText="Status" SortExpression="ConditionStatusName" UniqueName="ConditionStatusName" />
                                <telerik:GridDateTimeColumn DataField="ActualDueDate" HeaderStyle-Width="100px" HeaderText="Due Date" SortExpression="ActualDueDate" UniqueName="ActualDueDate" DataFormatString="{0:d}" EmptyDataText="Not Set" >
                                    <ItemStyle Font-Bold="True" ForeColor="Red" />
                                </telerik:GridDateTimeColumn>
                                <telerik:GridButtonColumn CommandName="Edit" HeaderText="Edit" UniqueName="Edit" HeaderStyle-Width="20px" Text="Edit" ButtonType="ImageButton" ItemStyle-HorizontalAlign="Center">
                                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                </telerik:GridButtonColumn>
                            </Columns>
                            
                        </MasterTableView>
                        <ClientSettings>
                            <Selecting AllowRowSelect="false" />
                        </ClientSettings>
                    </telerik:RadGrid>


Code behind for the export options:

bool isConfigured = false;
        protected void gridConditions_ExcelMLExportRowCreated(object sender, Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowCreatedArgs e)
        {
            if(e.RowType == GridExportExcelMLRowType.HeaderRow)
            {
                gridConditions.Rebind();  //workaround to get the template column's content
            }
            if (e.RowType == GridExportExcelMLRowType.DataRow)
            {
                if (!isConfigured)
                {
                    //Set Worksheet name
                    e.Worksheet.Name = "Conditions List";
 
                    //Set Column widths
                    foreach (ColumnElement column in e.Worksheet.Table.Columns)
                    {
                        if (e.Worksheet.Table.Columns.IndexOf(column) == 2)
                            column.Attributes["ss:Width"] = "180"; //set width 180 to ProductName column
                        else
                            column.Attributes["ss:Width"] = "80"; //set width 80 to the rest of the columns
                    }
 
                    //Set Page options
                    PageSetupElement pageSetup = e.Worksheet.WorksheetOptions.PageSetup;
                    pageSetup.PageLayoutElement.IsCenteredVertical = true;
                    pageSetup.PageLayoutElement.IsCenteredHorizontal = true;
                    pageSetup.PageMarginsElement.Left = 0.5;
                    pageSetup.PageMarginsElement.Top = 0.5;
                    pageSetup.PageMarginsElement.Right = 0.5;
                    pageSetup.PageMarginsElement.Bottom = 0.5;
                    pageSetup.PageLayoutElement.PageOrientation = PageOrientationType.Landscape;
 
                    //Freeze panes
                    e.Worksheet.WorksheetOptions.AllowFreezePanes = true;
                    e.Worksheet.WorksheetOptions.LeftColumnRightPaneNumber = 1;
                    e.Worksheet.WorksheetOptions.TopRowBottomPaneNumber = 1;
                    e.Worksheet.WorksheetOptions.SplitHorizontalOffset = 1;
                    e.Worksheet.WorksheetOptions.SplitVerticalOffest = 1;
 
                    isConfigured = true;
                }
            }
        }
 
        protected void gridConditions_ExcelMLExportStylesCreated(object sender, Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLStyleCreatedArgs e)
        {
            //Apply background colors
            foreach (StyleElement style in e.Styles)
            {
                if (style.Id == "headerStyle")
                {
                    style.InteriorStyle.Pattern = InteriorPatternType.Solid;
                    style.InteriorStyle.Color = System.Drawing.Color.Gray;
                }
                if (style.Id == "alternatingItemStyle")
                {
                    style.InteriorStyle.Pattern = InteriorPatternType.Solid;
                    style.InteriorStyle.Color = System.Drawing.Color.LightGray;
                }
                if (style.Id.Contains("itemStyle"))
                {
                    style.InteriorStyle.Pattern = InteriorPatternType.Solid;
                    style.InteriorStyle.Color = System.Drawing.Color.White;
                }
            }
        }


Any thoughts to what might be causing this?

Here is my grid code:

Daniel
Telerik team
 answered on 10 Nov 2010
5 answers
97 views
Hi, I try to implement very nice example with editing grid on doubleclick, but have some problem.
Look at the example: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultcs.aspx
There is a column "In stock". During editing the values are loaded from DataSource1. Is it possible to load the date from different DataSource (not the same as RadGrid). As I saw somewher there is no DataSource proprties on GridDropDownListColumnEditor...
ToMa
Top achievements
Rank 1
 answered on 10 Nov 2010
0 answers
75 views
I am using teh Rad combo Box in teh Telrik Grid templete column. i am binding that with datasource. right now there are three values in it. when i am selecting the value and click the mouse somewhere
Victor
Top achievements
Rank 1
 asked on 10 Nov 2010
2 answers
103 views

This is an fyi post for anyone one who might be have a simular problem.  I plan on submitting a problem ticket as well.  

I have a project which requires two listboxes (transfer back and forth).  The "select from listbox" contains a list of Clients (with each client having a corresponding time zone.  One of the requirements is have a dropdown containing time zones just below the "select from listbox".  When you select a timezone from the dropdown, the Listbox should select all Clients with matching timezones (so you can easily transfer all clients for that time zone). 

No real problem so far, I simply added the RadListBoxItems to the Listbox one at a time looping through the datatable setting the time zone of the client to the tooltip of the RadListBoxItem.  With some javascript I snagged from the forums here I was able to loop through the listbox and compare the tooltip with the dropdown selected value, selecting the item if it matches.

Instead of turning on AutoPostBackOnTransfer, I added a button "Sort Lists" that can be clicked if the user feels the need to sort the lists.  

Here's where the problem occurs, it seems as though any RadListBoxItem that is moved during the SortItems process looses it's tooltip (if an item isn't moved the tooltip will reamin).

I was able to work around this problem by adding an attribute to the RadListBoxItem (it seems attributes do persist after a sort) and then looping through the ListBox after SortItems and reassigning the Tooltip.

markup :

<table><tr>
     <td valign="top">
          <asp:Label ID="lblPracticeSelect" runat="server" Text="Practice Select:"></asp:Label><br />
          <telerik:RadListBox ID="rlbPracticeSelect" runat="server" Height="257px" Width="225px" 
                                  AllowTransfer="True" AllowTransferOnDoubleClick="True" EnableDragAndDrop="True" 
                 EnableMarkMatches="true" SelectionMode="Multiple" TransferToID="rlbPracticeSearch">
                    <ButtonSettings TransferButtons="All"  />
          </telerik:RadListBox>
                <br />
                <br />
          <asp:Label ID="Label3" runat="server" Text="Time Zone:" Visible="false" />
          <asp:DropDownList ID="ddlTimeZone" runat="server"  Width="185px" OnChange="selectItems()">
               <asp:ListItem Selected="True" Text="Select Practice(s) in Time Zone" Value="0" />
               <asp:ListItem Text="EST" Value="EST" />
               <asp:ListItem Text="CST" Value="CST" />
               <asp:ListItem Text="MST" Value="MST" />
               <asp:ListItem Text="PST" Value="PST" />
               <asp:ListItem Text="AKST" Value="AKST" />
               <asp:ListItem Text="HST" Value="HST" />
          </asp:DropDownList>
     </td>
     <td align="left" valign="top">
          <asp:Label ID="lblPracticeSearch" runat="server" Text="Practice Search:"></asp:Label><br />
          <telerik:RadListBox ID="rlbPracticeSearch" runat="server" Width="180px" Height="257px" 
                    AllowTransfer="True" AllowTransferOnDoubleClick="True" EnableDragAndDrop="True" 
                    EnableMarkMatches="true" SelectionMode="Multiple" TransferToID="rlbPracticeSelect">
                    <ButtonSettings ShowTransfer="false" ShowTransferAll="false" />
          </telerik:RadListBox>
                <br />
                <br />
          <asp:Label ID="lblTimeZone" runat="server" Text=""></asp:Label>
          <asp:CustomValidator ID="cvPractice" runat="server" ValidationGroup="SearchSummary" 
                    Display="Dynamic" ErrorMessage="Please select at least one Practice." 
                    ClientValidationFunction="ValidatePractices"> </asp:CustomValidator>
     </td>
<tr>
     <td  colspan=2>
          <asp:Button ID="btnSort" runat="server" Text="Sort Lists" Width="80px" />
     </td>
</tr>
</table>

javascript:
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script language="javascript" type="text/javascript">        
     function filterListBox(sender, e) {
  
            var list = $find("<%= rlbPracticeSelect.ClientID %>");
            var tz = document.getElementById('<%=ddlTimeZone.ClientID %>');
  
            var items = list.get_items();
            for (var i = 0; i < items.get_count(); i++) {
                var item = items.getItem(i);
                  
                var itemTimeZone = item._element.title;
                item.unselect();
                if (itemTimeZone == tz.value) {
                    //list.transferToDestination(item);
                    item.select();
                    item.scrollIntoView();
                }
            }
             
        }</script>  
      
    </telerik:RadScriptBlock>

code behind:
Private Sub LoadPractices()
    Try
        rlbPracticeSelect.Items.Clear()
        rlbPracticeSearch.Items.Clear()
        Dim dt As DataTable = GetAllPractices()
        If dt.Rows.Count > 0 Then
            With rlbPracticeSelect
                Dim dr As DataRow
                For Each dr In dt.Rows
                    Dim rItem As New RadListBoxItem(dr("Name").ToString, dr("ID").ToString)
                    rItem.ToolTip = dr("TimeZone").ToString
                    rItem.Attributes.Add("TimeZone", dr("TimeZone").ToString)
                    .Items.Add(rItem)
                Next
            End With
        End If
    Catch ex As Exception
        Dim sError As String = ex.Message
    Finally
    End Try
End Sub

when the sort button is clicked:
Private Sub btnSort_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSort.Click
    rlbPracticeSearch.SortItems()
    rlbPracticeSelect.SortItems()
    Dim itmSelect As RadListBoxItem
    For Each itmSelect In rlbPracticeSelect.Items
        itmSelect.ToolTip = itmSelect.Attributes("TimeZone")
    Next
    Dim itmSearch As RadListBoxItem
    For Each itmSearch In rlbPracticeSearch.Items
        itmSearch.ToolTip = itmSearch.Attributes("TimeZone")
    Next
End Sub

Matthew Johnson
Top achievements
Rank 1
 answered on 10 Nov 2010
1 answer
105 views
I've added a chart to my project and am now getting this error. This is an old project I inherited from another programmer. I'm using Q!2010 now, there weren't any Telerik controls previously, or maybe there were and when they weren't used it wasn't cleaned up properly. Anyway I have no idea how to remove anything from the GAC so if someone could help me out here...

CS0433: The type 'Telerik.Charting.Styles.FillStyleSeries' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\4d20d014\b4535af6\assembly\dl3\0a6c2faf\0053f0c5_92f6ca01\Telerik.Web.UI.DLL' and 'c:\WINDOWS\assembly\GAC_MSIL\Telerik.Charting\2.0.1.0__d14f3dcc8e3e8763\Telerik.Charting.dll'

Thanks,
Celeste
Celeste
Top achievements
Rank 1
 answered on 10 Nov 2010
1 answer
83 views
Greetings,

I have been working with a site where administrators can change the color of the site. I have been trying to style my PanelBar to inherit the values from parent. I have tried some of the style examples provided with demo and few different ways. So far I had no luck. I was wondering if there is simple setting I can set to make background color to parent color?

Thanks in advance
Atchuta
Nikolay Tsenkov
Telerik team
 answered on 10 Nov 2010
1 answer
109 views
Hi all,
what i am trying to do is have two treeviews on a page.  one is bound to a datasource with checkboxes.

What i want to happen is that as a user checks the checkboxes in one treeview, just the checked items appear in the second treeview.

I tried to bind the second treeview to the RadTreeView1.Checknodes list, but that list does not maintain the different levels of the item.  eg.  a list like
  • A
    • B
    • C
    • D
  • E
    • F

So if i select A (that is set to select all the children as well) binding to the checkednodes just gives a flat treeview

  • A
  • B
  • C
  • D

I want to to come out indented as the original.

Note: if B is selected, A is selected as a partial selection (tristate checkbox) so the full branch should always be selected.

Ideas?

Nikolay Tsenkov
Telerik team
 answered on 10 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?