Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
1.5K+ views
I have a RadGrid with an update function and an EditItemTemplate.
In here I have a RadDropDownList which is populated by a SQLDataSource.

My issue is: when a user clicks Edit on a row and the dropdown is displayed, how do I have the dropdown select the row's value from the list?

Similar to how the textbox is populated with:

Text='<%# Bind( "Notes") %>

What is the equivalent for dropdown?
My dropdown:
<telerik:RadDropDownList ID="rddlLocations" runat="server" DataSourceID="GetLocationsSqlDataSource" DataTextField="Location" DataValueField="ID"></telerik:RadDropDownList>

Attila Antal
Telerik team
 answered on 28 Nov 2018
4 answers
874 views

Hey Everyone,

I was wondering if there was anyone that could assist me in making a rad asp.net dropdown button. I am fairly new to the telerik controls and have been trying to create this for a couple of days now. any help would be appreciated.

Rumen
Telerik team
 answered on 28 Nov 2018
0 answers
85 views
How to create columns dynamically  by configuration file

<config>
  <parameter Name="code" FieldName="MATERIAL"  Width="80"    />
  <parameter Name="typeID" FieldName="CLASS"  Width="10"    />  
</config>

gao
Top achievements
Rank 1
 asked on 28 Nov 2018
1 answer
293 views

I need to check if hidden field value is 'Y' than it should change tab smoothly but if there is value 'N' in my hidden field than if shoudl open radconfirm before change tab. For example 

I have tabs in following format

 

1       2      3        4        5

Now when I select from 1 to 2 if should check if hidden filed value is 'N' than it should ask me to move on tab 2 in radconfirm if I select no than I should keep me on tab 1 and if I click on OK than it should redirect me on tab 2.

 

Please help me.

 

Thanks 

Manish

 

Marin Bratanov
Telerik team
 answered on 27 Nov 2018
1 answer
142 views

I'm using Telerik UI for ASP.NET AJAX version 2018.3.910.45. When I run my site from Visual Studio on my laptop, various parts of the UI look different than on the QA server. Using my login dialog as an example, I can see that the markup is different. I'm testing using Chrome.

I need to make the controls display the same in both places. Anybody have any thoughts on how to make that happen?

Here is the example of the markup difference:

Laptop markup (IIS Express):
<button type="submit" name="btnLogin" value="Login" id="btnLogin" class="RadButton RadButton_Bootstrap rbButton rbRounded rbIconButton" style="height:30px;width:100%;" tabindex="0"><span class="rbText">Login</span><input id="btnLogin_ClientState" name="btnLogin_ClientState" type="hidden" autocomplete="off" value="{"text":"Login","value":"","checked":false,"target":"","navigateUrl":"","commandName":"","commandArgument":"","autoPostBack":true,"selectedToggleStateIndex":0,"validationGroup":"vgLogin","readOnly":false,"primary":false,"enabled":true}"></button>

Server (IIS 7):
<span id="btnLogin" class="RadButton RadButton_Bootstrap rbVerticalButton" style="display:inline-block;height:30px;width:100%;height:30px;" tabindex="0"><input class="rbDecorated" type="submit" name="btnLogin" id="btnLogin_input" value="Login" style="width:100%;padding-left:0;padding-right:4px;height:30px;" tabindex="-1"><input id="btnLogin_ClientState" name="btnLogin_ClientState" type="hidden" autocomplete="off" value="{"text":"Login","value":"","checked":false,"target":"","navigateUrl":"","commandName":"","commandArgument":"","autoPostBack":true,"selectedToggleStateIndex":0,"validationGroup":"vgLogin","readOnly":false,"primary":false,"enabled":true}"></span>

Rumen
Telerik team
 answered on 27 Nov 2018
14 answers
1.8K+ views
Anyone know how to set the position of a RadWindow when it is modal.  Not matter what Left, Top or OpenerElementID property values you set it always appears in the centre.  In my app the centre happens to be a very bad place for it.


 <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Vista" > 
                <windows> 
                    <telerik:RadWindow   
                        ID="RadWindow1"   
                        runat="server"   
                        ShowContentDuringLoad="False"   
                        Width="400px" 
                        Height="350px"   
                        Title="Action..." 
                        VisibleStatusbar="False"   
                        style="display:none;"   
                        Behavior="Close"   
                        InitialBehavior="None"                         
                        Modal="True"   
                        NavigateUrl=""                          
                        Behaviors="Close" 
                        Left="0" Top="0"   
                        OpenerElementID="fsMyActivities" 
                          
                         > 
                    </telerik:RadWindow> 
                </windows> 
            </telerik:RadWindowManager> 

The window is being opened using radopen() in JavaScript.


Thanks

Dave
Top achievements
Rank 1
 answered on 27 Nov 2018
9 answers
333 views
Hello,

we have problem with RadWindow on touch devices.

It is simple scenario. We have page and RadWindow. Let's say there is just button to open modal maximized window. It works. But you can use touch and move with overlay below window. The same issue is on demo page http://demos.telerik.com/aspnet-ajax/window/examples/modalpopup/defaultcs.aspx. Navigate to this page in any Android browser (I think the same is in IE on Windows Phone or Chrome on Android), set window as modal and maximize it. Then simply drag upwards and window "floats" away and you will see page with overflow.

The same way you cane move left/right if page below window is horizontal scrollable. Then sometimes actions in this window changes position of window and it jumps somewhere to the right and user can only see overlay and have to drag window back.

This happens only on touch devices. Works fine on desktops.

Is there any way how to prevent this? Tried to override touchstart, touchmove, set window behavior only to close (no move or resize) etc. events, but without any luck.

Thnx for any help
Marin Bratanov
Telerik team
 answered on 27 Nov 2018
1 answer
118 views

Similar to the dozens of other threads posted with retrieving a combobox value in client-side code, I cannot get this to work. After spending the past 8 hours trying to get this to work, hopefully someone can point out what I am doing wrong.

I started with this basic code:

<%@ Page Title="" Language="C#" MasterPageFile="~/My.Master" AutoEventWireup="true" CodeBehind="MyPage.aspx.cs" Inherits="MyPage" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>My Page</title>
    <link rel="stylesheet" type="text/css" href="/CSS/MyPage.css" />
    <script type="text/javascript" src="/Scripts/MyPage.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
   <telerik:RadComboBox ID="RadComboBoxADT" runat="server" />
   <telerik:RadButton ID="btnSubmit" runat="server" Text="Submit" OnClientClicked="onSubmitClick" SingleClick="true" SingleClickText="Processing..." AutoPostBack="false" />
</asp:Content>

MyPage.js:

            function onSubmitClick(a,b) {
                var combo = $find("<%= RadComboBoxADT.ClientID %>");
                alert(combo);
                return;
}

running this code, combo yields "null", so any attempt to get the selected item fails as well.

I tried moving the code from a <script> file, into the content header, e.g.

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>My Page</title>
    <link rel="stylesheet" type="text/css" href="/CSS/MyPage.css" />
    <script type="text/javascript">
            function onSubmitClick(a,b) {
                var combo = $find("<%= RadComboBoxADT.ClientID %>");
                alert(combo);
                return;
}
    </script>
</asp:Content>

however, all this managed to do was yield a javascript error, onSubmitClick not found, on page load (why? if I view code, I can see it there.)

another set of eyes here would be appreciated.

 

 

Peter Milchev
Telerik team
 answered on 27 Nov 2018
6 answers
1.1K+ views

Hi.  I have a parent grid and a child grid below. If I click a row in the parent, the child grid will refresh with data associated to the row.  I do this by getting the parent to call a "refresh" method in the child from the parent's "selectedIndexChanged" event.  The "refresh" method gets data from the database.  Then it calls a "rebind" on the grid, which calls the needDatasource method, then the ItemDataBound method.  In the ItemDataBound, based on rules, I decide to show or hide an edit icon.  When I select rows in the parent, this code fires, and tracing thru, it's setting the correct "true" value to the visible property of my edit icon, however when the page is shown, the icon is not there.  Any reason why this is getting lost?

My ugly workaround is to add another method after the "rebind" that basically is the same as the ItemDataBound code which finds the grid, finds my rows, and shows/hides the icons.

 

public void RefreshChild)
{
   LoadChildGridDataFromDataBase();
   ChildGrid.Rebind();

   //ugly

   DoTheItemDataBoundStuffAgain()

}

Attila Antal
Telerik team
 answered on 26 Nov 2018
1 answer
320 views

 

Commented line works for sorting rest column did not work. and in my application translation is also integrated. so i have to change the header text as per language. please suggest what should i do.

Thanks In Advance.

 

GridHeaderItem header = (GridHeaderItem)e.Item;
            //header["colFilename"].Text = dtfileSharingCofig.Rows[0]["fsNameSearch"].ToString();
            header["colUploadedBy"].Text = dtfileSharingCofig.Rows[0]["fsUploadedBySearch"].ToString();
            header["colFileType"].Text = dtfileSharingCofig.Rows[0]["fsFileTypeSearch"].ToString();
            header["colRating"].Text = dtfileSharingCofig.Rows[0]["fsRatingSearch"].ToString();
            header["colUploadedDate"].Text = "Uploaded Date";
            header["colRaters"].Text = "Raters";
            header["colViews"].Text = "Views";
            header["colFileSize"].Text = "File Size";

Attila Antal
Telerik team
 answered on 26 Nov 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?