Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
110 views
Hello

Scenario:
Using Masterpage and Contentpage. Contentpage calls Masterpage to open a different masterpage in a Radwindow.

I get the following errormessage:
Serverfehler in der Anwendung /.  
--------------------------------------------------------------------------------  
 
Dieser Seitentyp wird nicht verarbeitet.   
Beschreibung: Der angeforderte Seitentyp wird nicht verarbeitet, da er ausdrücklich verboten ist.  Die Erweiterung ".master" ist möglicherweise falsch.   Überprüfen Sie den unten angegebenen URL, und stellen Sie sicher, das er richtig geschrieben wurde.   
 
Angeforderter URL: /member/rw_select_supplier.master  
 
 
--------------------------------------------------------------------------------  
Versionsinformationen: Microsoft .NET Framework-Version:2.0.50727.3082; ASP.NET-Version:2.0.50727.3082  

Question:
Is it possible to load a "xyz.master" page in a RadWindow?

Guess:
A Masterpage can not be loaded in a Radwindow. Am i right?


TIA
Markus
Markus
Top achievements
Rank 1
 answered on 28 Aug 2009
4 answers
122 views
I have untill now been using the

TreeNodeExpandMode

 

.ServerSide expend mothod.

I have also a button that deletes nodes from my treeview.
It works fine as long as i use ServerSide expend mode.

This is my code:

 

protected

 

void Page_Load(object sender, EventArgs e)

 

{

    LoadRootNodes(catTreeView,

TreeNodeExpandMode.ServerSide);

 

}

 

 

protected

 

void NodeExpand(object sender, RadTreeNodeEventArgs e)

 

{

 

if (e.Node.Nodes.Count == 0)

 

PopulateNodeOnDemand(e,

TreeNodeExpandMode.ServerSide);

 

}

 

 

protected

 

void uxDeleteCategory_Click(object sender, EventArgs e)

 

{

 

LinkButton thisButton = (LinkButton)sender;

 

 

RadTreeNode thisNode = (RadTreeNode)thisButton.Parent;

 

 

int usedTimes = int.Parse(((Label)thisNode.FindControl("itemsCount")).Text);

 

 

if (thisNode.Nodes.Count == 0 && usedTimes == 0)

 

{

DeleteCategory(thisNode.Value);

thisNode.Remove();

}

 

else

 

message1.Message =

"Cannot delete this item!";

 

}

 

 

<

 

asp:LinkButton OnClientClick="return blockConfirm('Are you sure you want to delete this?', event, 330, 100,'','Delete Category');"

 

 

ID="deleteCategoryButton" OnClick="uxDeleteCategory_Click" runat="server" Text='<%$Resources:Delete %>'></asp:LinkButton>

 

 

 


The methods that populate and delete the actual items from the database are not included but are simply methods with linq code to do the required work.

Also, as you can see the delete is a simple link button, that causes a post back. And that is where the problem comes in.
As soon as i change my code to ServerSideCallBack expend method, i can no longer delete anything bellow the root in my treeview.
I can delete in the root because the root nodes are reloaded with the post back, but the other nodes are not.

I gather that i need to do my deleting in some different way when using ServerSideCallBack, can anyone tell me how i would go about that?

Thanks

A

 

Vesko
Top achievements
Rank 2
 answered on 28 Aug 2009
1 answer
184 views
 <telerik:RadGrid ID="dgAddCart" runat="server" AllowPaging="True" PageSize ="15" DataSourceID="SqlDataSource1"
                   GridLines="None" Skin="Black" HeaderStyle-Font-Bold ="true"  >
                    <ClientSettings>
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="335px" />
                        <Resizing AllowColumnResize="true" AllowRowResize="false" ResizeGridOnColumnResize="false"
                            ClipCellContentOnResize="true" />
                    </ClientSettings>

<telerik:GridBoundColumn DataField="Proposal_ID" HeaderText="Proposals"
                                SortExpression="Proposal_ID" UniqueName="Proposal_ID">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="EstTrials" DataType="System.Int32" FooterText="Total : "  Aggregate = "Sum"
                                HeaderText="Trials" SortExpression="EstTrials" UniqueName="Trials :">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="EstCost" DataType="System.Decimal" Aggregate="Sum"
                               DataFormatString ="{0:c}"  HeaderText="Cost" SortExpression="EstCost" UniqueName="Cost :">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CropName" HeaderText="CropName" Display = "false"
                                SortExpression="CropName" UniqueName="CropName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ProdName" HeaderText="ProdName" Display = "false"  
                                SortExpression="ProdName" UniqueName="ProdName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TerritoryName" HeaderText="TerritoryName" Display = "false"
                                ReadOnly="True" SortExpression="TerritoryName" UniqueName="TerritoryName">
                            </telerik:GridBoundColumn>
                            <telerik:GridButtonColumn ButtonType ="ImageButton" ImageUrl ="images/Delete.gif" HeaderText ="Remove">
                                          
                            </telerik:GridButtonColumn>

 <GroupByExpressions >                       
                        <telerik:GridGroupByExpression>                       
                        <SelectFields>
                        <telerik:GridGroupByField FieldName ="ProdName"
                                                  HeaderText ="Product"
                                                 
                                                  HeaderValueSeparator = " : " />
                        </SelectFields>         
 <GroupByFields >
                       <telerik:GridGroupByField FieldName ="ProdName"  />
                        <telerik:GridGroupByField FieldName ="TerritoryName" />
                        <telerik:GridGroupByField FieldName ="CropName" />
                        </GroupByFields>
                        </telerik:GridGroupByExpression>
                        </GroupByExpressions>
                    </mastertableview>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
                    ConnectionString="<%$ ConnectionStrings:GowanKB2ConnectionString %>"
                   
                    SelectCommand="SELECT [Proposal_ID], [EstTrials], [EstCost], [CropName], [ProdName], [TerritoryName] FROM [QryProposalGrpWithPests]"
                    ProviderName="<%$ ConnectionStrings:DevProviderName %>">
                </asp:SqlDataSource>



How to set this propery throught code behind. Its very urgent help me ?


I am most thankfull Princey
Thanks
Regards
Rahul Mahajan


Princy
Top achievements
Rank 2
 answered on 28 Aug 2009
3 answers
268 views

Hi,
I have two listbox controls both having SelectionMode="Multiple". First one is populated from object data source. Selecting an item in the first listbox causes the SelectedIndexChanged event to fire, where I populate the second one and select all items in it. Then I select an item in the second listbox in a browser and click a button (or cause any other postback). After that all items in the second listbox are selected again. I've found two ways to select something other than all items.
1. Selecting items while holding ctrl key seems to work, but it's not very handy.

2. In the second listbox moving the scrollbar, selecting an item and then causing postback gets all items unselected (even the one just selected). Then selecting works as expected.

here is my asp sample:

<div style="float: left; width: 150px">  
    <asp:Label ID="_lblBrokerLabel" runat="server" Text="Pośrednik:" /><br />  
    <telerik:RadListBox ID="_rlbBrokers" runat="server" DataSourceID="_odsBrokers" DataTextField="Name"  
        DataValueField="ID" Skin="Default" AutoPostBack="true" CausesValidation="false"  
        SelectionMode="Multiple" OnSelectedIndexChanged="BrokersChanged" Height="200" />  
    <asp:RequiredFieldValidator ControlToValidate="_rlbBrokers" Text="*" ID="_rfvBrokers"  
        runat="server" />  
    <asp:ObjectDataSource ID="_odsBrokers" runat="server" SelectMethod="GetUserBrokers"  
        TypeName="Ewita.Model.Entities">  
        <SelectParameters>  
            <asp:Parameter Name="userId" Type="Int32" />  
            <asp:Parameter Name="activeOnly" Type="Boolean" DefaultValue="False" />  
        </SelectParameters>  
    </asp:ObjectDataSource>  
</div>  
<div style="float: left; width: 150px">  
    <asp:Label ID="_lblWarehouseLabel" runat="server" Text="Magazyny:" /><br />  
    <telerik:RadListBox ID="_rlbWarehouses" runat="server" DataValueField="ID" Skin="Default"  
        SelectionMode="Multiple" Height="200">  
        <ItemTemplate>  
            <asp:Panel CssClass='<%# (bool)Eval("Active")?"":"inactive" %>' ID="_pnlWarehouse"  
                runat="server">  
                <%# Eval("Name") %>  
            </asp:Panel>  
        </ItemTemplate>  
    </telerik:RadListBox>  
    <asp:RequiredFieldValidator ControlToValidate="_rlbWarehouses" Text="*" ID="_rfvWarehouses"  
        runat="server" />  
</div> 

and here is code behind

        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (IsPostBack) return;  
            var user = (User)Session["user"];  
            _odsBrokers.SelectParameters["userId"].DefaultValue = user.ID.ToString();  
        }  
 
        protected void BrokersChanged(object sender, EventArgs e)  
        {  
            var warehouses = new List<Warehouse>();  
            var user = (User)Session["user"];  
            foreach (var item in _rlbBrokers.SelectedItems)  
            {  
                int brokerId;  
                if (!int.TryParse(item.Value, out brokerId)) continue;  
                warehouses.AddRange(Entities.Instance.GetUserWarehouses(brokerId, user.ID, false));  
            }  
            _rlbWarehouses.DataSource = warehouses;  
            _rlbWarehouses.DataBind();  
            foreach (RadListBoxItem item in _rlbWarehouses.Items)  
            {  
                item.Selected = true;  
            }  
        } 

I checked this issue on Opera and Firefox browsers. I'm using .net 3.5, visual studio 2008 and Telerik RadControls for ASP.NET Ajax v. 2009.2.701.35

Thanks in advance.

Regards
Paweł Aszklar

Genady Sergeev
Telerik team
 answered on 28 Aug 2009
1 answer
134 views
Hi, 

I have a grid call RadGridArea, in the PreRender event, I need to set the grid into edit mode in the
page load.  But I want to set the focus to an aspTextBox control.

How can I do? please help.

    protected void RadGridArea_PreRender(object sender, EventArgs e)
    {
        PropertyArea projarea = new PropertyArea();
        DataTable dt = projarea.GetPropertyAreaByPropertyId(this.property_id);

        if (dt.Rows.Count == 0)
        {
            for (int i = 0; i < this.RadGridArea.Items.Count; i++)
            {
                this.RadGridArea.MasterTableView.Items[i].Edit = true;
            }
            this.RadGridArea.Rebind();
        }

        if (!Page.IsPostBack)
        {
            string s = "<script type='text/javascript'>document.getElementById('" + this.txtPropertyName.ClientID + "').focus();</script>";
            ClientScript.RegisterStartupScript(Page.GetType(), Guid.NewGuid().ToString(), s, false);
        }
    }

The above coding is not work.

Regards,

Paul

Shinu
Top achievements
Rank 2
 answered on 28 Aug 2009
5 answers
107 views
I suspect the answer is no but here goes...

I have two treeviews on a page where the user needs to drag items from one tree to another, the problem is one of the trees has grown to the point where some nodes go so far down the page you can't see the other tree.

Is it possible to either make the page scroll up when you drag an item to the top of the screen, or automatically reposition itself when the drag starts so the other tree is in view (without losing the item you are dragging)?

Cheers

Jon
Yana
Telerik team
 answered on 28 Aug 2009
2 answers
96 views
I've noticed a few issues in the FormDecorator demo with IE7. I'm seeing them in the project I'm working on as well.

I'm using IE 7.0.5730.13. These problems do not appear in FireFox 3.5.

Decorated buttons seem to have too much padding on the left side. This can be seen on the 'First Look' demo page. The Submit Form button text is further to the right on the button.

DropDownList items are narrow. This can be seen on the 'First Look' demo as well. Looks like they need padding/margin.

The Submit Form button under Tab 2 of the 'Styling Radcontrols' demo has a break in the background image.
Georgi Tunev
Telerik team
 answered on 28 Aug 2009
2 answers
65 views
Is there a way to customize the message "Spell Checking Mode. Missed Spell words are high lighted in yellow"  <verylargefinishbutton> <cancel button>

I would like to get rid of the message in my web application, and shorten the finish button to just read finish.
Rumen
Telerik team
 answered on 28 Aug 2009
1 answer
139 views
Hi there,
I have coded something for creating an cnadlestick-chart with datetime values on x-axis using time.ToOADate().
The problem I have is that the Candlesticks Overlay each other somtimes.

Heres some Code:
RadChart1.PlotArea.XAxis.MinValue = startTime.ToOADate(); 
RadChart1.PlotArea.XAxis.MaxValue = endTime.ToOADate(); 
RadChart1.PlotArea.XAxis.IsZeroBased = false
RadChart1.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortTime; 
RadChart1.PlotArea.XAxis.Step = DateTime.Now.AddMinutes(10).ToOADate() - DateTime.Now.ToOADate(); 
RadChart1.PlotArea.XAxis.LabelStep = 6; 
 
while (startTime < endTime) 
RadChart1.Series[0].Items.Add(new Telerik.Charting.ChartSeriesItem { XValue = startTime.ToOADate(), YValue = begin, YValue2 = end, YValue3 = max, YValue4 = min }); 
startTime = startTime.AddMinutes(10); 
Please help.

Greetings Alex ;)

Edit:
Second problem, how can i add a linebreak to an tooltip-text?


Velin
Telerik team
 answered on 28 Aug 2009
1 answer
103 views
Hi Everyone,

I have created a splitbutton with 2 options:
1) Format HTML
2) Format Text

I have set the default button via the EnableDefaultButton=true and EnableDefaultButtonIndex and this all works as expected.
By default the Format HTML button is shown as the split button image, if I click on the down arrow to display the drop down and then click on the Format Text item in the drop down, no postback occurs.
The only thing that seems to cause a post back is if I select an item from the drop down and then click on the Split button.

Is this the way the Split button is supposed to work, or should I be getting a post when selecting an item from the drop down?

What am I doing wrong?

Many thanks
Antony
Yana
Telerik team
 answered on 28 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?