Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
63 views
Hi all,

I'm trying to find a way to locate the server-side control of a RadGrid.

Here is the topology

<asp:LoginView ID="LV2">
    <LoggedInTemplate>
        <telerik.RadComboBox ID="RCB2">
            <ItemTemplate>
                telerik.RadGrid ID="RG2"

I'm having great difficulty "finding" the RadGrid in Server Side code.


Any help would be much appreciated.

Cheers,
            
        
Iana Tsolova
Telerik team
 answered on 22 Mar 2010
4 answers
292 views
Is there a way to get the "CaptchaAudio" to automatically play from the page rather then forcing the user to download a WAV file and open it?

The only way I could get this functionality was to write some javascript to capture the audio url from the Audio link; create another button that embeds and fires the audio from that link, and hide the automatically generated Audio Link Text (see code).

It would be nice if the RadCaptcha control did this automatically.

...
<style type="text/css">
.rcCaptchaAudioLink {display: none;}
</style>
...
<telerik:RadCaptcha...
...
<img src="Images/audio_but.png" alt="Play Sound" onclick="PlaySound()" />
<span id="SoundSpan"></span>
...
<script type="text/javascript">
function PlaySound() {
var soundHRef = document.getElementById("RadCaptcha1_CaptchaAudioCode");
        document.getElementById("SoundSpan").innerHTML = "<embed src='" + soundHRef.getAttribute("href").toString() + "' hidden='true' autostart='true' loop = false' />";
        }
</script>
...
rootberg
Top achievements
Rank 2
 answered on 22 Mar 2010
3 answers
156 views
What are these white spaces for? How can I remove them?

http://209.200.250.235/Untitled-1.png
Pavlina
Telerik team
 answered on 22 Mar 2010
3 answers
1.2K+ views
i have nested  grid, after cliking on row or paging or sorting..it postbacks the page
i dnt want to post back

how i will do tht??
its urgent :(
my code is as below :

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1">

 

 

</telerik:AjaxUpdatedControl>

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AllowSorting="True"

 

 

AllowMultiRowSelection="False" AllowPaging="True" PageSize="5" GridLines="None"

 

 

OnItemCreated="RadGrid1_ItemCreated" MasterTableView-AllowMultiColumnSorting="false"

 

 

OnItemCommand="RadGrid1_ItemCommand" OnNeedDataSource="RadGrid1_NeedDataSource"

 

 

OnPageIndexChanged="RadGrid1_PageIndexChanged" OnSortCommand="RadGrid1_SortCommand">

 

 

<PagerStyle Mode="NumericPages"></PagerStyle>

 

 

<MasterTableView DataKeyNames="IssueID" AllowMultiColumnSorting="true" GroupLoadMode="Server">

 

 

<NestedViewTemplate>

 

 

<asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="false">

 

 

<telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1" SelectedIndex="0">

 

 

<Tabs>

 

 

<telerik:RadTab runat="server" Text="ViewIssue" PageViewID="PageView1">

 

 

</telerik:RadTab>

 

 

</Tabs>

 

 

</telerik:RadTabStrip>

 

 

<telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false">

 

 

<telerik:RadPageView runat="server" ID="PageView1">

 

 

<telerik:RadGrid runat="server" ID="OrdersGrid" AutoGenerateColumns="False" AllowMultiRowSelection="False">

 

 

<MasterTableView ShowHeader="true" AutoGenerateColumns="False" HierarchyLoadMode="ServerOnDemand">

 

 

<NoRecordsTemplate>

 

Records Not Found

 

</NoRecordsTemplate>

 

 

<Columns>

 

 

<telerik:GridNumericColumn SortExpression="Description" HeaderText="Description"

 

 

HeaderButtonType="TextButton" DataField="Description" UniqueName="Description">

 

 

</telerik:GridNumericColumn>

 

 

<telerik:GridBoundColumn SortExpression="CSTComments" HeaderText="CSTComments" HeaderButtonType="TextButton"

 

 

DataField="CSTComments" UniqueName="CSTComments" Aggregate="Count">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridDateTimeColumn SortExpression="AnalystComments" HeaderText="AnalystComments"

 

 

HeaderButtonType="TextButton" DataField="AnalystComments" UniqueName="AnalystComments">

 

 

</telerik:GridDateTimeColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

</telerik:RadPageView>

 

 

</telerik:RadMultiPage>

 

 

</asp:Panel>

 

 

</NestedViewTemplate>

 

 

<Columns>

 

 

<telerik:GridBoundColumn SortExpression="CoName" HeaderText="CoName" HeaderButtonType="TextButton"

 

 

DataField="CoName" UniqueName="CoName">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn SortExpression="ScenarioName" HeaderText="ScenarioName"

 

 

HeaderButtonType="TextButton" DataField="ScenarioName" UniqueName="ScenarioName">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn SortExpression="Subject" HeaderText="Subject" HeaderButtonType="TextButton"

 

 

DataField="Subject" UniqueName="Subject">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn SortExpression="IssueDate" HeaderText="IssueDate" HeaderButtonType="TextButton"

 

 

DataField="IssueDate" UniqueName="IssueDate">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings AllowDragToGroup="true" />

 

 

</telerik:RadGrid>

 

Tsvetoslav
Telerik team
 answered on 22 Mar 2010
1 answer
43 views
I have been going through the forums pretty heavily lately trying to figure out how to achieve results for issues that are not covered in the demos. In addition, it looks like a large majority of the users on this forum are doing exactly the same thing. One issue for example is how to modify the properties of the popup window for openeng files on the file explorer, or adding required field validators to the upload control. Telerik employees suggest lots of solutions, as well as posting coding examples, but these examples never seem to get added to the demos. It seems like it would be a huge time savings for us as users as well as the employees who have to handle the forum posts and the support tickets if the demos section was expanded. I was just wondering why Telerik does not expand on the demos section with a lot of these things. Do you have any plans to add additional demos to show how to do lots of the things people are most asking about?
Georgi Tunev
Telerik team
 answered on 22 Mar 2010
1 answer
146 views
Please help

I am using the eval version 2009.3.1208.35 of the RadDock control and attempting to add a custom command. I have created the custom command by typing the information in the code(below is the code). The designer gives me this error -
Error Creating Control - telerik:dockcommand
No 'runat=server' attribute present on the
dockcommand tag.

code to register it:

<%

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 

javascript code block:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

 

<script type="text/javascript">

 

 

 

function OnClientCommand(dock, args) {

 

 

 $find(

 

 

"<%=RadDockZone1.ClientID %>").dock(dock);

 }

 

</script>

 

 

 

</telerik:RadCodeBlock>

 

 

 

code to add command:
 <div id="divRadDocks" runat="server" style="border-style:none; left:620px; top:65px; width:520px; position: absolute; background-color: #FFFFFF;">

 

 

 

<telerik:RadDockLayout runat="server" ID="RadDockLayout1"

 

 

 

StoreLayoutInViewState="True" >

 

 

 

<telerik:RadDockZone runat="server" ID="RadDockZone1" Style="float: left;

 

 

 

background: #f5f4e8;" Width="250px" MinHeight="400px" FitDocks="True">

 

 

 

<telerik:RadDock runat="server" ID="RadDock1" Width="250px"

 

 

 

Title="Bill History" DefaultCommands="ExpandCollapse" Resizable="True">

 

 

 

<ContentTemplate>

 

 

 

<div id="divbillhistory">

 

 

 

</div>

 

 

 

</ContentTemplate>

 

 

 

</telerik:RadDock>

 

 

 

<telerik:RadDock runat="server" ID="RadDock2" Title="Pickup Information"

 

 

 

DefaultCommands="ExpandCollapse" Width="250px" Resizable="True">

 

 

 

<Commands>

 

 

 

<telerik:DockCommand Name="Test Command" AutoPostBack="false" OnClientCommand="OnClientCommand" />

 

 

 

</Commands>

 

 

 

<ContentTemplate>

 

 

 

<div id="divInlandPickupInfo" style="width:250px; color: Black; font:Arial; font-weight:normal; font-size:8pt;">

 

 

 

<table style="width:100%">

 

 

 

<tr style="width:100%">

 

 

 

<td >

 

 

 

Quote #:

 

 

</td>

 

 

 

<td>

 

 

 

<input id="TextQuoteNumber" type="text" />

 

 

 

</td>

 

 

 

<td >

 

 

 

Pro #:

 

 

</td>

 

 

 

<td>

 

 

 

<input id="TextProNumber" type="text" />

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</div>

 

 

 

</ContentTemplate>

 

 

 

</telerik:RadDock>

 

 

 

</telerik:RadDockZone>

 

 

 

<telerik:RadDockZone runat="server" ID="RadDockZone3" Style="float: right; background: #fff3c8;"

 

 

 

Width="250px" MinHeight="400px" FitDocks="True">

 

 

 

<telerik:RadDock runat="server" ID="RadDock4" Width="250px"

 

 

 

Title="ContentContainer" DefaultCommands="ExpandCollapse" Resizable="True">

 

 

 

</telerik:RadDock>

 

 

 

</telerik:RadDockZone>

 

 

 

</telerik:RadDockLayout>

 

 

 

<table style="width:100%">

 

 

 

<tr style="width:100%">

 

 

 

<td style="width:100px">

 

 

 

<input id="Button1" visible="true" type="button" value="Undock" onclick="undockinland()" />

 

 

 

</td>

 

 

 

<td style="width:100px">

 

 

 

<input id="Button2" visible="false" type="button" value="Show" onclick="radshowheightwidth()" />

 

 

 

</td>

 

 

 

<td style="width:100px">

 

 

 

<input id="Button3" visible="false" type="button" value="Dock" onclick="dockinland()" />

 

 

 

</td>

 

 

 

<td id="TESTRADOCKCLICK" runat="server">

 

 

 

&nbsp

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</div>

 

 

 

 

 

Pero
Telerik team
 answered on 22 Mar 2010
3 answers
53 views
Hi all,
I can't find the function that can find out my thread or post. But this is a common function in forum application whether I subscribe them. does this function exist?Thx.
Sebastian
Telerik team
 answered on 22 Mar 2010
1 answer
115 views
hi,

Radmenu with repeatcolumns=2 and rtl enabled does not show the items correctly in ie 7. but works well in ie8 and mozilla.
every time mouse over on the top level item, could see browser is having horizontal scrolbar, Items are moving to the right end of the browser.

have used this below lines, using RadMenu Q3 2008 Black Skin


<telerik:RadMenu ID="RadMenu1" runat="server" dir="rtl" Skin="Black">
            <Items>
                <telerik:RadMenuItem Text="Menu 1">
                    <Groupsettings RepeatColumns="2" repeatdirection="Vertical" />
                    <Items>
                        <telerik:RadMenuItem Text="Menu1.1">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Menu1.2">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Menu1.3">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Menu1.4">
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Text="Menu 2">
                    <GroupSettings RepeatColumns="2" RepeatDirection="Horizontal" />
                    <Items>
                        <telerik:RadMenuItem Text="Menu2.1">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Menu2.2">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Menu2.3">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Menu2.4">
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenuItem>
            </Items>
</telerik:RadMenu>

Suggestions plz.......
Kamen Bundev
Telerik team
 answered on 22 Mar 2010
4 answers
702 views
Hi,
I am trying to execute a code behind web method in javascript using PageMethods. The problem I am facing is as below:
<WebMethod()> _ 
        Public Shared Function Insert(ByVal charge As StringByVal clientid As StringAs String 
        Dim value as string 
        'Do The insert and retun value 
        Return value 
End Function 
 
 

Below is the javascript code and the insert method gets executed based on a confirm window:

 
 
function DoSomething1(sender, eventargs){  
    var txtRa = document.getElementById(sender.get_attributes().getAttribute("AssID"));  
    txtRa.value="";  
    var charge = sender.get_text();  
    if (trim(charge)!=""){  
charge = charge.replace("'""\'");  
        var message = '<%= Resources.NoExist%>'  
        if(confirm(message)) {  
            var clientid = sender.get_attributes().getAttribute("ClientID");  
            var ret = PageMethods.Insert(charge,index);  
            alert(ret);  
               DoSomething2(ret);  
              
       } 
 

The javascript code doesnt wait for the function to return a value and hence is executing the alert even before the insert function is complete. So, I end up getting an 'undefined' value for ret parameter.

Is there any way we can synchronously wait for the method to complete, get the return variable, set it in a hidden variable and use it in the rest of the javascript.
the webmethod does not have access to the UI controls on the page, as it is a shared web method.
I am open to moving this webmethod to a web service but I am not sure how the javascript would wait for the codebehind function to complete.
I have tried setTimeOut method in javascript to see if that will cause the wait but that dint work. The alert got fired with 'undefined'.
The webmethod does not take a long time to execute either. It only takes a few seconds. I just cant figure out how I can wait on the client side for the return parameter.

Please help me with any ideas and I am pretty much open to trying out anything at this point.

thanks in advance,
Kal.
Eliza Sahoo
Top achievements
Rank 1
 answered on 22 Mar 2010
1 answer
303 views
Hi all,

I would like to create a grid with GroupHeaders containing sum-values of some columns (see attached image).
The group can be expanded so all 'sub-data' are aligned in columns under the corresponding GroupHeader columns.
This would be a nice compact overview of data.

As far as I can see, aggregates can only be placed in the Footer. It doesn't look nice, and one group always takes 2 rows which is a 'waste' of space.

If this cannot be done in a RadGrid - what else can I do ?


Thanks

Schlurk
Top achievements
Rank 2
 answered on 22 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?