Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
203 views
i got used to my previous infragistics add row that always appears either at the top or bottom of the grid for adding new records without clicking on a button - how do I do this in radgrid? I have dropdown columns and numeric or text columns
EJ
Top achievements
Rank 1
 answered on 09 Jun 2010
3 answers
115 views
Hi,

I add two different user controls on different zones on a page. If I refresh or submit any one of them, another one also get refreshed. Kindly suggest how  can I avoid server hit of other user control?

Regards,
Tulika
Pero
Telerik team
 answered on 09 Jun 2010
1 answer
121 views
Hi ,
 since Grid filter is case sensitive , i used the code below
RadGrid1.GroupingSettings.CaseSensitive = false;
Can weconfigure the same thing  webconfig so that in the  whole project  case sensitiveness of radfilter will be  false.


 

 

 

Radoslav
Telerik team
 answered on 09 Jun 2010
3 answers
308 views
Okay, so despite the fact that I'm following the Telerik example here to the letter...

var combo = <%= RadComboBox1.ClientID %>;
combo.Items[0].Select();

My Javascript function cannot find my RadComboBox, and when I run the Javascript function with this command in it, I get the error "ctl00_SecondLevelBodyContent_TopLevelTabs_CustomerServiceTab_RadComboBox1 is not defined".  What gives?

[For what it's worth, document.getElementById('<%= RadComboBox1.ClientID %>') evaluates to object HTMLDivElement.]

I just want to be able to grab hold of my ComboBox from the client side, and I'm baffled why the seemingly-basic example on the Telerik website is failing for me.  Thanks for your help.
Kalina
Telerik team
 answered on 09 Jun 2010
6 answers
139 views
Hi,

I have textboxes and my entire site is using RadFormControl. The problem is when I type a long string in a textbox, the width of the textbox elongate until it shows all the string. Thus affecting the width and position of the controls beside it. The width of my textboxes are set to 100% since my layout is fluid.

The problem only happens in IE8. I tried using Chrome and it does NOT elongate and works just fine. Thanks
Bozhidar
Telerik team
 answered on 09 Jun 2010
1 answer
205 views
Hi,

I'm having a problem with using GridBinaryImageColumn in  RadGrid. I want to customize my Insert/Edit form by using <EditFormSettings EditFormType="Template">and <FormTemplate>. But the problem is I can not access the GridBinaryImageColumn in the form template as other RadGrid elements. The GridBinaryImageColumnWhat auto generates the upload button.

Below is the code that I have:

<telerik:RadGrid runat="server" ID="RadGrid_Exercises" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" ShowStatusBar="True" GridLines="None"
            OnNeedDataSource="RadGrid_Exercises_NeedDataSource" OnUpdateCommand="RadGrid_Exercises_UpdateCommand"
            OnItemCommand="RadGrid_Exercises_OnItemCommand"
            OnDeleteCommand="RadGrid_Exercises_DeleteCommand" OnInsertCommand="RadGrid_Exercises_InsertCommand">

<PagerStyle Mode="NumericPages" AlwaysVisible="true" />
            <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="Id">
                <Columns>
              <telerik:GridEditCommandColumn ButtonType="ImageButton">
                        <HeaderStyle Width="3%" />
                    </telerik:GridEditCommandColumn>
               <telerik:GridBoundColumn DataField="Id" DataType="System.Int16" HeaderText="Id" ReadOnly="True"
                        SortExpression="Id" UniqueName="Id" Visible="false">
                    </telerik:GridBoundColumn>
                <telerik:GridBoundColumn  DataField="Name"  HeaderText="Name" UniqueName="Name" >
                    </telerik:GridBoundColumn>
                <telerik:GridBinaryImageColumn DataField="HowToImage1" HeaderText="HowToImage1" ResizeMode="Fit"
                            UniqueName="HowToImage1" ImageWidth="180px" ImageHeight="180px" />
              </Columns>
               <EditFormSettings EditFormType="Template">
                    <FormTemplate>
                     <asp:Label runat="server" ID="NameLBL" Text="Name" ></asp:Label>
                     <telerik:RadTextBox ID="NameRTB" runat="server" Text='<%# Bind("Name") %>' Skin="WebBlue" MaxLength="30">
                    </telerik:RadTextBox>


<<<<Here I need to define the layout of the Image upload>>>>>>


               </FormTemplate>
         </EditFormSettings>
   </MasterTableView>
</telerik:RadGrid>


Actually the code is very long and I'm using tables but I just made it short to show my problem.

Could you please tell my how I can use a BinaryImage in FormTemplate??

Thanks.




Rosen
Telerik team
 answered on 09 Jun 2010
1 answer
106 views
Hello,
Got a call today asking me to modify an app that is using a RadGrid->Form Template for data entry. The requested addition was that there be the addition of a dropdown for some existing items that when selected automatically populates the text boxes on the EditForm. This EditForm uses RadUpload as well - see below
<FormTemplate> 
                        <table id="Table1" cellspacing="1" cellpadding="1" width="350" style="height: 250px;" 
                            border="0"
                            <tr> 
                                <td> 
                                </td> 
                                <td> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td> 
                                    Resource Type: 
                                </td> 
                                <td> 
                                    <asp:DropDownList ID="optResTypes" runat="server" DataSourceID="ResTypeDS" DataTextField="name" 
                                        DataValueField="name" AppendDataBoundItems="true" SelectedValue='<%# Bind("resourcetype_text") %>'
                                        <asp:ListItem Selected="True" Text="Select" Value=""></asp:ListItem> 
                                    </asp:DropDownList> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td> 
                                    Title/Name: 
                                </td> 
                                <td> 
                                    <asp:TextBox ID="txtTitle" Text='<%# Bind("title") %>' runat="server"></asp:TextBox> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td> 
                                    Description/URL: 
                                </td> 
                                <td> 
                                    <asp:TextBox ID="txtDescription" Text='<%# Bind( "field1") %>' runat="server"
                                    </asp:TextBox> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td> 
                                    Additional Details: 
                                </td> 
                                <td> 
                                    <asp:TextBox ID="txtAddl" Text='<%# Bind( "field2") %>' runat="server"
                                    </asp:TextBox> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td> 
                                    File Attachment: 
                                </td> 
                                <td> 
                                    <telerik:RadUpload MaxFileSize="5000000" runat="server" ID="FileUpload1"  
                                        AllowedFileExtensions=".zip,.jpg,.pptx,.docx,.doc,.xls,.pdf,.gif,.ppt,.txt,.csv,.png,.xlsx" 
                                         ControlObjectsVisibility="None" OverwriteExistingFiles="true"
                                    </telerik:RadUpload> 
                                     
                                </td> 
                            </tr> 
                             
                            <%--<tr> 
                                <td> 
                                    File Name: 
                                </td> 
                                <td> 
                                    <asp:TextBox ID="FileName" runat="server" Text='<%#Bind ("filename") %>'></asp:TextBox> 
                                </td> 
                            </tr>--%> 
                            <table style="width: 100%"
                                <tr> 
                                    <td align="right" colspan="2"
                                        <asp:Button ID="UpdateButton" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' 
                                            runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                        </asp:Button>&nbsp; 
                                        <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                        </asp:Button> 
                                    </td> 
                                </tr> 
                            </table> 
                    </FormTemplate> 

Any ideas/examples would be great!

Thanks,
Kevin
Shinu
Top achievements
Rank 2
 answered on 09 Jun 2010
2 answers
91 views
Hello,

I am using RadEditor for MOSS v. 5.7.2.0 to create/edit wiki pages in MOSS 2007 SP2.
When using the LinkManager button from the toolbox to create a link to another wiki page, the control does not show .aspx files in a wiki library.
If I use MOSSLinkManager instead the .aspx wiki pages are visible, but I need to use the HyperlinkManager, because it has much richer functionality in it.
Is it intended to use only MOSSLinkManager in the RadEditor for MOSS or this problem could be fixed?
Dimitar
Top achievements
Rank 1
 answered on 09 Jun 2010
1 answer
117 views
i need to restrict the grid to a specific height. the idea being that verticle scroll bars will appear allowing me the scroll down to those rows that aren't initially displayed.

is this possible ?

if i set the height of the grid with the height property (i.e. Height="400px"), strange things happen. all the controls that were previously under the grid now appear in the middle of the grid, but the grid still takes up it's original height.

i can set the page size, but each row is of variable height, so the grid's height will vary according to what page it is displaying. i want the grid's height to remain static.

Thanks



Andy
Top achievements
Rank 1
 answered on 09 Jun 2010
1 answer
125 views
Hi All,

We are using the 2010 version of ASP.NET AJAX Controls. When the IE is set to IE-8 Compatibility mode, then the page is not displaying as expected.

We have a ASP.net panel and inside the panel we are calling the RadScheduler control. When the IE is set to IE-8 Compatibility mode the RadScheduler is getting hidden and also it is displaying over the panel.

Can you please help me to resolve this issue. I am pasting below a sample code. I am also attaching the screenshot.

Regards,
Govind

Default.aspx
-------------------------------------------------------------------------

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Scheduler._Default" %>

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<%

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

 

<%

--<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>--%>

 

<%

--<%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>

 

<%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>

<%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>--

 

%>

 

<%

--<%@ Register TagPrefix="sds" Namespace="Telerik.Web.SessionDS" %>--%>

 

<

 

html xmlns="http://www.w3.org/1999/xhtml">

 

<

 

head id="Head1" runat="server">

 

<%

--<qsf:HeadTag ID="Headtag1" runat="server" />--%>

 

 

<style type="text/css">

 

/* Fix for header wrapping issue in IE6/7 */* html #RadScheduler1 div.rsHeader h2

{

position: absolute;

}

* + html #RadScheduler1 div.rsHeader h2

{

position: absolute;

}

.Monday

{

color: blue !important;

}

.rsCategoryBlue

{

border-bottom-color: #9bb0cc;

border-top-color: #9bb0cc;

border-right-color: #9bb0cc;

border-left-color: #9bb0cc;

}

.rsCategoryRed

{

border-bottom-color: #cc9b9b;

border-top-color: #cc9b9b;

border-right-color: #cc9b9b;

border-left-color: #cc9b9b;

}

.rsCategoryGreen

{

border-bottom-color: #b0cc9b;

border-top-color: #b0cc9b;

border-right-color: #b0cc9b;

border-left-color: #b0cc9b;

}

.rsCategoryOrange

{

border-bottom-color: #cdb597;

border-top-color: #cdb597;

border-right-color: #cdb597;

border-left-color: #cdb597;

}

.rsCategoryPink

{

border-bottom-color: #d1bcdf;

border-top-color: #d1bcdf;

border-right-color: #d1bcdf;

border-left-color: #d1bcdf;

}

.rsCategoryYellow

{

border-bottom-color: #dfdba7;

border-top-color: #dfdba7;

border-right-color: #dfdba7;

border-left-color: #dfdba7;

}

.rsCategoryViolet

{

border-bottom-color: #742062;

border-top-color: #742062;

border-right-color: #742062;

border-left-color: #742062;

}

.rsCategoryDarkRed

{

border-bottom-color: #370505;

border-top-color: #370505;

border-right-color: #370505;

border-left-color: #370505;

}

.rsCategoryDarkGreen

{

border-bottom-color: #053705;

border-top-color: #053705;

border-right-color: #053705;

border-left-color: #053705;

}

.rsCategoryDarkBlue

{

border-bottom-color: #304364;

border-top-color: #304364;

border-right-color: #304364;

border-left-color: #304364;

}

 

</style>

 

 

<script type="text/javascript">

 

 

function OnClientNavigationCommand(sender, eventArgs) {

 

 

// 7 = SwitchToDayView

 

 

if (eventArgs.get_command() == 7)

 

eventArgs.set_cancel(

true);

 

}

 

/* Firefox resize scrollable content */

 

 

function hideScrollableArea(sender, eventArgs) {

 

 

if ($telerik.isFirefox)

 

$telerik.$(

'.rsContentScrollArea').css('overflow', 'hidden');

 

}

 

function showScrollableArea(sender, eventArgs) {

 

 

if ($telerik.isFirefox)

 

$telerik.$(

'.rsContentScrollArea').css('overflow', 'auto');

 

}

 

 

</script>

 

</

 

head>

 

<

 

body class="BODY">

 

 

<form id="Form1" method="post" runat="server">

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />

 

 

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

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="RadScheduler1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadSplitter1" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

<telerik:AjaxSetting AjaxControlID="RadScheduler2">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadSplitter1" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

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

 

 

<div class="exampleContainer" width="500px" style="vertical-align: top">

 

<%

-- <telerik:RadSplitter runat="server" ID="RadSplitter1" Width="740px">

 

 

<telerik:RadPane runat="server" ID="SchedulerPane" MinWidth="350" Width="500px" Scrolling="None">

 

 

</telerik:RadPane>

</telerik:RadSplitter>--

 

%>

 

 

<asp:Panel ID="Panel1" runat="server" ScrollBars="Horizontal" Width="999px" BorderStyle="Groove"

 

 

BorderWidth="2px">

 

 

<table style="border-color:red; border-width:thick; height:100%" >

 

 

<tr valign="top">

 

 

<td valign="top" style="height:100%; border-width:thick; background-color:Green">

 

 

<telerik:RadScheduler runat="server" ID="RadScheduler2" SelectedDate="2010-01-01"

 

 

Width="500px" SelectedView="MonthView" ShowHeader="true" ShowViewTabs="false"

 

 

ShowNavigationPane="false" ShowFooter="false" AllowEdit="false" AllowInsert="false"

 

 

AllowDelete="false" OnClientNavigationCommand="OnClientNavigationCommand"

 

 

OnAppointmentCreated="RadScheduler_OnAppointmentCreated"

 

 

OverflowBehavior="Expand" MonthView-AdaptiveRowHeight="True"

 

 

Height="100px">

 

 

<MonthView VisibleAppointmentsPerDay="20" AdaptiveRowHeight="true" />

 

 

</telerik:RadScheduler>

 

 

</td>

 

 

<td style="height:100%; border-width:thick; background-color:Green">

 

 

<telerik:RadScheduler runat="server" ID="RadScheduler1" SelectedDate="2010-02-01"

 

 

Width="500px" SelectedView="MonthView" ShowHeader="true" ShowViewTabs="false"

 

 

ShowNavigationPane="false" ShowFooter="false" AllowEdit="false" AllowInsert="false"

 

 

AllowDelete="false" OnClientNavigationCommand="OnClientNavigationCommand"

 

 

OnAppointmentCreated="RadScheduler_OnAppointmentCreated"

 

 

OverflowBehavior="Expand" MonthView-AdaptiveRowHeight="true"

 

 

Height="100%" style="top: 0px; left: 0px">

 

 

<MonthView VisibleAppointmentsPerDay="20" AdaptiveRowHeight="true" />

 

 

</telerik:RadScheduler>

 

 

</td>

 

 

<td >

 

 

<telerik:RadScheduler runat="server" ID="RadScheduler3" SelectedDate="2010-03-01"

 

 

Width="500px" SelectedView="MonthView" ShowHeader="true" ShowViewTabs="false"

 

 

ShowNavigationPane="false" ShowFooter="false" AllowEdit="false" AllowInsert="false"

 

 

AllowDelete="false" OnClientNavigationCommand="OnClientNavigationCommand"

 

 

OnAppointmentCreated="RadScheduler_OnAppointmentCreated"

 

 

OverflowBehavior="Expand" Height="100%">

 

 

<MonthView VisibleAppointmentsPerDay="20" AdaptiveRowHeight="true" />

 

 

</telerik:RadScheduler>

 

 

</td>

 

 

<td style="height:100%; border-width:thick; background-color:Green">

 

 

<telerik:RadScheduler runat="server" ID="RadScheduler4" SelectedDate="2010-04-01"

 

 

Width="500px" SelectedView="MonthView" ShowHeader="true" ShowViewTabs="false"

 

 

ShowNavigationPane="false" ShowFooter="false" AllowEdit="false" AllowInsert="false"

 

 

AllowDelete="false" OnClientNavigationCommand="OnClientNavigationCommand"

 

 

OnAppointmentCreated="RadScheduler_OnAppointmentCreated"

 

 

OverflowBehavior="Expand" Height="100px">

 

 

<MonthView VisibleAppointmentsPerDay="20" AdaptiveRowHeight="true" />

 

 

</telerik:RadScheduler>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</div>

 

 

</asp:Panel>

 

 

</form>

 

</

 

body>

 

</

 

html>

 


CS file
--------------------------------------------------------

namespace

 

Scheduler

 

{

 

public partial class _Default : System.Web.UI.Page

 

{

 

private const string ProviderSessionKey = "Telerik.Web.Examples.Scheduler.MultipleInstances.DefaultCS";

 

 

// You can safely ignore this method.

 

 

// Its purpose is to limit the changes to the underlying data only to the active user session.

 

 

protected void Page_Init(object sender, EventArgs e)

 

{

 

XmlSchedulerProvider provider;

 

 

if ((Session[ProviderSessionKey] == null) || (!IsPostBack))

 

{

provider =

new XmlSchedulerProvider(

 

Server.MapPath(

"~/App_Data/MultipleInstances.xml"), false);

 

Session[ProviderSessionKey] = provider;

}

 

else

 

{

provider = (

XmlSchedulerProvider)Session[ProviderSessionKey];

 

}

RadScheduler2.Provider = provider;

RadScheduler1.Provider = provider;

RadScheduler3.Provider = provider;

RadScheduler4.Provider = provider;

 

//RadScheduler2.Height = RadScheduler1.Height;

 

 

//RadScheduler3.Height = RadScheduler1.Height;

 

 

//RadScheduler4.Height = RadScheduler1.Height;

 

 

//RadScheduler4.Height = Unit.Pixel(150);

 

}

 

private void Page_Load(object sender, EventArgs e)

 

{

 

//RadScheduler2.Height = RadScheduler1.Height;

 

 

//RadScheduler3.Height = RadScheduler1.Height;

 

 

//RadScheduler4.Height = RadScheduler1.Height;

 

 

//RadScheduler4.Height = Unit.Pixel(150);

 

}

 

protected void RadScheduler_OnAppointmentCreated(object sender, AppointmentCreatedEventArgs e)

 

{

 

switch (e.Appointment.Attributes["type"])

 

{

 

case "1":

 

e.Appointment.CssClass =

"rsCategoryBlue";

 

 

break;

 

 

case "2":

 

e.Appointment.CssClass =

"rsCategoryViolet";

 

 

break;

 

 

case "3":

 

e.Appointment.CssClass =

"rsCategoryRed";

 

 

break;

 

 

case "4":

 

e.Appointment.CssClass =

"rsCategoryOrange";

 

 

break;

 

 

case "5":

 

e.Appointment.CssClass =

"rsCategoryGreen";

 

 

break;

 

 

case "6":

 

e.Appointment.CssClass =

"rsCategoryPink";

 

 

break;

 

 

case "7":

 

e.Appointment.CssClass =

"rsCategoryYellow";

 

 

break;

 

 

case "8":

 

e.Appointment.CssClass =

"rsCategoryDarkRed";

 

 

break;

 

 

case "9":

 

e.Appointment.CssClass =

"rsCategoryDarkGreen";

 

 

break;

 

 

case "10":

 

e.Appointment.CssClass =

"rsCategoryDarkBlue";

 

 

break;

 

 

default:

 

e.Appointment.CssClass =

"rsCategoryBlue";

 

 

break;

 

}

}

}

}

Peter
Telerik team
 answered on 09 Jun 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?