Telerik Forums
UI for ASP.NET AJAX Forum
28 answers
910 views
Hi

I have GridDropdownColumn in RadGrid with different source. I wired the DataField, ListValueField and ListTextField all correctly. It doesn't show the value properly when the grid is shown but when edit mode you select the dropdown value it stores is correctly. When displaying in grid, it all shows " "  am I missing anything?

Attached the code.

 <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="true" AllowPaging="true"
            PageSize="25" ShowStatusBar="true" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
            AllowAutomaticDeletes="True" DataSourceID="PetroSqlDataSource">
            <MasterTableView EditMode="Popup" CommandItemDisplay="Bottom" DataSourceID="PetroSqlDataSource"
                DataKeyNames="Id" AutoGenerateColumns="false">
                <Columns>
                    <telerik:GridEditCommandColumn />
                    <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" />
                    <telerik:GridBoundColumn DataField="Id" HeaderText="Unique ID" ReadOnly="True" UniqueName="UniqueID"
                        Display="false" />
                    <telerik:GridBoundColumn DataField="SkillId" HeaderText="Skill ID" UniqueName="SkillID" />
                    <telerik:GridDropDownColumn UniqueName="DropDownListColumn" ListTextField="Discipline"
                        ListValueField="Discipline" DataSourceID="PetroSqlDataSource2" HeaderText="Discipline"
                        DataField="Discipline" DropDownControlType="RadComboBox" AllowSorting="true" Display="false">
                    </telerik:GridDropDownColumn>
                    <telerik:GridBoundColumn DataField="Discipline" HeaderText="Discipline" UniqueName="Discipline"
                        ReadOnly="True" />
                    <telerik:GridBoundColumn DataField="Skill" HeaderText="Skill" UniqueName="Skill" />
                    <telerik:GridBoundColumn DataField="Description" HeaderText="Description" UniqueName="Description" />
                    <telerik:GridBoundColumn DataField="Foundation" HeaderText="Foundation" UniqueName="Foundation" />
                    <telerik:GridBoundColumn DataField="SkillType" HeaderText="SkillType" UniqueName="SkillType" />
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="PetroSqlDataSource" ConnectionString="<%$ConnectionStrings:PetroTechConnectionString%>"
            runat="server" SelectCommand="SELECT [Id],[SkillId], [Discipline],[Skill],[Description], [Foundation],[SkillType] FROM [Skills]"
            InsertCommand="INSERT INTO [Skills] ([SkillId],[Discipline],[Skill],[Description],[Foundation],[SkillType]) VALUES (@SkillId,@Discipline,@Skill,@Description,@Foundation,@SkillType)"
            UpdateCommand="UPDATE [Skills] SET [SkillId] = @SkillId,[Skill] = @Skill, [Description] = @Description, [Foundation] = @Foundation, [SkillType] = @SkillType WHERE [ID] = @ID"
            DeleteCommand="DELETE FROM [Skills] WHERE [Id] = @ID">
            <InsertParameters>
                <asp:Parameter Name="SkillId" Type="String" Size="10" />
                <asp:Parameter Name="Discipline" Type="String" Size="50" />
                <asp:Parameter Name="Skill" Type="String" Size="50" />
                <asp:Parameter Name="Description" Type="String" />
                <asp:Parameter Name="Foundation" Type="Int32" />
                <asp:Parameter Name="SkillType" Type="Int32" />
            </InsertParameters>
        </asp:SqlDataSource>


        <asp:SqlDataSource ID="PetroSqlDataSource2" ConnectionString="<%$ConnectionStrings:PetroTechConnectionString%>"
            runat="server" SelectCommand="SELECT [Id],[Discipline] FROM [Disciplines]">
            </asp:SqlDataSource>
Mike
Top achievements
Rank 2
 answered on 26 Mar 2012
2 answers
583 views
How do I set columns to HtmlEncode="false" when I am setting AutoGenerateColumns="true" for the RadGrid?
Scott
Top achievements
Rank 1
 answered on 26 Mar 2012
4 answers
114 views
I ran across a java script function called raise_passwordStrengthCalculating but I can't find any documentaion on it or how to use it?  See I've figured out a way how to get a value from a database into a password field, but I haven't figured out how to get the password field to calculate the password strength.  And I think that function would do it, but can't quite wrap my head around how to call it.

I guess I didn't get my secret decoder ring along with my subscription.
SSirica
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 26 Mar 2012
2 answers
296 views
I would like to expand only 1 row based on data that is found during the ItemDataBound event.  Is this possible?
Seth
Top achievements
Rank 1
 answered on 26 Mar 2012
1 answer
109 views
Hi

When I place below code
<tool name="Line Spacing" type="dropdown" enabled="true" iconurl="~/RadControls/Editor/Skins/Default/Buttons/LineSpacing.gif">
      <item name="Default" value="" />
      <item name="Single space" value="20px" />
      <item name="1.5 Lines" value="35px" />
      <item name="Double spacing" value="50px" />
    </tool>

My radeditor does not respond. When I remove iconurl from above line then it works fine.
I have replace the iconurl path with my local system path and have image also.

I need to have a icon for line spacing instead of combo box presently display.

Thanks
Gautam Singh
Richard
Top achievements
Rank 1
 answered on 26 Mar 2012
2 answers
109 views
Hi,

Currently we are using the Q1 2010 version of Telerik.Web.UI for the v2.0 Framework.  We just moved from VS2008 to VS2010 and now our Unit Tests are failing.  Our projects are running on the 3.0 Framework, but our Unit Tests projects are on the 4.0 Framework.

We are now getting the following error in each unit test project when running the unit tests:

 error CS0012: The type 'System.Web.UI.IScriptControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. 

I am working to see if I just have some bad references.  But anytime I add a new System.Web.Extensions reference  for v2.0 it adds the v4.0.  

Therefore, my question is.  Due to the fact that unit tests in VS2010 must be on either 3.5 or 4.0, does that mean I have to upgrade to a 3.5 version of Telerik for my unit tests to work?

Thanks,

Chrystal
Chrystal Tyler
Top achievements
Rank 1
 answered on 26 Mar 2012
0 answers
114 views
Hello,

 I need source code of gridview with enter key commands. If I click the enter key using gridview, it should move to next row textbox as well as next columns without any asp .net buttons. kindly send me the good code for this.

Thanks,
PRABAKARAN G.
KARAN
Top achievements
Rank 1
 asked on 26 Mar 2012
2 answers
216 views
Hi,

I have a multiple line chart which may contain more than 10 lines, would i be able to assign a random and different color to it ?

Thanks
Richard
Top achievements
Rank 1
 answered on 26 Mar 2012
2 answers
100 views
Hi,

I am facing issue with Rad tool tip in Scheduler control in Google Chrome. to re produce this issue take below pasted code to a new aspx page fallow the below steps.


1. Go to 24hr View.
2. double click on 11:00 PM Slot and add new appointment and check the tool tip.

Here i am attaching the screenshot for the same issue.

Please let me provide the solution asap.


Designer

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Schedule.aspx.cs" Inherits="Schedule" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager runat="Server" ID="RadScriptManager1" EnablePageMethods="true" /> 
        <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" RelativeTo="Element"
            Position="TopLeft" AutoTooltipify="true" ContentScrolling="Default" Width="150"
            EnableShadow="false" Height="10" ShowEvent="OnMouseOver" ShowDelay="200" AutoCloseDelay="60000">
        </telerik:RadToolTipManager>
        <telerik:RadScheduler runat="server" ID="rschAppointments" Skin="Windows7" AllowEdit="true"
            AllowDelete="true" AllowInsert="true" ReadOnly="false" GroupingDirection="Horizontal"
            AppointmentStyleMode="Default"  Height="750px" Width="100%"
            TimelineView-ReadOnly="false" OnAppointmentCreated="rschAppointments_AppointmentCreated"
            NumberOfHoveredRows="1" DataKeyField="Id" DataSubjectField="Name" DataStartField="StartTime"
            DataEndField="EndTime">
            <TimelineView UserSelectable="false" EnableExactTimeRendering="true" />
            <ExportSettings OpenInNewWindow="true" FileName="SchedulerExport">
                <Pdf PageTitle="Schedule" Author="Telerik" Creator="Telerik" Title="Schedule" />
            </ExportSettings>
            <AppointmentContextMenus>
                <telerik:RadSchedulerContextMenu runat="server" ID="AppointmentMenu">
                    <Items>
                        <telerik:RadMenuItem Text="" Value="EditAppointment" />
                        <telerik:RadMenuItem Text="" Value="DeleteAppointment" />
                    </Items>
                </telerik:RadSchedulerContextMenu>
                <telerik:RadSchedulerContextMenu runat="server" ID="ClassMenu">
                    <Items>
                        <telerik:RadMenuItem Text="" Value="EditClass" />
                        <telerik:RadMenuItem Text="" Value="DeleteClass" />
                        <telerik:RadMenuItem Text="" Value="AddPatientstoBatch" />
                    </Items>
                </telerik:RadSchedulerContextMenu>
                <telerik:RadSchedulerContextMenu runat="server" ID="OutOfOfficeMenu">
                    <Items>
                        <telerik:RadMenuItem Text="" Value="EditOutofOffice" />
                        <telerik:RadMenuItem Text="" Value="Deleteoutofoffice" />
                    </Items>
                </telerik:RadSchedulerContextMenu>
                <telerik:RadSchedulerContextMenu runat="server" ID="SlotMenu">
                    <Items>
                        <telerik:RadMenuItem Text="" Value="AddAppointment" runat="server" />
                        <telerik:RadMenuItem Text="" Value="AddClass" />
                        <telerik:RadMenuItem Text="" Value="OutofOffice" />
                        <telerik:RadMenuItem Text="" Value="EditSlot" />
                        <telerik:RadMenuItem Text="" Value="DeleteSlot" />
                    </Items>
                </telerik:RadSchedulerContextMenu>
            </AppointmentContextMenus>
            <TimeSlotContextMenus>
                <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerTimeSlotContextMenu">
                    <Items>
                        <telerik:RadMenuItem Text="" Value="AddAppointment" runat="server" />
                        <telerik:RadMenuItem Text="" Value="AddClass" />
                        <telerik:RadMenuItem Text="" Value="OpenSlot" />
                        <telerik:RadMenuItem Text="" Value="OutofOffice" />
                    </Items>
                </telerik:RadSchedulerContextMenu>
            </TimeSlotContextMenus>
        </telerik:RadScheduler>
    </div>
    </form>
</body>
</html>

Code Behind
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Schedule.aspx.cs" Inherits="Schedule" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager runat="Server" ID="RadScriptManager1" EnablePageMethods="true" /> 
        <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" RelativeTo="Element"
            Position="TopLeft" AutoTooltipify="true" ContentScrolling="Default" Width="150"
            EnableShadow="false" Height="10" ShowEvent="OnMouseOver" ShowDelay="200" AutoCloseDelay="60000">
        </telerik:RadToolTipManager>
        <telerik:RadScheduler runat="server" ID="rschAppointments" Skin="Windows7" AllowEdit="true"
            AllowDelete="true" AllowInsert="true" ReadOnly="false" GroupingDirection="Horizontal"
            AppointmentStyleMode="Default"  Height="750px" Width="100%"
            TimelineView-ReadOnly="false" OnAppointmentCreated="rschAppointments_AppointmentCreated"
            NumberOfHoveredRows="1" DataKeyField="Id" DataSubjectField="Name" DataStartField="StartTime"
            DataEndField="EndTime">
            <TimelineView UserSelectable="false" EnableExactTimeRendering="true" />
            <ExportSettings OpenInNewWindow="true" FileName="SchedulerExport">
                <Pdf PageTitle="Schedule" Author="Telerik" Creator="Telerik" Title="Schedule" />
            </ExportSettings>
            <AppointmentContextMenus>
                <telerik:RadSchedulerContextMenu runat="server" ID="AppointmentMenu">
                    <Items>
                        <telerik:RadMenuItem Text="" Value="EditAppointment" />
                        <telerik:RadMenuItem Text="" Value="DeleteAppointment" />
                    </Items>
                </telerik:RadSchedulerContextMenu>
                <telerik:RadSchedulerContextMenu runat="server" ID="ClassMenu">
                    <Items>
                        <telerik:RadMenuItem Text="" Value="EditClass" />
                        <telerik:RadMenuItem Text="" Value="DeleteClass" />
                        <telerik:RadMenuItem Text="" Value="AddPatientstoBatch" />
                    </Items>
                </telerik:RadSchedulerContextMenu>
                <telerik:RadSchedulerContextMenu runat="server" ID="OutOfOfficeMenu">
                    <Items>
                        <telerik:RadMenuItem Text="" Value="EditOutofOffice" />
                        <telerik:RadMenuItem Text="" Value="Deleteoutofoffice" />
                    </Items>
                </telerik:RadSchedulerContextMenu>
                <telerik:RadSchedulerContextMenu runat="server" ID="SlotMenu">
                    <Items>
                        <telerik:RadMenuItem Text="" Value="AddAppointment" runat="server" />
                        <telerik:RadMenuItem Text="" Value="AddClass" />
                        <telerik:RadMenuItem Text="" Value="OutofOffice" />
                        <telerik:RadMenuItem Text="" Value="EditSlot" />
                        <telerik:RadMenuItem Text="" Value="DeleteSlot" />
                    </Items>
                </telerik:RadSchedulerContextMenu>
            </AppointmentContextMenus>
            <TimeSlotContextMenus>
                <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerTimeSlotContextMenu">
                    <Items>
                        <telerik:RadMenuItem Text="" Value="AddAppointment" runat="server" />
                        <telerik:RadMenuItem Text="" Value="AddClass" />
                        <telerik:RadMenuItem Text="" Value="OpenSlot" />
                        <telerik:RadMenuItem Text="" Value="OutofOffice" />
                    </Items>
                </telerik:RadSchedulerContextMenu>
            </TimeSlotContextMenus>
        </telerik:RadScheduler>
    </div>
    </form>
</body>
</html>

Plamen
Telerik team
 answered on 26 Mar 2012
3 answers
130 views
I'm doing some client side manipulation of calendar events after the server side schedule has been populated.

This works on the initial load but if I try paging between months my rewrite (Tied to
$(document).ready) never gets fired because of the Ajax scheduler is using.

Is there a code sample showing a js handler that can detect a Scheduler ajax call?

Control is server bound.

Thanks

Michael




Ivana
Telerik team
 answered on 26 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?