Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
416 views
As a workaround to this thread post with no replies I'm trying to put a RadComboBox into a user control.  However, the combo box data events arent being fired like the ItemCreated event.  The data source is binding, but the combo box ends up empty when it loads. 

The user control (I left out the javascript).  
            <telerik:RadComboBox ID="RadComboBox1" Runat="server"  
                EmptyMessage="Set Team and Coach Access" AllowCustomText="true" 
                DataTextField="Person" OnClientDropDownClosed="onDropDownClosing" 
                HighlightTemplatedItems="True" ItemCreated="RadComboBox1_ItemCreated" 
                Width="214px"> 
                        <ExpandAnimation Type="OutElastic" Duration="300" /> 
                        <CollapseAnimation Type="InElastic" Duration="200" /> 
                        <ItemTemplate> 
                            <div onclick="StopPropagation(event)" class="combo-item-template"> 
                                <asp:CheckBox runat="server" ID="chk1" Checked="false" onclick="onCheckBoxClick(this)"/> 
                                <asp:Label runat="server" ID="Label1" AssociatedControlID="chk1" Text='<%# Eval("Person") %>'> 
                                </asp:Label> 
                            </div> 
                        </ItemTemplate>                 
            </telerik:RadComboBox> 
            <p> 
                <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' 
                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button>&nbsp; 
                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>            
            </p> 
          </div> 
           
            <asp:XmlDataSource ID="XmlDataSource1" runat="server" OnDataBinding="BindData"  
                DataFile="~/TestDataSources/AccessList.xml"></asp:XmlDataSource>      

The user control code behind
 
        public void BindData(object sender, EventArgs e) 
        { 
            base.OnDataBinding(e); 
        } 
 
        protected void RadComboBox1_ItemCreated(object sender, RadComboBoxItemEventArgs e) 
        { 
            RadComboBoxItem newItem = e.Item; 
            if (newItem.Text == "Paris") 
                newItem.Enabled = false; 
        } 


The .net page below is what puts this user control above into a RadGrid EditFormSettings.  Its connected to a master page which wraps a ContentPlaceHolder with a RadAjaxPanel.
        <telerik:RadGrid ID="RadGrid1" runat="server"  
            AllowPaging="True" AllowSorting="True" GridLines="None"  
            ShowGroupPanel="True" Width="795px" Style="margin-left:15px;" 
        DataSourceID="XmlDataSource2" AutoGenerateDeleteColumn="True" ShowStatusBar="true" 
            AutoGenerateEditColumn="True" > 
                <MasterTableView autogeneratecolumns="False" EditMode="PopUp" CommandItemDisplay="Top"  
                datasourceid="XmlDataSource2"> 
                    <NoRecordsTemplate> 
                         <div>No journal entries exist yet.  Click "Add new record" above.</div> 
                    </NoRecordsTemplate>                 
                    <RowIndicatorColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </ExpandCollapseColumn> 
                    <commanditemsettings addnewrecordtext="Add new Journal entry" /> 
                    <Columns> 
                        <telerik:GridBoundColumn DataField="Title" HeaderText="Title"  
                SortExpression="Title" UniqueName="Title"> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Private" HeaderText="Private"  
                SortExpression="Private" UniqueName="Private"> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Replies" HeaderText="Replies"  
                SortExpression="Replies" UniqueName="Replies"> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Created" HeaderText="Created"  
                SortExpression="Created" UniqueName="Created"> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="LastReply" HeaderText="LastReply"  
                            SortExpression="LastReply" UniqueName="LastReply"> 
                        </telerik:GridBoundColumn> 
                    </Columns> 
                    <EditFormSettings EditFormType="WebUserControl"  
                        UserControlName="../../UserControls/Forms/Journal.ascx"  
                        InsertCaption="New Journal Entry" PopUpSettings-Modal="true"  
                        CaptionFormatString="Journal Entry On {0}" 
                CaptionDataField="Created" > 
                        <EditColumn UniqueName="EditCommandColumn1"></EditColumn> 
 
<PopUpSettings Modal="True"></PopUpSettings> 
                    </EditFormSettings>                 
                </MasterTableView> 
                <clientsettings allowdragtogroup="True"> 
                </clientsettings> 
            </telerik:RadGrid> 

So the hierarchy is
MasterPage - RadAjax Panel - ConentPlaceholder - asp.net page - RadGrid - EditForm - UserControl


Simon
Telerik team
 answered on 19 Dec 2009
1 answer
128 views
I have a RadGrid in a RadWindow as illustrated by the following code:

        <div id="DetailWindow"> 
            <telerik:RadWindow ID="RadWindowRealMcCoy" runat="server" VisibleOnPageLoad="false" 
                Title="Manager Returns" Width="900px" 
                Height="520px" Behaviors="Resize, Minimize, Close, Maximize, Move" 
                OffsetElementID="formRealMcCoy" Left="0px" Top="0px"  
                ShowContentDuringLoad="True" onclientclose="SaveSizeAndPosition"  
                onunload="RadWindowRealMcCoy_Unload" VisibleStatusbar="False" OnClientDragEnd="SaveSizeAndPosition"> 
                <ContentTemplate> 
                    <telerik:RadGrid ID="RadGridManagerHistory" runat="server"   
                        DataSourceID="ObjectDataSourceManagerReturns" GridLines="None" BorderStyle="None" BorderWidth="0px" 
                        CssClass="Ironwood" onitemdatabound="RadGridManagerHistory_ItemDataBound"> 
                        <MasterTableView AutoGenerateColumns="False" DataSourceID="ObjectDataSourceManagerReturns"> 
                        <RowIndicatorColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                        </RowIndicatorColumn> 
 
                        <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                        </ExpandCollapseColumn> 
                            <Columns> 
                                <telerik:GridBoundColumn DataField="PeriodDate" DataFormatString="{0:MMM yy}"  
                                    DataType="System.DateTime" DefaultInsertValue="" HeaderText="Date"  
                                    SortExpression="PeriodDate" UniqueName="PeriodDate"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Center" /> 
                                    <HeaderStyle HorizontalAlign="Center" /> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridNumericColumn DataField="PriorMonthEndBalance"  NumericType="Currency" 
                                    HeaderText="Prior Month End Cap." SortExpression="PriorMonthEndBalance"  
                                    DataFormatString="{0:C0}" UniqueName="PriorMonthEndBalance"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" /> 
                                    <HeaderStyle HorizontalAlign="Right" /> 
                                </telerik:GridNumericColumn> 
                                <telerik:GridNumericColumn DataField="ContributionsWithdrawals"  NumericType="Currency" 
                                    HeaderText="Contrib/Wdr" SortExpression="ContributionsWithdrawals"  
                                    DataFormatString="{0:C0}" UniqueName="ContributionsWithdrawals"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" /> 
                                    <HeaderStyle HorizontalAlign="Right" /> 
                                </telerik:GridNumericColumn> 
                                <telerik:GridNumericColumn DataField="BeginBalance"  NumericType="Currency"  
                                    HeaderText="Begin Capital" SortExpression="BeginBalance"  
                                    DataFormatString="{0:C0}" UniqueName="BeginBalance"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" /> 
                                    <HeaderStyle HorizontalAlign="Right" /> 
                                </telerik:GridNumericColumn> 
                                <telerik:GridNumericColumn DataField="TotalIncome" NumericType="Currency"  
                                    HeaderText="Inc/Loss" SortExpression="TotalIncome"  
                                    DataFormatString="{0:C0}" UniqueName="TotalIncome"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" /> 
                                    <HeaderStyle HorizontalAlign="Right" /> 
                                </telerik:GridNumericColumn> 
                                <telerik:GridNumericColumn DataField="EndBalance" NumericType="Currency"  
                                    HeaderText="End Capital" SortExpression="EndBalance"  
                                    DataFormatString="{0:C0}" UniqueName="EndBalance"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" /> 
                                    <HeaderStyle HorizontalAlign="Right" /> 
                                </telerik:GridNumericColumn> 
                                <telerik:GridNumericColumn DataField="YTDIncome" NumericType="Currency"  
                                    HeaderText="YTD Income" SortExpression="YTDIncome"  
                                    DataFormatString="{0:C0}" UniqueName="YTDIncome"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" /> 
                                    <HeaderStyle HorizontalAlign="Right" /> 
                                </telerik:GridNumericColumn> 
                                <telerik:GridNumericColumn DataField="MTDReturn" NumericType="Percent"  
                                    HeaderText="MTD ROR" SortExpression="MTDReturn"  
                                    DataFormatString="{0:P}" UniqueName="MTDReturn"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" /> 
                                    <HeaderStyle HorizontalAlign="Right" /> 
                                </telerik:GridNumericColumn> 
                                <telerik:GridNumericColumn DataField="QTDReturn" NumericType="Percent"  
                                    HeaderText="QTD ROR" SortExpression="QTDReturn"  
                                    DataFormatString="{0:P}" UniqueName="QTDReturn"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" /> 
                                    <HeaderStyle HorizontalAlign="Right" /> 
                                </telerik:GridNumericColumn> 
                                <telerik:GridNumericColumn DataField="YTDReturn" NumericType="Percent"  
                                    HeaderText="YTD ROR" SortExpression="YTDReturn"  
                                    DataFormatString="{0:P}" UniqueName="YTDReturn"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" /> 
                                    <HeaderStyle HorizontalAlign="Right" /> 
                                </telerik:GridNumericColumn> 
                                <telerik:GridNumericColumn DataField="MTDAttribution" NumericType="Percent"  
                                    HeaderText="MTD Attrib." SortExpression="MTDAttribution"  
                                    DataFormatString="{0:P}" UniqueName="MTDAttribution"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" /> 
                                    <HeaderStyle HorizontalAlign="Right" /> 
                                </telerik:GridNumericColumn> 
                                <telerik:GridNumericColumn DataField="QTDAttribution" NumericType="Percent"  
                                    HeaderText="QTD Attrib." SortExpression="QTDAttribution"  
                                    DataFormatString="{0:P}" UniqueName="QTDAttribution"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" /> 
                                    <HeaderStyle HorizontalAlign="Right" /> 
                                </telerik:GridNumericColumn> 
                                <telerik:GridNumericColumn DataField="YTDAttribution" NumericType="Percent"  
                                    HeaderText="YTD Attrib." SortExpression="YTDAttribution"  
                                    DataFormatString="{0:P}" UniqueName="YTDAttribution"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" /> 
                                    <HeaderStyle HorizontalAlign="Right" /> 
                                </telerik:GridNumericColumn> 
                                <telerik:GridNumericColumn DataField="Allocation" NumericType="Percent"  
                                    HeaderText="Allocation" SortExpression="Allocation"  
                                    DataFormatString="{0:P}" UniqueName="Allocation"> 
                                    <ItemStyle Wrap="False" HorizontalAlign="Right" /> 
                                    <HeaderStyle HorizontalAlign="Right" /> 
                                </telerik:GridNumericColumn> 
                            </Columns> 
                        </MasterTableView> 
                    </telerik:RadGrid> 
                </ContentTemplate> 
            </telerik:RadWindow>         
        </div> 
 

When I display this window in any browser other than IE7, it displays as I want it to. However in IE7, it displays with the rows expanding to occupy the entire height of the window. See the attached images. Is there a workaround to prevent the rows from expanding?

Dimo
Telerik team
 answered on 19 Dec 2009
3 answers
84 views
Hello,
         I m using Visual studio 2005 and Telerik RadControls for ASP.Net AJAX Q3 2009. I want to use list view on one of my pages. I added it  but when I tried to go to Open Layout Editor in Designer Window the application crashed. Is this a known issue? Is there a work around for this?.. Please let me know.

Thanks,
Bharani
Rosen
Telerik team
 answered on 19 Dec 2009
10 answers
154 views
Can someone point me in the right direction for the service pack download.

Thanks
Simon
Top achievements
Rank 1
 answered on 19 Dec 2009
3 answers
142 views
Hi,
 Just a small question, but can you advise briefly on the technical steps required to upgrade the MOSS Editor Lite to the Full Commercial version - I'd like to use the lite version ASAP while a business case is raised for the purchase of the full version, but want to be sure in the meanwhile that if we upgrade later, the existing content created wont be lost.

 Thanks,
Jason.
Lini
Telerik team
 answered on 19 Dec 2009
2 answers
176 views
Hi Gang,

I've implemented the solution documented on one of your blog to load on demand the RadComboBox with a MVC JSON request. 

I'm having a hard time trying to figure out if and how I can group entries server side (or even on the client).

Any help would be greatly appreciated :)

Regards,

LF
Laurent Fabre
Top achievements
Rank 2
 answered on 19 Dec 2009
3 answers
174 views
I have the OnClientNodeClicked subscribed to a function which calls the toggle method on the node.  However, the node is only toggling when the user clicks the inner text of the node (rtIn).  How can I make the node toggle when any part of the node panel is clicked?  Similar to the way the menu in the Telerik Demo page works on the left hand side.  Any help would be appreciated.  I've included some code to further illustrate.  Thank you.

<telerik:RadTreeView runat="server" ID="trtvLeftNav" LoadingStatusPosition="BeforeNodeText" Skin="TreeLeft" 
    AllowNodeEditing="False" EnableDragAndDrop="false" EnableEmbeddedSkins="false" 
    EnableEmbeddedBaseStylesheet="false" OnClientDoubleClick="OnClientDoubleClickHandler" 
    OnClientNodeExpanding="toggleHandler" OnClientNodeCollapsing="toggleHandler" 
    OnClientNodeClicked="OnClientNodeClickedHandler"> 
    <Nodes> 
        <telerik:RadTreeNode runat="server" Text="Our Products" ExpandMode="ClientSide"> 
        </telerik:RadTreeNode> 
        <telerik:RadTreeNode runat="server" Text="Root Node" ExpandMode="ClientSide"> 
            <nodes> 
                <telerik:RadTreeNode runat="server" Text="Child Node" ExpandMode="ClientSide"> 
                </telerik:RadTreeNode> 
            </nodes> 
        </telerik:RadTreeNode> 
        <telerik:RadTreeNode runat="server" Text="Root Node 2" ExpandMode="ClientSide"> 
        </telerik:RadTreeNode> 
    </Nodes> 
</telerik:RadTreeView> 
<script type="text/javascript"> 
var cancel = false; 
 
function toggleHandler(sender, eventArgs) 
{ 
    eventArgs.set_cancel(cancel); 
    cancel = false; 
} 
 
function OnClientDoubleClickHandler(sender, eventArgs) 
{ 
    cancel = true; 
} 
 
function OnClientNodeClickedHandler(sender, eventArgs)  
{  var node = eventArgs.get_node();  
   node.toggle();      
}  
</script> 

Brad H
Top achievements
Rank 2
 answered on 18 Dec 2009
5 answers
250 views
Hi All,

I need help. I am using RadGrid for Read News page. I want to display one news per page. Also, I have an other page which is news list display. what I am doing is: when user click news title(from news list page) open my read news page(it has RadGrid) and display that news, also on the bottom have page navigator, which is user click next news it will open next news.
My problem is I cannot open user clicked news. It always open my last news. So, I need some one help me to fix this problem.

Thanks.
Nurmemet Suleiman
Top achievements
Rank 1
 answered on 18 Dec 2009
1 answer
110 views
Where's the HeaderTemplate support in RadListBox?  This functionality exists in RadComboBox.  I don't want all the functionality of a datagrid, just a listbox with columns and a header.  Anyone else want to see this?

Thanks,
Karlin

Simon
Telerik team
 answered on 18 Dec 2009
6 answers
183 views
I am working on a project that requires an administrator to set the layout of custom user controls for use on a client facing portal.  I started using this example

When the end-user views the page there should be no dock functionality, so, can all the dock functionality such as drag/drop, layout styling and minimize/close be removed?  Or should I just parse the JSON that gets stored in the db and load the controls that way?

Thanks.
Alex
Top achievements
Rank 1
 answered on 18 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?