Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
282 views
Hello all,

I need to open a RadWindow inside another RadWindow, but my requirement is to open child window bigger than the parent window.

The below article fulfills my requirement, but It is in Q3 version and I am using Q1 version.
http://demos.telerik.com/aspnet-ajax/window/examples/autosize/defaultcs.aspx

So please suggest, if there is any workaround in Q1 version.

Thanks
Mukesh
Danail Vasilev
Telerik team
 answered on 31 Jul 2013
15 answers
623 views
Hi All

My Layout is as follows:

Master Page (ScriptManager)
Content Page
  DropDownList
  RadDock
    asp:Panel
       UserControl (ascx)
           iFrame (ifmExcel)
           RadGrid

We have ajax settings so that the dropdownlist refreshes the user controls.  We would like to maintain this.  

The way I got the export to work with a REPEATER was using :

System.IO.

 

StringWriter stringWrite = new System.IO.StringWriter();

 

System.Web.UI.

 

HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);         

 

myRepeater.RenderControl(htmlWrite);

 

 

Session[

 

"ExportBody"] = stringWrite.ToString();

 

ifmExcel.Attributes.Add(

 

"src", "GenerateDownload.aspx");

The GenerateDownload would process the body and response.write as normal.

Is there something similiar we can do for the radgrid to have it loaded in an iframe or what's the best way to go about exporting the data?

I saw the render control for the rad grid, but if we can get it to use the export settings for the binary format in this setup that would be ideal.

Thanks in advanced.

 

Kyle
Top achievements
Rank 1
 answered on 31 Jul 2013
1 answer
89 views
Hi Telerik team,
I have a problem how to populate the data in one table using radgrid.
i'm using vb.net and asp.net
my RAW DATA like this:

  type      |         date
         
audio    |    15-02-2009
audio    |    01-03-2009
audio    |    09-04-2009
audio    |    12-05-2009
audio    |    12-06-2009

visual    |     02-01-2009
visual    |    14-02-2009
visual    |    16-03-2009
visual    |    18-04-2009

visual    |    12-06-2009
visual    |    20-06-2009

graphic |   20-06-2009

and  I want to develop a report like this. any suggestion or solution
====================================================================
type/month    01-2009    | 02-2009 | 03-2009 | 04-2009 | 05-2009 | 06-2009 | TOTAL        
audio                   0                1               1               1                1              1           6
visual                   1                1              1                1               0               2            6
graphic                0                 0               0                0              0               1           1
GRAND TOTAL          1            2              2                2              1              4            13


Thanks so much for helping and guiding me..
Pavlina
Telerik team
 answered on 31 Jul 2013
2 answers
163 views
I'm newbee to ASP.Net. Can anyone give me a code snippet for creating a cascading dropdownlists (Country,state and city) in radgrid, I see many post where in .aspx is used for this, but I want to create everything in .cs file. Its urgent, your help is highly appreciated.

Thanks,
Andy.
Andy
Top achievements
Rank 1
 answered on 31 Jul 2013
1 answer
121 views
I have 2 RadTreeViews and a FormView on a form.

When something is clicked from the first TreeView, it populates the second one.  When something is clicked from the second RadTreeView, it populates the FormView.  All of this works perfectly up to here.

When I click the "Edit" link button of the FormView at this point, nothing happens.  Even when i attempt to do it manually from code - nothing happens.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            </telerik:AjaxSetting>
             <telerik:AjaxSetting AjaxControlID="treeSellers">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="lblBuyers" UpdatePanelCssClass="" />
                     <telerik:AjaxUpdatedControl ControlID="treeBuyers" UpdatePanelCssClass="" />
                 </UpdatedControls>
             </telerik:AjaxSetting>
             <telerik:AjaxSetting AjaxControlID="treeBuyers">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="formBuyerDetails" UpdatePanelCssClass="" />
                 </UpdatedControls>
             </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

Simple Edit Button on the FormView's ItemTemplate:
<asp:LinkButton ID="link_edit" runat="server" CommandName="Edit">Edit</asp:LinkButton>


Protected Sub formBuyerDetails_ItemCommand(sender As Object, e As FormViewCommandEventArgs) Handles formBuyerDetails.ItemCommand
 
      If (e.CommandName = "Edit") Then
          formBuyerDetails.ChangeMode(FormViewMode.Edit) 'Doesnt Work
      ElseIf (e.CommandName = "Cancel") Then
          formBuyerDetails.ChangeMode(FormViewMode.ReadOnly) 'This probably doesnt either, but I cant even get here
      ElseIf (e.CommandName = "UpdateBuyer") Then
          'UPDATE function here
      End If
  End Sub

Konstantin Dikov
Telerik team
 answered on 31 Jul 2013
1 answer
100 views
I have the Telerik RadEditor  editor configured as a web part within my SharePoint 2010 Enterprise environment.  When I edit a specific content section on my SharePoint page from the ribbon, and go to into the Telerik RadEditor, it automatically opens the content view in Design mode. I would it to initially open the content in HTML mode, rather than Design mode.  Is this possible? If so how?

Thanks!
A2H
Top achievements
Rank 1
 answered on 31 Jul 2013
3 answers
196 views
Hello Teelrik Team,

I am using telerik V 2013 Q1 and the issue is regarding Allignment of Autocompletebox dropdown.

I am using Radautocompletebox with no item templete. Populating the search records with page method. One issues i am facing regardi g the allignment of Autocompletebox result box. I have tried all options to customize the css to allign left but failed.

Below is my aspx code snippet.

<td style="text-align: left">
                <telerik:RadAutoCompleteBox ID="RadAutoCompleteTeamLead" runat="server" Width="505"
                     DropDownHeight="200" DropDownWidth="470px"  Filter="StartsWith"
                     OnClientRequesting="requesting" OnClientDropDownOpening="dropDownOpening"
                    OnClientRequested="requested" OnClientEntryAdding="OnClientEntryAddingHandler"
                    OnClientRequestFailed="requestFailed">
                    <WebServiceSettings Method="GetPeople" Path="../../IncidentSubmission.aspx" />
                    <TextSettings SelectionMode="Multiple" />
                </telerik:RadAutoCompleteBox>
            </td>

Resultbox dropdown is not  alligning purely left but appears after 5/6 px width below the searchbox. I have gone through all threads and not found any proper resolution. Hope you guys will help me out.

Appreciate your quick reply.

Regards,
Saroj Nanda
Magdalena
Telerik team
 answered on 31 Jul 2013
4 answers
154 views
My client is requiring me to develop in IE7. The issue is that in IE7 when a user changes the column width and then chooses an action such as sort, the column size goes back to default width, rather than retaining the width the user selected.
Deyan Enchev
Telerik team
 answered on 31 Jul 2013
4 answers
166 views
I have a toolbar inside my CommandItem in RadGrid.
I'm able to correctly bubble events or fire custom events in the ItemCommand event.
The issue I'm facing is with RadToolBarSplitButton not persisting the button pressed after grid rebind.
For example one of my SplitButtons in the dropdown removes all filters like that

Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles RadGrid1.ItemCommand
            Select Case e.CommandName
                Case "ClearFilters"
                    For Each column As GridColumn In RadGrid1.MasterTableView.Columns
                        column.CurrentFilterFunction = GridKnownFunction.NoFilter
                        column.CurrentFilterValue = String.Empty
                    Next
                    RadGrid1.MasterTableView.FilterExpression = String.Empty
                    RadGrid1.MasterTableView.Rebind()
            End Select
End Sub

I've tryed to access the bar and set the defaultindex to persist the choice but that is overridden in the itemcreated event fired again after rebind. Any hint other than persisintg the choice somewhere (session/viewstate/cookie) and reading it in the ItemCreated event? Shouldn't this already be persisted (and restored) by default somewhere in cookie/viewstate/controlstate?. If this doesn't happens in a RadGrid/ItemCommand implementation how could I read the default persistence mechanism in the ItemCreated event without reinventing the wheel with my custom persistance?
What I tryed (with no success) is this:

        Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles RadGrid1.ItemCommand
            Select Case e.CommandName
                Case "ClearFilters"
                    Dim toolbar As RadToolBar = DirectCast(e.CommandSource, RadToolBar)
                    Dim button As RadToolBarSplitButton = DirectCast(toolbar.FindItemByText("Ricerca"), RadToolBarSplitButton)
                    button.EnableDefaultButton = True
                    button.DefaultButtonIndex = 2
 
                    For Each column As GridColumn In RadGrid1.MasterTableView.Columns
                        column.CurrentFilterFunction = GridKnownFunction.NoFilter
                        column.CurrentFilterValue = String.Empty
                    Next
                    RadGrid1.MasterTableView.FilterExpression = String.Empty
                    RadGrid1.MasterTableView.Rebind()
              End Select
End Sub

EDIT: if I bind RebindGridCommandName to the button, instead of my custom command (and in this case rebinding happens the same since the command is for refreshing the grid) this button is persisted without any addittional code handling. With my custom command intercepted in the ItemCommand event this doesn't happen
Kostadin
Telerik team
 answered on 31 Jul 2013
5 answers
491 views
Hi,

I have a rad button inside a command item template of a rad grid.  This button is used to show/hide the filter row of the grid.  My problem is that the button seems to lose its toggle state on post back. 

For example, if the current toggle state index of the button is 1 and then I do any action that causes a post back, the toggle state index of the button reverts back to 0.  How can I get it to maintain the same selected index.

Below is my code.

Thank you for your help.
Tracy

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm2.aspx.vb" Inherits="IPS_Gateway.WebForm2" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
 
</head>
 
<script type="text/javascript">
   function ShowHideFilter(sender, args) {
    var radGrid = $find("<%= rgvMainGrid.ClientID %>");
    var masterTable = radGrid.get_masterTableView();
    var toggleList = sender.get_selectedToggleStateIndex();
       switch (toggleList) {
          case 0:
               sender.set_toolTip('Show Filter Row');
               masterTable.hideFilterItem();
               break;
          case 1:
               sender.set_toolTip('Hide Filter Row');
               masterTable.showFilterItem();
               break;
    }
}
</script>
<body onkeydown="javascript:if(window.event.keyCode == 13) window.event.keyCode = 9;" >
    <form id="form1" runat="server">
    <act:ToolkitScriptManager ID="tsmManager"  runat="server"  EnablePartialRendering="true" AsyncPostBackTimeOut="600" />
     <telerik:RadAjaxManager  ID="ajaxManager" runat="server" > 
       <ClientEvents  />
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgvMainGrid"   >
             
                <UpdatedControls>                    
                    <telerik:AjaxUpdatedControl ControlID="rgvMainGrid" LoadingPanelID="ralpTimer" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
    <telerik:RadAjaxLoadingPanel ID="ralpTimer" runat="server" Skin="WebBlue"  EnableEmbeddedSkins="true"  BackgroundPosition="Center" >
        <wuc5:TimerControl ID="wucTimer" runat="server"  />    
    </telerik:RadAjaxLoadingPanel> 
 
    <asp:SqlDataSource ID="SQLDS_ArgusDBID"             runat="server"  ConnectionString="<%$ ConnectionStrings:IPSDataConnectionString %>"  SelectCommandType="StoredProcedure" SelectCommand="[Company].[DSP_CompanyMaster-Sel-Ins-Upd-Del]" />
    <asp:SqlDataSource ID="SQLDS_SecurityType"          runat="server"  ConnectionString="<%$ ConnectionStrings:IPSDataConnectionString %>"  SelectCommandType="StoredProcedure" SelectCommand="[Security].[DSP_SecurityIdentifiers-Sel-Ins-Upd-Del]" />
    <asp:SqlDataSource ID="SQLDS_SecurityUsers"         runat="server"  ConnectionString="<%$ ConnectionStrings:IPSDataConnectionString %>"  SelectCommandType="StoredProcedure" SelectCommand="[Security].[DSP_SecurityUsers-Sel-Ins-Upd-Del]" />
    <asp:SqlDataSource ID="SQLDS_SavedSettings"         runat="server"  ConnectionString="<%$ ConnectionStrings:IPSDataConnectionString %>"  SelectCommandType="StoredProcedure" SelectCommand="[System].[DSP_SavedSettings-Sel-Ins-Upd-Del]" />
                <asp:UpdatePanel ID="uppGrid" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <telerik:RadGrid ID="rgvMainGrid"       runat="server"                  DataSourceID="SQLDS_SecurityUsers"  
                             EnableEmbeddedSkins="true"         Skin="Office2010Silver"         Height="550px"  Width="1230px"
                             EnableViewState="true"             AutoGenerateColumns="false"     AllowMultiRowSelection="false"     
                             AllowFilteringByColumn="true"      EnableHeaderContextMenu="true"  EnableHeaderContextFilterMenu="true"    
                             AllowAutomaticDeletes="false"      AllowAutomaticInserts="false"   AllowAutomaticUpdates="false"                                  
                             AllowSorting="true"                EnableLinqExpressions="false"   AllowPaging="true"  PageSize="100" >                                 
                            <ItemStyle              Wrap="false"  />
                            <AlternatingItemStyle   Wrap="false" />
                            <ActiveItemStyle        BackColor="CornflowerBlue" />
                            <HeaderStyle            HorizontalAlign="Center"  />
                            <PagerStyle             AlwaysVisible="true"        Mode="NextPrevNumericAndAdvanced"/>
                            <EditItemStyle      BackColor="CornflowerBlue" />     
                            <ClientSettings     AllowColumnsReorder="true"      ReorderColumnsOnClient="true"       EnablePostBackOnRowClick="false"    EnableRowHoverStyle="false"   > 
                                <ClientEvents    />
                                <Resizing       AllowColumnResize="true"        EnableRealTimeResize="true"         ResizeGridOnColumnResize="true"  AllowRowResize="false"/>
                                <Selecting      AllowRowSelect="true"    />
                                <Scrolling      AllowScroll="true"              UseStaticHeaders="true" />                       
                            </ClientSettings>
                            <GroupHeaderItemStyle Font-Size="11px" Font-Names="calibri" Font-Bold="true"  Height="12px"/>
                            <ExportSettings Excel-FileExtension="xls"
                                            Excel-Format="Biff"      OpenInNewWindow="true"
                                            ExportOnlyData="true" IgnorePaging="true" UseItemStyles="true">
                                
                            </ExportSettings>
                            <MasterTableView    Name="Users"                    DataSourceID="SQLDS_SecurityUsers"  DataKeyNames="UserID"           ClientDataKeyNames="UserId"
                                                Width="1213px"                  EnableViewState="true"              EditMode="InPlace"              CommandItemDisplay="Top"
                                                 >                                                                                                             
                                <CommandItemTemplate>
                                    <div style="padding: 1px 0px 7px 0px;height:18px;">
                                        <telerik:RadButton ID="rbtAdd"              runat="server" SkinId="skn_RadGrid_Add"     CommandName="InitInsert"     />
                                        <telerik:RadButton ID="rbtEdit"             runat="server" SkinId="skn_RadGrid_Edit"    CommandName="EditSelected"   />
                                        <telerik:RadButton ID="rbtDelete"           runat="server" SkinId="skn_RadGrid_Delete"  CommandName="DeleteSelected" />
                                        <telerik:RadButton ID="rbtCancel"           runat="server" SkinId="skn_RadGrid_Cancel"  CommandName="CancelAll"      />
                                        <telerik:RadButton ID="rbtSaveNew"          runat="server" SkinId="skn_RadGrid_Save"    CommandName="PerformInsert"  />
                                        <telerik:RadButton ID="rbtSave"             runat="server" Skinid="skn_RadGrid_SaveNew" CommandName="UpdateEdited"   />
                                        <div  style="position:absolute;left:1037px;">
                                        <telerik:RadButton ID="rbtFilters"          runat="server" SkinId="skn_RadGrid_Filter"  ButtonType="StandardButton" ToggleType="CustomToggle" AutoPostBack="false"  EnableViewState="true"    OnClientToggleStateChanged="ShowHideFilter" >
                                            <ToggleStates>
                                                <telerik:RadButtonToggleState   PrimaryIconUrl="<%$ Resources:Images,FilterExpand16%>"     />
                                                <telerik:RadButtonToggleState   PrimaryIconUrl="<%$ Resources:Images,FilterCollapse16%>"    />
                                            </ToggleStates>
                                        </telerik:RadButton>                                    
                                    </div>
                                    </div>
                                </CommandItemTemplate>
                                <Columns>  
                                    <telerik:GridBoundColumn     DataField="UserId"          UniqueName="UserId"         HeaderText="Id"             HeaderStyle-Width="60px"     SortExpression="UserId"           FilterControlWidth="40px"  FilterImageUrl="<%$ Resources:Images,FilterGray16%>"   ReadOnly="true" />
                                    <telerik:GridBoundColumn     DataField="EmployeeLogin"   UniqueName="EmployeeLogin"  HeaderText="Login Id"       HeaderStyle-Width="150px"    SortExpression="EmployeeLogin"    FilterControlWidth="130px" FilterImageUrl="<%$ Resources:Images,FilterGray16%>" />
                                    <telerik:GridBoundColumn     DataField="EmployeeNumber"  UniqueName="EmployeeNumber" HeaderText="Emp #"          HeaderStyle-Width="80px"     SortExpression="EmployeeNumber"   FilterControlWidth="60px"  FilterImageUrl="<%$ Resources:Images,FilterGray16%>" ReadOnly="true" />                                     
                                    <telerik:GridBoundColumn     DataField="UserName"        UniqueName="UserName"       HeaderText="User Name"      HeaderStyle-Width="190px"    SortExpression="UserName"         FilterControlWidth="170px" FilterImageUrl="<%$ Resources:Images,FilterGray16%>" />
                                    <telerik:GridBoundColumn     DataField="EmailAddress"    UniqueName="EmailAddress"   HeaderText="Email Address"  HeaderStyle-Width="190px"    SortExpression="EmailAddress"     FilterControlWidth="170px" FilterImageUrl="<%$ Resources:Images,FilterGray16%>" />
                                    <telerik:GridDropDownColumn  DataField="SecurityType"    UniqueName="SecurityType"   HeaderText="Sec Type"       HeaderStyle-Width="100px"    SortExpression="SecurityType"     FilterControlWidth="70px"  FilterImageUrl="<%$ Resources:Images,FilterGray16%>"   DataSourceID="SQLDS_SecurityType" DefaultInsertValue="Group" DropDownControlType="DropDownList" ListTextField="LevelCode"  ListValueField="LevelCode"/>
                                    <telerik:GridDropDownColumn DataField="DefaultDBID"     UniqueName="DefaultDBID"    HeaderText="Default DBID"    HeaderStyle-Width="90px"     SortExpression="DefaultDBID"      FilterControlWidth="70px"  FilterImageUrl="<%$ Resources:Images,FilterGray16%>" DefaultInsertValue="IPSMAIN"  DataSourceID="SQLDS_ArgusDBID"      DropDownControlType="DropDownList"    ListTextField="ArgusDBID"  ListValueField="ArgusDBID" />                                                       
                                    <telerik:GridBoundColumn    DataField="CompanyCode"     UniqueName="CompanyCode"    HeaderText="Company"         HeaderStyle-Width="80px"     SortExpression="CompanyCode"      FilterControlWidth="60px"  FilterImageUrl="<%$ Resources:Images,FilterGray16%>" ReadOnly="true"/>                          
                                    <telerik:GridBoundColumn    DataField="EmployeeStatus"  UniqueName="EmployeeStatus" HeaderText="Employee Status" HeaderStyle-Width="110px"    SortExpression="EmployeeStatus"   FilterControlWidth="90px"  FilterImageUrl="<%$ Resources:Images,FilterGray16%>" ReadOnly="true"/>
                                    <telerik:GridBoundColumn    DataField="CreatedBy"       UniqueName="CreatedBy"      HeaderText="Created By"      HeaderStyle-Width="160px"    SortExpression="CreatedBy"        FilterControlWidth="140px" FilterImageUrl="<%$ Resources:Images,FilterGray16%>" Display="false"  ReadOnly="true"/>                          
                                    <telerik:GridBoundColumn    DataField="CreatedDate"     UniqueName="CreatedDate"    HeaderText="Created Date"    HeaderStyle-Width="160px"    SortExpression="CreatedDate"      FilterControlWidth="140px" FilterImageUrl="<%$ Resources:Images,FilterGray16%>" Display="false"  ReadOnly="true"/>                          
                                    <telerik:GridBoundColumn    DataField="UpdatedBy"       UniqueName="UpdatedBy"      HeaderText="Updated By"      HeaderStyle-Width="160px"    SortExpression="UpdatedBy"        FilterControlWidth="140px" FilterImageUrl="<%$ Resources:Images,FilterGray16%>" Display="false"  ReadOnly="true"/>                         
                                    <telerik:GridBoundColumn    DataField="UpdatedDate"     UniqueName="UpdatedDate"    HeaderText="Updated Date"    HeaderStyle-Width="160px"    SortExpression="UpdatedDate"      FilterControlWidth="140px" FilterImageUrl="<%$ Resources:Images,FilterGray16%>" Display="false"  ReadOnly="true"/>                        
                                    <telerik:GridBoundColumn    DataField="ActiveFlag"      UniqueName="ActiveFlag"     Visible="false"              />                          
                                     
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                   </ContentTemplate>
                </asp:UpdatePanel>
 
</form>
</body>
</html>
Tracy
Top achievements
Rank 1
 answered on 31 Jul 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?