Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
176 views
Hi All,

I have to allow user to select either single value or multiple values from drop down based on one variable. Lets say if  variable value is 1 then user can select only single value from dropdownlist and if variable value is 2 then user can select multiple values from dropdownlist. we can achieve it by providing one simple property checkboxes = true or false from server side but I am looking for client side code to achieve this task.

Anyone have idea?

Thanks,
Ruchi
Boyan Dimitrov
Telerik team
 answered on 23 Jul 2013
3 answers
228 views
Hello,

I have a combobox in a GridTemplateColumn that is configured for LoadOnDemand. I need to subscribe to a OnSelectedIndexChanged event in Edit Mode to populate other controls when a value is selected but the event signature does not recoginize the RadComboBoxSelectedIndexChangedEventArgs delegate I reference in the OnSelectedIndexChanged method.

I cannot determine what the issue is.

Thank you,

Steve O.


Code Behind
---------------------------------------------------------------------------------------------------------------------------------------------------------------------

using

 

System;

 

 

 

 

 

using System.Collections;

 

 

 

 

 

using System.Configuration;

 

 

 

 

 

using System.Data;

 

 

 

 

 

using System.Linq;

 

 

 

 

 

using System.Web;

 

 

 

 

 

using System.Web.Security;

 

 

 

 

 

using System.Web.UI;

 

 

 

 

 

using System.Web.UI.WebControls;

 

 

 

 

 

using System.Web.UI.WebControls.WebParts;

 

 

 

 

 

using System.Web.UI.HtmlControls;

 

 

 

 

 

using System.Xml.Linq;

 

 

 

 

 

using Telerik;

 

 

 

 

 

using

 

Telerik.Web.UI;

 

 


using
System.Collections.Generic;

 

 

 

 

 

using SubSonic;
 

 

 

 

using System.Web.Services;

 

 

using System.Data.SqlClient;

 

 

 

 

 

namespace CIMT.Forms

 

 

 

{

 

 

private void Roster_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)

 

{

 

 

GridEditableItem editedItem = (sender as DropDownList).NamingContainer as GridEditableItem;

 

 

int id = Convert.ToInt32((editedItem["ResourceId"].Controls[0] as DropDownList).SelectedValue);

 

 

StoredProcedure sp = new StoredProcedure("Get_Resource_Details");

 

sp.Command.AddParameter(

"@id", @id, DbType.Int32);

 

 

 

sp.Command.AddOutputParameter(

"@position");

 

 

 

sp.Command.AddOutputParameter(

"@agency");

 

 

 

sp.Execute();

position.Text =

Convert.ToString(sp.OutputValues[0]).Trim();

 

 

 

agency.Text =

Convert.ToString(sp.OutputValues[1]);

 

 

 

}
}

ASPX
---------------------------------------------------------------------------------------------------------------------------------------------------------------------

<DetailTables>

 

 

 

<telerik:GridTableView runat="server"

 

 

DataKeyNames="RosterId"

 

 

 

Name="Rosters"


GridLines
="Both"

 

 

 

Width="100%"


DataSourceID
="SqlDataSource4"

 

 

 

BorderStyle="Solid"

 

 

BorderWidth="1px"

 

 

BorderColor="Blue"

 

 

CommandItemDisplay="Top"

 

 

ExpandCollapseColumn-CollapseImageUrl="~/Images/zoom-out-icon[1].png"

 

 

ExpandCollapseColumn-ExpandImageUrl="~/Images/zoom-in-icon[1].png" >

 

 

 

<ParentTableRelation>

 

 

 

<telerik:GridRelationFields MasterKeyField="UnitLogId" DetailKeyField="UnitLogId" />

 

 

 

</ParentTableRelation>

 

 

 

<ExpandCollapseColumn ExpandImageUrl="~/Images/zoom-in-icon[1].png" CollapseImageUrl="~/Images/zoom-out-icon[1].png"></ExpandCollapseColumn>

 

 

 

<EditFormSettings>

 

 

 

<EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"

 

 

CancelImageUrl="~/Images/filterCancel.png"

 

 

 

UpdateImageUrl="~/Images/selecttag.png"

 

 

InsertImageUrl="~/Images/selecttag.png"

 

 

EditImageUrl="~/Images/edit-icon[1].png">

 

 

 

</EditColumn>

 

 

 

</EditFormSettings>

 

 

 

<Columns>

 

 

 

<telerik:GridTemplateColumn DataField="ResourceId"

 

 

UniqueName="ResourceId"

 

 

HeaderText="Resource">

 

 

 

<ItemTemplate>

 

 

 

<%

 

 

 

# GetName(Convert.ToString(Eval("ResourceId")))%>

 

 

</ItemTemplate>

 

 

 

<HeaderStyle Font-Bold="True"></HeaderStyle>

 

 

 

<ItemStyle Wrap="false" />

 

 

 

<EditItemTemplate>

 

 

 

 

<telerik:RadComboBox ID="rcbUnitLeader" 
 

 

runat="server"

 

 

 

 

AutoPostBack="true" 
 

 

HighlightTemplatedItems="true"

 

 

DropDownWidth="350px"

 

 

EnableLoadOnDemand="true"

 

 

EnableVirtualScrolling="true"

 

 

 

ShowMoreResultsBox="true"

 

 

OnSelectedIndexChanged="Roster_SelectedIndexChanged"

 

 

 

EmptyMessage="Select Roster Resource"

 

 

 

OnItemsRequested="RosterResource_ItemsRequested"

 

 

 

Height="200px">

 

 

 

<HeaderTemplate>

 

 

 

<table style="width: 250px; text-align: left;">

 

 

 

<tr>

 

 

 

<td style="width: 200px;">Name</td>

 

 

 

<td style="width: 50px;">Agency</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</HeaderTemplate>

 

 

 

<ItemTemplate>

 

 

 

<table style="width: 250px; text-align: left; white-space:nowrap">

 

 

 

<tr>

 

 

 

<td style="width: 200px;"><%# DataBinder.Eval(Container.DataItem, "Name") %></td>

 

 

 

<td style="width: 50px;"><%# DataBinder.Eval(Container.DataItem, "Agency") %></td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</ItemTemplate>

 

 

 

</telerik:RadComboBox>

 

 

 

</EditItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

Boyan Dimitrov
Telerik team
 answered on 23 Jul 2013
3 answers
211 views
Hi

There are few radinputs in my page with validators. Is it possible to display the error message inside the respective controls?

Thanks
Ivy
Konstantin Dikov
Telerik team
 answered on 23 Jul 2013
5 answers
126 views
So I am starting off with 
var myScheduler = $find('<%=RadScheduler1.ClientID %>');
How would I drill down and access and update the SchedulerResourceCollection?

Thanks.
Plamen
Telerik team
 answered on 23 Jul 2013
7 answers
237 views
Hi All,

I've been trying to set my tab width on client side but its not working. There is no error but changes are not being applied. This is based on Clients screen resolution. 1024x768 and below will be 150px tab width, higher than 1024x768 300px tab width.

Heres my code

var Mytab;
function OnClientLoad(sender)
{
   Mytab = sender;
   var scrW = screen.width;
   var scrH = screen.height;
   var val;
 
   if (scrW <= 1024){
      val = "150px";
   }else{
      val = "300px";
   }
   for (var i = 0; i < Mytab.get_allTabs().length; i++)
   {
      Mytab.get_allTabs()[i].width = val;
   }
}
 
 
<telerik:RadTabStrip ID="MyTab" runat="server" EnableEmbeddedSkins="False" OnClientLoad="OnClientLoad" .....


Thanks in advance,
Rj
RJ
Top achievements
Rank 1
 answered on 23 Jul 2013
12 answers
435 views
I just updated to Q2 2013 (from Q1 2013) and let VSExtensions update a test application that was being used to demonstrate menu styles (in preparation for an upcoming project).

The first control on the screen is a RadDropDownList and before the update the control expanded down (as expected.)  After the update, it expands up (and is truncated by the top of the screen).  I know that a new .ExpandDirection property was added but the IDE indicates that it defaults to 'down'.  Just to make sure, I tried explicitly specifying the down direction, both in markup and in code behind.  No difference.  Also, for the heck of it, I switched it to "Up" and the behavior was unchanged.

Oh, and I just found out that it only does this sometimes.  The RadDropDownList is in a master page.  On the master page, there are also links used to select the menu style that is to be loaded in the content area.  Curiously, when display content that uses a RadMenu based menu (three of six choices), the above behavior occurs.  When you pick a menu based on RadPanelBar or RadRibbonBar for the content area, the RadDropDownList  drops down, instead of up (again, regardless of the setting of .ExpandDirection).
Bozhidar
Telerik team
 answered on 23 Jul 2013
11 answers
478 views
Hi,
I have a master/cxontent pahe with a radwindow manager on it. From this I call a radwindow which opens fine and is modal. Then from the radwindow I open another modal radwindow but this radwindow appears under the first radwindow. I want it to appear on top, so how do I set the z order (if this is the problem).

I have tried both opening methods as recommended :

var oBrowserWnd = GetRadWindow().BrowserWindow;
oBrowserWnd.radopen("http://www.google.com", "NewWindow");

and

var oManager = GetRadWindow().get_windowManager();
oManager.open("http://www.google.com", "NewWindow");

but they both end up under the calling RadWindow. The version is: 2009.1.311.35

Regards
Roger
Shinu
Top achievements
Rank 2
 answered on 23 Jul 2013
1 answer
355 views
Hi,

I have List of Objcet KeywordsArray with has properties like CodeType, Keyword and again it has one list of object KeywordClassifier which has properties patternmatch and patterntype whow i can bind the grid with KeywordClassifier List i am able to bind KeywordsArray.

so basically i want to bind the grid with Codetype, Keyword, patternmatch , patterntype  (Patternmatch,patterntype are list inside KwywordArray )
Antonio Stoilkov
Telerik team
 answered on 23 Jul 2013
7 answers
257 views
Hi,

I have a weird problem. I have created a usercontrol called MemberPicker, which allows me to select particular member. It has textbox and button. On button click javascript fires and opens RadWindow with a search screen for members. When member is chosen RadWindow is closed and members name is populated into the textbox of the MemberPicker. It works fine when I put it on any page. However I get function undefined javascript error when I put MemberPicker control inside RadGrid in EditItemTemplate of one of the columns?

I must mention that RadGrid is wrapped inside RadAjaxPanel, when I remove it everything works fine. But I really need to have ajax effects with loading panel etc. I know you would probably suggest to use RadAjaxManager, but how can I use it to avoid error I am getting without removing all nice ajax effects?

Any suggestions I am clueless and this is very urgent. Thanks
Antonio Stoilkov
Telerik team
 answered on 23 Jul 2013
0 answers
87 views
hello to use HTML charts in asp.net web application

I have just copied example of Html chart from telerik site
but it gives error ie Unknown server tag telerik:AreaSeries

should we import any thing else or is something  missing from me

please reply
Kishor
Kishor
Top achievements
Rank 2
 asked on 23 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?