Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
151 views
Can someone point me the right direction to implement a show a  Radwindow without refreshing the parent page in jquery and once the Radwindow is loaded, I need to make ajax calls from the Radwindow.

Thank you
Marin Bratanov
Telerik team
 answered on 19 Sep 2011
2 answers
91 views

Hello,

I have the following code which declares a radwindow in BasePage class, its works fine in aspx pages, but I can't use it in User Controls and Master Pages:

string BaseRadWindowID
        {
            get
            {
                return "UniqueBaseRadWindowID";
            }
        }
 
        RadWindow window = new RadWindow();// Create a enw Window
 
        RadWindow BaseRadWindow
        {
            get
            {
                return window;
            }
        }
 
        protected override void OnInit(EventArgs e)
        {
            this.window = new RadWindow();// Create a enw Window
            window.ID = BaseRadWindowID;// the id of the RadWindow;
            this.Form.Controls.Add(window);// Add it to the page
            base.OnInit(e);
        }
 
        public void ShowBaseRadWindow(bool visibleOnPageLoad, string navigationUrlQueryString)
        {
            BaseRadWindow.Width = Unit.Pixel(450);
            BaseRadWindow.Height = Unit.Pixel(150);
            BaseRadWindow.VisibleOnPageLoad = true;
            BaseRadWindow.VisibleStatusbar = true;
            BaseRadWindow.ReloadOnShow = true;
            BaseRadWindow.Modal = true;
            BaseRadWindow.Behaviors = WindowBehaviors.Close;
            BaseRadWindow.Style.Add("z-index", "10000");
            BaseRadWindow.NavigateUrl = "~/Pages/Messages/Default.aspx" + navigationUrlQueryString;
            BaseRadWindow.VisibleOnPageLoad = visibleOnPageLoad;
        }

I call the window in the aspx pages in this way:

this.ShowBaseRadWindow(true, string.Empty);

Please, I need your help in order to call the window and show it in User Controls and Master Pages.
It is very appreciated to send me the modified code.

Regards,
Bader

Bader
Top achievements
Rank 1
 answered on 18 Sep 2011
2 answers
200 views
How are you
I want to ask about important issue that i need to solve it as soon as possible
My scenario is RadGrid inside RadWindow, When I maximize The RadWindow, i need to maximIze RadGrid to fit the content of RadWindow also, when i return RadWindow to its normal size, i want RadGrid to return to its normal size
Also, PageSize DropDownList not working when Maximizing RadWindow;it works only when The RadWindow is in its normal size
My RadGrid uses UseStaticHeaders property to equal true and had fixed Width and Height
My RadWindow Markup is
 
<telerik:RadWindow ID="RadDeploymentWindow" Title="<%$ Resources:Text, DeploymentWizard %>"
    runat="server" VisibleOnPageLoad="false" VisibleStatusbar="false" Width="535px"
    Modal="true" Height="350px" Behaviors="Close,Move,Maximize,Reload " Skin="Windows7"
    IconUrl="~/Images/icons/Enterprise.png">
    <ContentTemplate>
My RadGrid Markup is
<telerik:RadGrid ID="DeploymentGrid" Skin="Office2007" runat="server" AutoGenerateColumns="False"
                                        AllowSorting="True" PageSize="10" ShowStatusBar="True" CellSpacing="0" GridLines="Both"
                                        AllowPaging="True" OnNeedDataSource="RadGrid_NeedDataSource" Height="225px" Width="516px">
                                        <ClientSettings>
                                            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                        </ClientSettings>
                                        <ExportSettings IgnorePaging="true" ExportOnlyData="true" OpenInNewWindow="true"
                                            HideStructureColumns="true" Excel-Format="Html" FileName="ErrorsAndWarnings">
                                        </ExportSettings>
                                        <MasterTableView DataKeyNames="ObjectID" AutoGenerateColumns="false" CommandItemDisplay="Top"
                                            CommandItemSettings-ShowAddNewRecordButton="false" CommandItemSettings-ShowRefreshButton="false">
                                            <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" />
                                            <ItemStyle Wrap="false" />
                                            <Columns>
                                                <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="ObjectID"
                                                    HeaderText="ID">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="ObjectType"
                                                    HeaderText="Type">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="Name" HeaderText="Name">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="Attribute"
                                                    HeaderText="Attribute">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="Error" HeaderText="Description">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="ProposedSoluation"
                                                    HeaderText="Proposed Solution">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="Severity"
                                                    HeaderText="Severity">
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                        </MasterTableView>
                                        <ClientSettings>
                                            <Resizing AllowColumnResize="True"></Resizing>                                            
                                        </ClientSettings>
                                    </telerik:RadGrid>
Ahmed
Top achievements
Rank 1
 answered on 18 Sep 2011
4 answers
155 views
I have a problem about checkbox and Web user control. I want tick checkbox when choose row in RadGrid. I use web page, I cant tick with this code:
var chbox = document.getElementById("checkbox1");
chbox.checked = true;

But when I use Web User Control, I have error. This code is not excute. Have you any idea? Thanks you very much!
Pham
Top achievements
Rank 1
 answered on 18 Sep 2011
4 answers
175 views
Hello,

I'm not sure if this is intended behavior, but it appears the pop-up modal edit form isn't so modal.  When in modal mode, you can actually tab through all the page controls.  If the control is a link and you press the enter key and it will post to the link.

You can try it out on the demo site:

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/popupeditform/defaultcs.aspx

I've attached an image of two modal windows open at the same time.

Al
alo
Top achievements
Rank 1
 answered on 18 Sep 2011
2 answers
70 views
Hello everyone. I apologize for my English but I am Italian. I have this need. In a page I have included a 
TabStrip that draws a grid (made in C #) that contains a button that when clicked load in 
a UserControl the same page. 
I wish that when the page loads, the part relating to the UserControl is 
immediately loaded down with a downward effect, with no need to click on the button. You can 
help me? Thanks to all.
Peter
Telerik team
 answered on 17 Sep 2011
1 answer
176 views
I have used the NestedView several times but this is the first time I see this error.
I have a RadChar and a RadGrid in the nested and when I click on any row at first time, then the nested doesn't open, but after, I can open all nested.
  • I tried  change de databind of radchart on OnItemCommand and but not work
  • If  I remove de ajax it works prefectly
  • The subRadGrid created in the nested work, and do databind in the OnItemDataBound correctly
Why I lost first click?

ASPX
<telerik:RadGrid ID="RadGridInfoRecharges"
            OnItemCommand="RadGridInfoRecharges_ItemCommand"
            OnItemDataBound="RadGrid1_ItemDataBound"
            Skin="Default"
            runat="server"
            AutoGenerateColumns="False"
            AllowPaging="True"
            GridLines="Horizontal"
            CssClass="groupBox">
        <ExportSettings ExportOnlyData="false" FileName="Recharges" 
            IgnorePaging="true" OpenInNewWindow="True">
            <Csv ColumnDelimiter="Semicolon" />
        </ExportSettings>
            <MasterTableView DataSourceID="ObjectDataSourceGetRecharges" PageSize="50" DataKeyNames="OwnerId">
                <NestedViewTemplate>
                        <asp:Panel ID="NestedViewPanel" CssClass="InfoRechargesDetails" runat="server" >
                            <telerik:RadGrid ID="RadGridInfoRechargesNested"
                                    Skin="Default"
                                    runat="server"
                                    AutoGenerateColumns="False"
                                    AllowPaging="False"
                                    GridLines="Horizontal">
                                <MasterTableView>
                                    <Columns>
                                        <telerik:GridBoundColumn HeaderText="Credit"  DataFormatString="{0:N0}" DataField="Credit" UniqueName="Credit"></telerik:GridBoundColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                            <telerik:RadChart ID="rcRechargesStatisticsRecharges" Width="900" Height="300" runat="server"
                            DefaultType="Line" Legend-Appearance-Visible="false" 
                            Legend-Visible="false" BorderWidth="0">
                            </telerik:RadChart>
                        </asp:Panel>
                </NestedViewTemplate>
                <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn HeaderText="OwnerId"  ItemStyle-HorizontalAlign="Right" DataField="OwnerId" UniqueName="OwnerId"></telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
    </telerik:RadGrid>


CS ItemDataBound
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
       {
           if (e.Item is GridNestedViewItem)
           {
               int OwnerId = ((RechargeItemByContract)e.Item.DataItem).OwnerId;
               RadChart rcRechargesStatisticsRecharges = (RadChart)e.Item.FindControl("rcRechargesStatisticsRecharges");
               RadChart rcRechargesStatisticsPrices = (RadChart)e.Item.FindControl("rcRechargesStatisticsPrices");
 
               // DATA
               List<RechargeItemLite> Data = RechargesBLL.GetRechargeItemLite(OwnerId);
 
               if (Data.Count > 1)
               {
                   rcRechargesStatisticsRecharges.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortDate;
                   rcRechargesStatisticsRecharges.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 45;
                   rcRechargesStatisticsRecharges.PlotArea.XAxis.AutoScale = false;
                   rcRechargesStatisticsRecharges.PlotArea.XAxis.IsZeroBased = false;
                   rcRechargesStatisticsRecharges.Legend.Visible = false;
                   rcRechargesStatisticsRecharges.ChartTitle.TextBlock.Text = "Creditos por recarga";
                   rcRechargesStatisticsRecharges.DataSource = Data;
                   double steps = (Data[0].OADate - Data[Data.Count - 1].OADate) / Data.Count;
                   rcRechargesStatisticsRecharges.PlotArea.XAxis.AddRange(Data[Data.Count - 1].OADate, Data[0].OADate, steps);
                   rcRechargesStatisticsRecharges.DataBind();
 
                   rcRechargesStatisticsRecharges.Series[0].DataXColumn = "OADate";
                   rcRechargesStatisticsRecharges.Series[1].Visible = false;
                   rcRechargesStatisticsRecharges.Series[2].Visible = false;
 
                   rcRechargesStatisticsRecharges.Visible = true;
               }
               else
                   rcRechargesStatisticsRecharges.Visible = false;

Or try
CS ItemComman
        protected void RadGridInfoRecharges_ItemCommand(object source, GridCommandEventArgs e)
        {
            // cazar el evento del expand/collapse
            if (e.CommandName == RadGrid.ExpandCollapseCommandName)
            {
                // Si el nestview no esta expandido significa que ahora es se expandera
                if (!e.Item.Expanded)
                {
                    #region declaraciones controles
                    RadGrid RadGridInfoRechargesNested = (RadGrid)((GridDataItem)e.Item).ChildItem.FindControl("RadGridInfoRechargesNested");
                    RadChart rcRechargesStatisticsRecharges = (RadChart)((GridDataItem)e.Item).ChildItem.FindControl("rcRechargesStatisticsRecharges");
                    RadChart rcRechargesStatisticsPrices = (RadChart)((GridDataItem)e.Item).ChildItem.FindControl("rcRechargesStatisticsPrices");
                    #endregion
                    // Extraemos la información de DataKeyValue desde la grid principal
                    int OwnerId = (int)((GridDataItem)e.Item).GetDataKeyValue("OwnerId");
 
                    // DATA
                    List<RechargeItemLite> Data = RechargesBLL.GetRechargeItemLite(OwnerId);
 
                    RadGridInfoRechargesNested.DataSource = Data;
                    RadGridInfoRechargesNested.DataBind();
 
                    if (Data.Count > 1)
                    {
                        rcRechargesStatisticsRecharges.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortDate;
                        rcRechargesStatisticsRecharges.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 45;
                        rcRechargesStatisticsRecharges.PlotArea.XAxis.AutoScale = false;
                        rcRechargesStatisticsRecharges.PlotArea.XAxis.IsZeroBased = false;
                        rcRechargesStatisticsRecharges.Legend.Visible = false;
                        rcRechargesStatisticsRecharges.ChartTitle.TextBlock.Text = "Creditos por recarga";
                        rcRechargesStatisticsRecharges.DataSource = Data;
                        double steps = (Data[0].OADate - Data[Data.Count - 1].OADate) / Data.Count;
                        rcRechargesStatisticsRecharges.PlotArea.XAxis.AddRange(Data[Data.Count - 1].OADate, Data[0].OADate, steps);
                        rcRechargesStatisticsRecharges.DataBind();
 
                        rcRechargesStatisticsRecharges.Series[0].DataXColumn = "OADate";
                        rcRechargesStatisticsRecharges.Series[1].Visible = false;
                        rcRechargesStatisticsRecharges.Series[2].Visible = false;
 
                        rcRechargesStatisticsRecharges.Visible = true;
                    }
                    else
                        rcRechargesStatisticsRecharges.Visible = false;
Pavlina
Telerik team
 answered on 17 Sep 2011
3 answers
194 views
Hi,

We are using Radscheduler in our project. We need to show the dropdown calendar near the Header "Today" with 2 months column in a row. so we made the following changes.
 
RadCalendar popupCalendar = RadScheduler1.FindControl("SelectedDateCalendar") as RadCalendar;
 popupCalendar.AutoPostBack = true;
 popupCalendar.MultiViewColumns = 2;

This code shows 2 months but the problem now is, we are not able to navigate to next, previous, fast next and fast previous navigation.
When we click the next button  nothing happens. It seems the Autopost back is not working even we gave that in our code.

Please help us to resolve this issue.

Gopakumar
Plamen
Telerik team
 answered on 17 Sep 2011
2 answers
163 views
Hello,

I was wondering teh following:
In search of SEO friendly url's Implemented "Routing" in my ASP.NET webform application. This gives us nice url's like:
 www.portal.com/products/Show/UX-7624
for example.
Now, working on a different application with AJAX and one page that loads usercontrols (modules) I was wondering how to combine the two of them. Is that even possible? Because the first application I mentioned does a URL click for a product view, while the second does it internal and keeps www.portal.com/default.aspx in the address bar...

Any ideas of experiance about this anyone?

Thanks,

Erik

Erik
Top achievements
Rank 2
 answered on 17 Sep 2011
2 answers
131 views
Hi,

I am having one issue with radGrid. I have nested radgrids and while exporting them to word, I get one extra inputbox in document, which is not visible in grid while pressing the export button.

Please check the attached images.

Here is the aspx page code for inner grid:
<telerik:RadGrid ID="radComments" AllowPaging="True" runat="server" PageSize="15" Skin="" GridLines="None" BorderStyle="None" BorderColor="Transparent" ShowHeader="false"                                                      OnItemCommand="radComments_ItemCommand" OnItemDataBound="radComments_ItemDataBound"                                          OnItemCreated="radComments_ItemCreated" Width="100%" EnableTheming="false" Style="padding-left: 16px;"               OnPageIndexChanged="radComments_PageIndexChanged">                                                                             <PagerStyle Mode="NumericPages" />                                                                                              <ExportSettings ExportOnlyData="true">                                                                                  </ExportSettings>
<MasterTableView TableLayout="Fixed" Width="100%" Height="100%" BorderStyle="None"                                          DataKeyNames="BookID,commentid,CommentAttachment,userid,Commenttype">                                                    <ItemTemplate>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td valign="top" align="left" style="text-align: center; width: 5%; border: 1px;border-style: solid; padding-bottom: 5px;" class="box-border">                                                                                                                            <asp:Image ImageAlign="AbsMiddle" ID="imgWriterImage" runat="server" />
</td>
<td width="20%" align="left">
<strong><%# Eval("UserName") + ":" %></strong>
</td>
<td class="altbg" width="45%" align="left"><%# Eval("Commenttext") %></td>
<td width="20%" align="left">
<asp:Label ID="lblType" runat="server" Text='<%# Eval("Commenttype") %>'></asp:Label>
</td>
<td id="tdEditDelete" runat="server" align="center" width="20%">
<asp:HiddenField ID="hdnCommentID" runat="server" Value='<%# Eval("commentid") %>' />
<asp:HiddenField ID="hdnBookID" runat="server" Value='<%# Eval("bookid") %>' />
<asp:ImageButton ID="btnImgEdit" runat="server" ImageUrl="~/Forum/ForumImages2/edit.gif" OnClientClick="Edit(this);return false;" ToolTip="Edit" />
<asp:ImageButton ID="btnImgDelete" runat="server" ImageUrl="~/Forum/ForumImages2/delete.gif"class="DelComment" ToolTip="Delete" /></td></tr></table>
</ItemTemplate>
</MasterTableView>
</telerik:RadGrid>

Why I am getting extra inputbox in word after export?
Daniel
Telerik team
 answered on 17 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?