Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
171 views
If I'm using the Editor to manage content on a different domain, is there an easy way to set the base URL for the content displayed in the Editor so that images relative to the other domain will resolve?  I see that if I'm editing an entire HTML document, I have the ability to set the "Base location" in the "Page Properties."  Is there a way for me to set this value programmatically?
Rumen
Telerik team
 answered on 04 Jun 2010
2 answers
177 views
hi

how to list directory files in a radcombobox?

please help me..
thanks in advance...
geetha priya
Top achievements
Rank 1
 answered on 04 Jun 2010
1 answer
121 views

1. I have a grid that is created dynamically where col 1 has a dropdown box. Based on what the user selects in col 1,  I should show either a textbox or dropdownlist or datepicker in col 2. How can I accomplish this?

2. Also how do I handle events when the selecteditem in col 1 changes?

The data isn't coming from a datasource, I'll be creating each row programmatically.

Thanks

Yavor
Telerik team
 answered on 04 Jun 2010
1 answer
121 views
I'm attempting to use the Editor to manage content from a web site with a different URL than the site the Editor is hosted in.  I'd like to have the CSS styles drop-down list available styles from that external style sheet and also have that style sheet be applied to the content within the Editor so that it is displayed with the look-and-feel of the web site; however, based on some of the posts on this forum, it doesn't sound like the Editor can use an external style sheet on a different domain.  Is there a simple way to programmatically read the style sheet and add it to the CSS drop-down as well as apply it to the content area?
Rumen
Telerik team
 answered on 04 Jun 2010
1 answer
324 views
Test code below:

aspx
<telerik:RadGrid runat="server" ID="rgContents" AutoGenerateColumns="false"   
        AllowPaging="true" AllowCustomPaging="true" PageSize="10"   
        OnPageIndexChanged="rgContents_PageIndexChanged"   
        OnItemDataBound="rgContents_ItemDataBound">  
        <MasterTableView> 
            <Columns> 
                <telerik:GridTemplateColumn> 
                    <ItemTemplate> 
                        Times: <asp:Literal ID="ltlTimes" runat="server" /> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
            </Columns> 
        </MasterTableView> 
        <PagerStyle Mode="NextPrevNumericAndAdvanced" /> 
    </telerik:RadGrid> 

asp.cs
private int Times  
    {  
        get 
        {  
            return ViewState["Times"] != null ? (int)ViewState["Times"] : 0;  
        }  
        set 
        {  
            ViewState["Times"] = value;  
        }  
    }  
 
    protected void Page_Load(object sender, EventArgs e)  
    {  
        if (!IsPostBack)  
        {  
            Bind();  
        }  
    }  
 
    protected void rgContents_PageIndexChanged(object source, GridPageChangedEventArgs e)  
    {  
        rgContents.CurrentPageIndex = e.NewPageIndex;  
        Bind();  
    }  
 
    protected void rgContents_ItemDataBound(object sender, GridItemEventArgs e)  
    {  
        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)  
        {  
            Times = Times + 1;  
            Literal ltlTimes = e.Item.FindControl("ltlTimes"as Literal;  
            ltlTimes.Text = Times.ToString();  
        }  
    }  
 
    private void Bind()  
    {  
        var biz = new ContentBiz();  
        var contents = biz.GetAll();  
 
        int pageSize = rgContents.PageSize;  
        int start = rgContents.CurrentPageIndex * pageSize;  
        int count = contents.Count();  
 
        var dataSource = contents.Skip(start).Take(pageSize);  
 
        rgContents.VirtualItemCount = count;  
        rgContents.DataSource = dataSource;  
        rgContents.DataBind();  
    } 

when I change page index post back will fire itemdatabound twice.
I am call rgContents.DataBind() in the rgContents_PageIndexChanged, this line code will cause that.
and when use NeedDataSource will correct, but above code why cannot work correct?

Shinu
Top achievements
Rank 2
 answered on 04 Jun 2010
1 answer
236 views

I've spent some time trying to bind a dataset to a treeview where there are three tables each with a different set of columns.

Three tables; Customer, Order and LineItem

Customer [CustomerId, Name]
Order [OrderId, CustomerId, OrderReference]
LineItem [LineItemId, OrderId, ProductName, Quantity]

The theory was... Create a Dataset with apporpriate relations and bind it server side. However it doesn't seem to work - I only can see the top level and if as I specify the DataMember attribute, It doesn't even use the name property to set the text.

Any help appreciated. Is the only solution to create the nodes server side programatically and add them to the tree?

 

 

<telerik:RadTreeView ID="treeCustomer" runat="server">

 

 

 

<DataBindings>

 

 

 

<telerik:RadTreeNodeBinding Depth="0" TextField="Name" ValueField="CustomerId" DataMember="Customer" />

 

 

 

<telerik:RadTreeNodeBinding Depth="1" TextField="OrderReference" ValueField="OrderId" DataMember="Order" />

 

 

 

<telerik:RadTreeNodeBinding Depth="2" TextField="ProductName" ValueField="LineItemId" DataMember="LineItem" />

 

 

 

</DataBindings>

 

 

 

</telerik:RadTreeView>

 

Nikolay Tsenkov
Telerik team
 answered on 04 Jun 2010
1 answer
110 views
Hi All

I have the google filtering in the grid working as per link below. I am using usercontrols loaded view ajax as per below.
Now I have noticed with enableviewstate= false, sorting paging all work, but when I page I get two calls to code to get records from the database.

If i turn viewstate on for sorting the column name etc dispears but I only get one call to the database code.

This is a screen that clients use a lot and the extra call to the database slows things down a lot

http://demos.telerik.com/aspnet-ajax/ajax/examples/common/loadingusercontrols/defaultcs.aspx
http://www.telerik.com/support/kb/aspnet-ajax/grid/google-suggest-style-filtering-in-radgrid.aspx
Yavor
Telerik team
 answered on 04 Jun 2010
2 answers
267 views
Hi,
I'm trying to implement a custom table editor and as part of this i would like the tables content not to be editable in the editor.
I would also like the content of the editor to have a doctype.
Below is a small code sample, the problem I am having is that is is still possible to put the cursor inside the table and edit the content.
Any help would be greatly appreciated.
thanks

   <telerik:RadScriptManager ID="ScriptManager1" runat="server" /> 
   <telerik:RadEditor runat="server" ID="RadEditor1" SkinID="MinimalSetOfTools" Height="400px"
      <ContextMenus> 
         <telerik:EditorContextMenu TagName="TABLE"
            <telerik:EditorTool Name="EditTable" Text="Edit" /> 
         </telerik:EditorContextMenu> 
         <telerik:EditorContextMenu TagName="TH"
            <telerik:EditorTool Name="EditTable" Text="Edit" /> 
         </telerik:EditorContextMenu> 
         <telerik:EditorContextMenu TagName="TR"
            <telerik:EditorTool Name="EditTable" Text="Edit" /> 
         </telerik:EditorContextMenu> 
         <telerik:EditorContextMenu TagName="TD"
            <telerik:EditorTool Name="EditTable" Text="Edit" /> 
         </telerik:EditorContextMenu> 
      </ContextMenus> 
      <Content> 
         <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
         <html xmlns="http://www.w3.org/1999/xhtml" > 
            <body> 
               Right-click on image to see custom menu 
               <img style="marign-left: 6px" width="179px" height="28px" src="../../Img/productLogoLight.gif" /><br/><br/> 
               <p>Right-click here to see the custom Paragraph menu.<br/></p><br/> 
               Right-click on the link to see the default link menu disabled: <href="/">www.telerik.com</a> 
               <table> 
                  <tr> 
                     <td><div  contentEditable="false" unselectable="on">table content</div></td> 
                  </tr> 
               </table> 
            </body> 
         </html> 
      </Content> 
   </telerik:RadEditor> 

[EDIT: the browser I'm using is IE8]
cheeves
Top achievements
Rank 1
 answered on 04 Jun 2010
0 answers
94 views
Hello,

I have a problem with RadComboBox. The problem is that RadComboBox with the same data is working ok on some clients and very slow on other clients. We tested this problem on 6 different clients with the same browser (firefox 3.6.3) and it was working slow on 3 of 6 clients.
We are using Telerik version of dll: 2009.3.1103.35.

Aleš Leskovar




Aleš
Top achievements
Rank 1
 asked on 04 Jun 2010
1 answer
129 views
Hi all,
            I am binding the tab strip from a SiteMapDatasource. I need to hide the child tabs , is there any way to accomplish this

Regards

Thomson
Princy
Top achievements
Rank 2
 answered on 04 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?