Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
476 views
I have a RadComboBox control inside an EditTemplate of a GridView:

                                        <telerik:GridTemplateColumn HeaderText="Phone process" UniqueName="PhoneProcess" Display="false" EditFormColumnIndex="1">  
                                            <EditItemTemplate> 
                                                <div style="width:30ex;margin-right:1ex;">  
                                                    <telerik:RadComboBox runat="server" ID="ddlPhoneProcess"    
                                                        Width="100%" 
                                                        EmptyMessage="No phone processes found"     
                                                        AllowCustomText="false"                                                                  
                                                        DataValueField="Key" 
                                                        DataTextField="Value" 
                                                        AppendDataBoundItems="true" 
                                                        AutoPostBack="true" 
                                                        OnSelectedIndexChanged="ddlPhoneProcess_SelectedIndexChanged" 
                                                        SelectedValue='<%# Bind("PhoneProcessId")%>' 
                                                        > 
                                                        <Items> 
                                                            <telerik:RadComboBoxItem  runat="server" Text="-- Not set --" Value="-1" Selected="true" />                                                              
                                                        </Items> 
                                                    </telerik:RadComboBox> 
                                                </div> 
                                           </EditItemTemplate> 
                                        </telerik:GridTemplateColumn> 
 
In the code-behind I databind the combo like this:
            RadComboBox combo = editItem["PhoneProcess"].FindControl("ddlPhoneProcess") as RadComboBox;  
            Dictionary<int, string> phoneProcesses = DataManagers.Proxy.DmPhone.GetPhoneProcesses();  
            combo.DataSource = phoneProcesses;  
            combo.DataBind();  
 
This produces an InvalidOperationException"Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.". The error doesn't make much sense since the GridView is properly bound and other telerik controls, like 

RadNumericTextBox 

 

in other template columns bind with no problem.

If I databind the combo with DataSourceID="xxx" to a SqlDataSource, there is no error.

Could be that databinding via DataSource property somehow messes up the context of the databound control?

Simon
Telerik team
 answered on 04 Mar 2010
1 answer
90 views
Hello,

We have several toolbar items on our editor including the LinkManager and TableWizard.   After following the documentation and updating the DialogsCssFile for the editors via a skin file (Using Office2007 theme) we are missing the styling for the dialogs.

I've included a screenshot of the correct styled dialog from your hosted demo:  http://i.imgur.com/t4yve.jpg
And the missing styles from our hosted site:http://i.imgur.com/NTpZw.png

We are using a different ToolBar theme (Default theme) in our skin file, could this be messing up our dialogs?
If not, any idea what we're missing as far as styles go?  

Thanks a bunch!
Allen
Dobromir
Telerik team
 answered on 04 Mar 2010
3 answers
117 views
Hi,
I'm using the load-on-demand WCF WebService according to the example for this in the documentation in
http://www.telerik.com/help/aspnet-ajax/treeview-wcf-load-on-demand.html 

and

ms-help://MS.VSCC.v90/MS.VSIPCC.v90/telerik.aspnetajax.radcontrols.2009.Q2/telerik.aspnetajax.radtreeview.2009.Q2/data-binding-load-on-demand-webservice.html

It works fine, except for the fact that, no matter how many new levels I add to the tree, the RadTreeNodeData parentNode paramenter in the WCF Signature (again, just as it is in the example):
    [OperationContract]
    public RadTreeNodeData[] GetData(RadTreeNodeData parentNode, IDictionary<string, object> context)
    {...}

is always NULL.

What to I need to do to get this parameter set?

Thanks!
Richard
Dimitar Milushev
Telerik team
 answered on 04 Mar 2010
1 answer
103 views

Really simple question.  im working on the layout and design of my grid.  how do i fill my ascx radgrid with dummy data?  not looking to databind it to anything, just want to put 1 or 2 rows of dummy data in the columns collection.

<telerik:RadGrid ID="RadGrid1" runat="server" Width="95%" AutoGenerateColumns="False" 
    PageSize="5" AllowSorting="True" AllowPaging="True" GridLines="None" ShowStatusBar="True" 
    > 
    <PagerStyle Mode="NumericPages"></PagerStyle> 
    <MasterTableView Width="100%" HierarchyLoadMode="ServerBind" DataKeyNames="ID"   
    HierarchyDefaultExpanded="True" 
    PageSize="5">  
        <DetailTables> 
            <telerik:GridTableView runat="server" DataKeyNames="ID" Caption="Document Versions" 
                PageSize="5">  
                <ParentTableRelation> 
                    <telerik:GridRelationFields DetailKeyField="ID" MasterKeyField="ID" /> 
                </ParentTableRelation> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="ID" Visible="false" UniqueName="ID">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="DocumentNumber" HeaderText="Document Number" 
                        UniqueName="DocumentNumber">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Version" HeaderText="Document Version" UniqueName="Version">  
                    </telerik:GridBoundColumn> 
                </Columns> 
            </telerik:GridTableView> 
            <telerik:GridTableView runat="server" DataKeyNames="ID" Caption="Document Title" 
                PageSize="5">  
                <ParentTableRelation> 
                    <telerik:GridRelationFields DetailKeyField="ID" MasterKeyField="ID" /> 
                </ParentTableRelation> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="ID" Visible="false" UniqueName="ID">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Title" UniqueName="Document Title">  
                    </telerik:GridBoundColumn> 
                </Columns> 
            </telerik:GridTableView> 
        </DetailTables> 
        <ExpandCollapseColumn Visible="True">  
        </ExpandCollapseColumn> 
        <Columns> 
            <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" UniqueName="ID" Visible="False" /> 
            <telerik:GridBoundColumn DataField="documentTitle" HeaderText="Document Title" UniqueName="documentTitle" 
                SortExpression="documentTitle" /> 
            <telerik:GridBoundColumn DataField="Primary POC" HeaderText="Primary POC" UniqueName="Primary POC" 
                ReadOnly="True" SortExpression="Primary POC" /> 
        </Columns> 
    </MasterTableView> 
    <FilterMenu EnableTheming="True">  
        <CollapseAnimation Duration="200" Type="OutQuint" /> 
    </FilterMenu> 
</telerik:RadGrid> 

J
Schlurk
Top achievements
Rank 2
 answered on 04 Mar 2010
1 answer
306 views
I'd like to get the ASP.NET ID of a control that IS A RadTab.  RadTab inherits from ControlItem, which seems to cover up the ASP.NET ID with its own property.

 

// Summary:

 

 

// The ID property is reserved for internal use. Please use the Telerik.Web.UI.ControlItem.Value

 

 

// property or use the Telerik.Web.UI.Attributes collection if you need to assign

 

 

// custom data to the item.

Is there a way to get or set the ID, so that I can locate a specific tab on the server side polymorphically?

 

Yana
Telerik team
 answered on 04 Mar 2010
1 answer
319 views
I have a GridTemplateColumn inside a RadGrid but not sure how to access the controls.

<telerik:GridTemplateColumn UniqueName="TemplateColumn1">  
    <ItemTemplate> 
        <div> 
            <table> 
                <tr> 
                    <td colspan="2">  
                        <telerik:RadComboBox ID="rdDDB" runat="server" 
                         onload="rdDDB_Load">  
                        </telerik:RadComboBox>                                                  
                    </td> 
                </tr> 
                <tr> 
                    <td>Action 1</td> 
                    <td>Action 2</td> 
                </tr> 
            </table> 
        </div> 
    </ItemTemplate> 
</telerik:GridTemplateColumn> 

I know that to probably access that particular row I should look it during the RadGrid ItemDataBound event
protected void PManagerReqStmtGrid_ItemDataBound(object sender, GridItemEventArgs e)  
{  
    RadComboBox rd = RadGrid.MasterTableView.Columns.FindByUniqueName("TemplateColumn1");  

Any suggestions?

J
robertw102
Top achievements
Rank 1
 answered on 04 Mar 2010
1 answer
125 views
What is the proper way to do this? Currently I'm storing the command name of the clicked button in a variable, then checking that varibale after the postback (but that just seems wrong). Can anyone show me the correct way to determine which button was clicked in OnRequestEnd.
Yana
Telerik team
 answered on 04 Mar 2010
1 answer
135 views
We are using the FileExplorer as part of a document managment system and a client requirement is that documents should show a 'friendly name'. E.g. document1.doc should be shown to the end user as 'Policy 1'. I have written my own file system provider and have been able to add 'friendly name' as an extra column (friendly name is stored in an SQL server database with other document properties).

Is is possible to override the 'Filename' column text with the friendly name from the database (so I can keep the icon and sub folder links) in the first column of the grid?

Thank you for your help.
Fiko
Telerik team
 answered on 04 Mar 2010
3 answers
110 views

Hi all,

I have a Web Page which contains a RadMenu and a ASP Panel.

Everytime a user clicks on a RadMenuItem I'm loading dynamically a usercontrol:

        Panel.Controls.Clear();
        UserControl c = (UserControl)LoadControl("~/UserControls/" + userControl.TrimEnd());
        c.ID = c.ToString();        
        Panel.Controls.Add(c);

The problem is that in this new usercontrol I'm trying to recreate below demo just like it is, inside the usercontrol:

It doesn't work at all! The RadCalendar doesn't even fire RadCalendar1_SelectionChanged event!

Can you provide me a simple example/project accomplishing this ? ? ?

(I have tried recreating this demo inside a normal Web Page and it works fine)

I'm using VS2008 SP1 with Telerik AJAX 2009.3.1314.35

Thanks for your help.

Nuno




Radoslav
Telerik team
 answered on 04 Mar 2010
3 answers
156 views
Hi all,

I have a RadComboBox with the AllowCustomText property set to true, and I need to provide users with the facility to spell check their entry. I've done this by simply adding a RadSpell control as follows:

<telerik:RadComboBox 
    ID="rcbsScopeOfWorkGroupDescription" 
    runat="server" 
    AppendDataBoundItems="true" 
    AllowCustomText="true" 
    DataSourceID="odsScopeOfWorkGroupDescription" 
    DataTextField="sScopeOfWorkGroupDescription" 
    DataValueField="sScopeOfWorkGroupDescription" 
    Text='<%# Bind("sScopeOfWorkGroupDescription") %>'
    <Items> 
        <telerik:RadComboBoxItem Text="" Value="" /> 
    </Items> 
</telerik:RadComboBox> 
<telerik:RadSpell 
    ID="rssScopeOfWorkGroupDescription" 
    runat="server" 
    ControlToCheck="rcbsScopeOfWorkGroupDescription" 
    IsClientID="false" 
    DictionaryLanguage="en-AU" 
    DictionaryPath="~/App_Data/RadSpell" /> 

This popup correctly finds all spelling errors, but clicking Change does not update the RadComboBox's value. The strange thing is, if I do click on change, close the spell checker, and then re-run the spell check it says that it can't find any errors. Obviously the RadSpell control is updating some field, but not the one that is used for the display or for the saving of the data.

Any tips would be greatly appreciated!
Rumen
Telerik team
 answered on 04 Mar 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?