Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
157 views
Hello,

I have a rad combo as:

<t:RadComboBox ...>
   <ItemTemplate>
        <asp:Label ID="lbl" runat="server" Value='<%# Eval("Name") %>' />, 
        <asp:Label ID="lbl2" runat="server" Value='<%# Eval("EmpNo") %>' />

       <asp:HiddenField ID="hdn" runat="server" Value='<%# Eval("Key") %>' />
   </ItemTemplate>
</t:RadComboBox>

Now, if I use the web service binding approach, i can supply the text, values, etc., but is it possible to bind data related to these fields being bound?

Thanks.
Veselin Vasilev
Telerik team
 answered on 25 Feb 2009
1 answer
145 views
I have a custom control which inserts java script into an Ajax panel. The java script is creating a client component which can be accessed using the $find function.  This works well when the control is created during a full postback.  Unfortunately I am having a scenario where the control is created as part of a User Control that is used as the Edit Form of a RadGrid control.
The RadGrid is inside an RadAjaxPanel, it appears, that the javascript code, that is usually executed on Page load is not executed, and the client component is not known.  The code for the script block I have gotten from another Telerik thread suggesting to putting the code inside the Ajax Panel to allow for partial postbacks of the custom control itself. Here is the code:

                //init part for control generation... 
                string initScriptTemplate = "<script type='text/javascript'>{0}</script>"; 
                string postBackEvent = Page.ClientScript.GetPostBackEventReference(this, "arg"); 
 
                postBackEventpostBackEvent = postBackEvent.Replace("'arg'", "arg"); 
                string callBackEvent = Page.ClientScript.GetCallbackEventReference(this, "arg", "CallbackResult", "context", false); 
                string callbackFunc = string.Format("function {0}_doCallback(arg, context) {{ {1}; }}", this.ClientID, callBackEvent); 
                string postbackFunc = string.Format("function {0}_doPostback(arg) {{ {1}; }}", this.ClientID, postBackEvent); 
 
                string postbackCall = string.Format("{0}_doPostback", this.ClientID); 
                string callbackCall = string.Format("{0}_doCallback", this.ClientID); 
 
                //string initCodeTemplate = "var {1} = new REACH.ModalPopupControl(\"{0}\",\"{1}\",{2},{3},\"{4}\")"; 
                string initCodeTemplate = "var app = Sys.Application; app.add_init(function() {{ $create( REACH.ModalPopupControl, {{id:\"{0}\", _radwindowId:\"{1}\", _postbackFunction: {2}, _callbackFunction: {3} }}, null, null ); }});"; 
                object[] items = { this.CallerID, this.RadWindowID, postbackCall, callbackCall }; 
                StringBuilder sb = new StringBuilder(); 
                sb.AppendFormat(initCodeTemplate, items); 
                sb.AppendLine(""); 
                sb.AppendLine(callbackFunc); 
                sb.AppendLine(postbackFunc); 
                string initScript = string.Format(initScriptTemplate, sb.ToString()); 
 

Any suggestion is appreciated.

Thanks
Thomas

Iana Tsolova
Telerik team
 answered on 25 Feb 2009
3 answers
409 views
Hi Telerik,
my problem is a bit "off-topic" - but I'm interested in a efficient solution with "telerik functions":
For security reasons, I have to hide some nodes.
The problem is that I have only the show/hide information of the last node in a branch.
Now the question(s):
- How to hide/show nodes with something like node.get_parent()?
- Is a serverside approach the better one?

Thanks for answering,
Andreas
Shinu
Top achievements
Rank 2
 answered on 25 Feb 2009
6 answers
156 views
Hi!

I tried to export my grid to an excel file, but the dialog if i want to save or open the file is not shown.

Ajax Setting of RadGrid

 <telerik:AjaxSetting AjaxControlID="SummaryGrid"> 
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="SummaryGrid"/> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 

Grid Declaration

<telerik:RadGrid ID = "SummaryGrid" runat="server" AllowSorting="true" AutoGenerateColumns="false" OnExcelMLExportRowCreated="ExportRowCreated" 
                                         Width="900px" Height="280" GridLines="none" OnNeedDataSource="SummaryGridNeedsData" Skin="Telerik"> 
                            <MasterTableView GroupLoadMode="Client"> 
                            <Columns> 
                                <!-- 5 GridGoundColumns !--> 
                        </Columns> 
                        <NoRecordsTemplate> 
                            <div>There are no articles to Display</div> 
                        </NoRecordsTemplate> 
                   </MasterTableView> 
                   <ClientSettings AllowGroupExpandCollapse="true" ReorderColumnsOnClient="true" AllowColumnsReorder="true" AllowDragToGroup="true"> 
                    <Scrolling AllowScroll="True"  UseStaticHeaders="true"  /> 
                   </ClientSettings> 
                 </telerik:RadGrid> 

Button Click Event where Export should happen

SummaryGrid.ExportSettings.FileName = "Test.xls"; 
SummaryGrid.ExportSettings.ExportOnlyData = true; 
SummaryGrid.ExportSettings.OpenInNewWindow = true; 
SummaryGrid.ExportSettings.IgnorePaging = true; 
SummaryGrid.ExportSettings.Excel.Format = 
Telerik.Web.UI.GridExcelExportFormat.ExcelML; 
 
SummaryGrid.MasterTableView.ExportToExcel(); 

I tried to catch the OnExcelMLExportRow Created Event but the debugger never falls in the event handler.

Can you please help me to solve this issue?

Regards,
Martin






Roland
Top achievements
Rank 1
 answered on 25 Feb 2009
12 answers
1.2K+ views
Hello,

I have a lot of trouble setting the grid's height to 100%. I know there are a lot of posts for this problem, and some solutions, but they didn't work for me. This is my code.
<table cellspacing="0" cellpadding="0" border="0" width="100%" height="100%"> 
 <tr style="width: 100%; height: 100%"> 
  ... 
 <td style="width: 100%; height: 100%"> 
   <table id="_ctl8" cellspacing="0" cellpadding="0" border="0" width="100%" height="100%"> 
   <tr height="100%"> 
                        <td height="100%"> 
                            <table id="_ctl10" class="crpObjectBorder" cellspacing="0" cellpadding="0" border="0" 
                                width="100%" height="100%"> 
                                <tr> 
                                    <td> 
                                        <table class="crpTabBar" cellspacing="0" cellpadding="1" border="0" width="100%" 
                                            height="100%"> 
                                            <tr> 
                                                <td class="bottomborder titleBar" id="pageTitle"> 
                                                    &nbsp; Search results 
                                                </td> 
                                            </tr> 
                                            <tr style="height: 100%; width: 100%"> 
                                                <td class="crpDataPanel" style="height: 100%; width: 100%"> 
                                                    <div id="divRadGrid" style="height: 100%; width: 100%"> 
                                                        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
                                                        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" 
                                                            OnAjaxSettingCreated="RadAjaxManager1_AjaxSettingCreated"> 
                                                            <AjaxSettings> 
                                                                <telerik:AjaxSetting AjaxControlID="gridSearchResOrders"> 
                                                                    <UpdatedControls> 
                                                                        <telerik:AjaxUpdatedControl ControlID="gridSearchResOrders" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                                                                    </UpdatedControls> 
                                                                </telerik:AjaxSetting> 
                                                                <telerik:AjaxSetting AjaxControlID="gridSearchResOrderLines"> 
                                                                    <UpdatedControls> 
                                                                        <telerik:AjaxUpdatedControl ControlID="gridSearchResOrderLines" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                                                                    </UpdatedControls> 
                                                                </telerik:AjaxSetting> 
                                                            </AjaxSettings> 
                                                        </telerik:RadAjaxManager> 
                                                         
                                                        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
                                                            Width="75px" Transparency="10"> 
                                                            <img alt="Loading..." src="../images/loading.gif" style="border: 0px;" /> 
                                                        </telerik:RadAjaxLoadingPanel> 
                                                         
                                                            <telerik:RadSplitter ID="Splitter" runat="server" Width="100%" Height="100%" Orientation="Horizontal"> 
                                                            <telerik:RadPane ID="RadPane" runat="server" Height="100%" Width="100%" BorderStyle="None"> 
                                                            <!-- Grid: Orders search results --> 
                                                            <telerik:RadGrid ID="gridSearchResOrders" runat="server" GridLines="None" AllowPaging="True" 
                                                                ImagesPath="~/styles/Grid" AllowSorting="True" AutoGenerateColumns="False" OnNeedDataSource="gridSearchResOrders_NeedDataSource" 
                                                                Skin="MyGray" EnableAJAX="true" EnableEmbeddedSkins="False" BorderWidth="1" Width="100%" Height="100%" 
                                                                HorizontalAlign="Center" EnableEmbeddedBaseStylesheet="False" AllowMultiRowEdit="false"> 

My problem is that in IE 7 and Safari 3 the grid has a fixed sized of 10px, and in Firefox 3, the headers are huge, occupying almost the whole screen, while the grid content has a 10px height size.
I have tried to put the grid inside a pane and a splitter like suggested here http://www.telerik.com/community/code-library/aspnet-ajax/ajax/how-to-set-100-height-and-random-styles-to-a-radajaxmanager-update-panel.aspx . But this example only works on IE. Testing it on Firefox 3 or Safari 3 I've noticed that it doesn't work, the grid being resized to 10px.
I have made 2 screenshots of the grid, running in Firefox 3 and in IE 7.
Grid in Firefox 3
Grid in IE 7

I am using C#, ASP.NET 2.0, Telerik 2008.03.1125.20 on IE 7 and Firefox 3 on Windows XP.

Any suggestions? Is it something i'm doing wrong. I've spent too much time on this already.

Many thanks,
Adrian.


Nathan J Pledger
Top achievements
Rank 2
 answered on 25 Feb 2009
1 answer
129 views
Hi

Is this a bug or can I change it in CSS...?

When the row is selected the background goes to the set color (dark with white text)
on normal rows.

On alternating rows, the text goes white (as above), but the background stays the same.
The net result is that it is hard to see selected rows, unless the alternating color is quite
dark. (which doesn't look so elegant).

Any suggestions?

Thanks

Clive

Dimo
Telerik team
 answered on 25 Feb 2009
1 answer
103 views
Hi,

I want to create a menu (in code) with an average number of MenuItems.  Say about 5 top level each with 4 or 5 child submenu items.  That's easy.

Now to one of those sub menu items, I want to add a few hundred menu item, but have a different skin applied to them.  I'll call this the
"DrillDown" menu.  What is the best way to do this?

I know RadMenu can have only one skin and is applied at the menu level, not the child MenuItem level, so I see the following two chices:

(1) set the CSS for each of the MenuItems I'm adding to the DrillDown menu.  The only drawback to this is that there are so many items in this submenu that I wonder if that makes the markup bloated.

(2) add a second RadMenu as a child control of one of the MenuItems of the main RadMenu.  I can then set the skin of this second RadMenu to be different than the first.  I've tried this approach, but it seems that the resultant "DrillDown" menu styles are affected by the main menu's styles.

Any ideas?

Thanks in advance,
Cesar
Atanas Korchev
Telerik team
 answered on 25 Feb 2009
7 answers
383 views
Hi,


I am trying to migrate from the classic controls to the asp.net AJAX controls. So, to start, I have created a small project in order to test the upload and the progress bar. To my surprise, the progress bas is not displayed.
The code in the aspx page is as follows:

<form id="form1" runat="server">  
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
        <telerik:RadProgressManager  ID="RadProgressManager1" runat="server" EnableEmbeddedBaseStylesheet="False" 
                EnableEmbeddedSkins="False" UniquePageIdentifier="6e458f0c-2140-40dd-8e9d-6d21479f7747" /> 
        <div> 
            <telerik:RadUpload ID="RadUpload1" runat="server" Skin="Office2007">  
            </telerik:RadUpload> 
            <br /> 
            <br /> 
            <telerik:RadProgressArea ID="RadProgressArea1"  runat="server" Skin="Outlook">  
                <Localization Uploaded="Uploaded" /> 
            </telerik:RadProgressArea> 
        </div> 
        <br /> 
        <br /> 
        <asp:Button ID="Button1" runat="server" Text="Button" /> 
    </form> 

 

Now, if I click on the button, the upload is initiated but no progress bar appears. Am I missing something?


Thanks.

Test
Top achievements
Rank 1
 answered on 25 Feb 2009
3 answers
263 views
I was wondering if it's possible to have multiple columns within the sub menu of the RadMenu control, as shown in this image

If so, could you tell me how to do so

Thanks
Atanas Korchev
Telerik team
 answered on 25 Feb 2009
1 answer
105 views
Hi
      I ask the questions to  u. u send it answer to me.. ok it is fine working multiple user control within gird. i but i cant take the primay key id.. bz i give the rad grid keynames is contact type id... now how can i take the vlaue for forign key values.....

Regards
G. Manikandang
Princy
Top achievements
Rank 2
 answered on 25 Feb 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?