Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
436 views
Hi,

I have a radgrid to which I am adding columns as GridTemplateColumns which can be aligned in some order( number-right, date-left) . My radgrid supports column filtering. My issue is when I switch on filtering on columns, the filter textbox and image is not aligned with respect to the column alignment.

is there any way to set alignment to filter textbox and image??

Thanks,
Mahesh
Shinu
Top achievements
Rank 2
 answered on 06 May 2010
1 answer
101 views
I have some combo boxes within 3 rad panelbars, each time I expand a panelbar, all the combo boxes grow in width! I have tried wrapping these in tables, divs, etc and they just keep growing!

Here is a simple page that recreates the issue:

<%

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

 

<%

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

 

<!

 

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>Untitled Page</title>

 

</

 

head>

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True">

 

 

</telerik:RadScriptManager>

 

 

<div>

 

 

<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="1000">

 

 

<Items>

 

 

<telerik:RadPanelItem runat="server" Text="Customer Data" Expanded="True">

 

 

<Items>

 

 

<telerik:RadPanelItem Value="CustomerData" runat="server">

 

 

<ItemTemplate>

 

 

<table>

 

 

<tr>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtLastName" MaxLength="50" Width="350px" Label="Last Name" LabelCssClass="LabelCustomer" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

<td width="20px">&nbsp;</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtFirstName" MaxLength="50" Width="350px" Label="First Name" LabelCssClass="LabelCustomer" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtStreet" MaxLength="50" Width="350px" Label="Street Address" LabelCssClass="LabelCustomer" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

<td width="20px">&nbsp;</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtCity" MaxLength="50" Width="350px" Label="City" LabelCssClass="LabelCustomer" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

 

<telerik:RadComboBox ID="cmbState" Label="State" LabelCssClass="LabelCustomerDDL" runat="server" Height="200px" Width="250px"

 

 

DropDownWidth="298px" EmptyMessage="Choose a State or Province" HighlightTemplatedItems="true"

 

 

EnableLoadOnDemand="true" MarkFirstMatch="true">

 

 

<HeaderTemplate>

 

 

<table style="width: 275px" cellspacing="0" cellpadding="0">

 

 

<tr>

 

 

<td style="width: 177px;">

 

State / Province

</td>

 

 

<td style="width: 60px;">

 

State Code

</td>

 

 

<td style="width: 40px;">

 

Country

</td>

 

 

</tr>

 

 

</table>

 

 

</HeaderTemplate>

 

 

<ItemTemplate>

 

 

<table style="width: 275px" cellspacing="0" cellpadding="0">

 

 

<tr>

 

 

<td style="width: 177px;">

 

Texas

 

</td>

 

 

<td style="width: 60px;">

 

TX

 

</td>

 

 

<td style="width: 40px;">

 

USA

 

</td>

 

 

</tr>

 

 

</table>

 

 

</ItemTemplate>

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

<td width="20px">&nbsp;</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtPostalCode" MaxLength="50" Width="350px" Label="Postal Code" LabelCssClass="LabelCustomer" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="Vehicle Data">

 

 

<Items>

 

 

<telerik:RadPanelItem Value="VehicleData" runat="server">

 

 

<ItemTemplate>

 

 

<table>

 

 

<tr>

 

 

<td colspan="3">

 

 

<telerik:RadTextBox ID="txtVin" MaxLength="50" Width="350px" Label="VIN Number" LabelCssClass="LabelCustomer" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtLicense" MaxLength="4" Width="350px" Label="License Plate" LabelCssClass="LabelCustomer" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

<td width="20px">&nbsp;</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtYear" MaxLength="50" Width="350px" Label="Year" LabelCssClass="LabelCustomer" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

 

<telerik:RadComboBox ID="cmbVehicleMake" Label="Make" LabelCssClass="LabelCustomerDDL" runat="server" Height="200px" Width="200px"

 

 

DropDownWidth="200px" EmptyMessage="Choose a Vehicle Make" HighlightTemplatedItems="true"

 

 

EnableLoadOnDemand="true" MarkFirstMatch="true">

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

<td width="20px">&nbsp;</td>

 

 

<td>

 

 

<telerik:RadComboBox ID="cmbVehicleModel" Label="Model" LabelCssClass="LabelCustomerDDL" runat="server" Height="200px" Width="200px"

 

 

DropDownWidth="200px" EmptyMessage="Choose a Vehicle Model" HighlightTemplatedItems="true"

 

 

EnableLoadOnDemand="true" MarkFirstMatch="true">

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelBar>

 

 

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

 

 

</telerik:RadAjaxManager>

 

 

</div>

 

 

</form>

 

</

 

body>

 

</

 

html>

 

Yana
Telerik team
 answered on 06 May 2010
1 answer
233 views
Hi,

I'm trying to use the Export to Excel functionality, provided by the RadGrid, in conjunction with the MVC framework. (Please ignore this thread if already asked, but every thread pops up when searching for MVC due to the menu bar).

Since it's MVC, the grid is only known by the view. I've tried something in the line of:
<% 
grdReport.DataSource = ViewData["Report"]; 
grdReport.DataBind(); 
grdReport.ExportSettings.ExportOnlyData = false; 
grdReport.ExportSettings.IgnorePaging = true; 
grdReport.ExportSettings.OpenInNewWindow = true; 
grdReport.MasterTableView.ExportToExcel(); 
%> 

But it only displays the grid, not exporting it. My guess is that at this point, the view is already being rendered, being it too late to change the headers, etc...

Is there a preferred way to export to Excel using MVC? If not, is there a way to export strictly programmatically and catch the export stream, instead of streaming it directly to the response?

Kind regards,
Dries
Daniel
Telerik team
 answered on 06 May 2010
1 answer
102 views

Hi..
       i am using telerik rad grid.There ia m using group by panel.Can you suggest any way to select one group at a time and way to get that selected group with all the child items in it in server side as well as client side

Thanks
Tanmoy Sinha

 

 

Pavlina
Telerik team
 answered on 06 May 2010
9 answers
135 views
Hello,
I have a problem with exporting Radgrid to ExcelML.My Radgrid consist of 6 column,three of these column are Service Hours,Service Mins and PaidAmount.
When

ExcelMLExportStylesCreated event fired I have following code:

 

 

 

if (style.Id == "itemStyle")

 

{

style.NumberFormat.FormatType = Telerik.Web.UI.GridExcelBuilder.

NumberFormatType.Currency;

 

style.AlignmentElement.HorizontalAlignment = Telerik.Web.UI.GridExcelBuilder.

HorizontalAlignmentType.Left;

 

style.InteriorStyle.Color = System.Drawing.

Color.WhiteSmoke;

 

style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.

InteriorPatternType.Solid;

 

}

 

else if (style.Id == "alternatingItemStyle")

 

{

style.NumberFormat.FormatType = Telerik.Web.UI.GridExcelBuilder.

NumberFormatType.Currency;

 

style.AlignmentElement.HorizontalAlignment = Telerik.Web.UI.GridExcelBuilder.

HorizontalAlignmentType.Left;

 

style.InteriorStyle.Color = System.Drawing.

Color.LightGray;

 

style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.

InteriorPatternType.Solid;

 

}
When the currency is set,its applied to every column which contain number including ServiceHours and ServiceMins.I need that curency applied only to PaidAmount column.But if I comment out style currency format,PaidAmount column trailing zero cuts off and no dollar sign appeared.
Please help me.Thanks

Daniel
Telerik team
 answered on 06 May 2010
3 answers
323 views
Hello,

I have a RadDatePicker and two RadTimePickers on a page.  Is there any built-in way to link the selected date of the RadTimePickers to the selected date of the RadDatePicker so when they go to chose the time from the RadTimePicker it doens't change the date back to today's date?

I know that I can get the selected date from the RadDatePicker on autopostback and then set the selected date on the RadTimePickers to that date.  But then when you chose the time from the RadTimePicker it sets the date back to today's date.

Thanks.
Daniel
Telerik team
 answered on 06 May 2010
2 answers
99 views
when im trying to drag the image manager window towards any of the side and it creates space. i like to set a restrictionzone for image manager like radwindow. is this possible?
dick gordon
Top achievements
Rank 1
 answered on 06 May 2010
1 answer
127 views
Hello Sir,

How can Open RadWindow When Our Scheduler is in Update Panel.
Schenerio is,
my Scheduler is inside the update panel. and in scheduler i have context menu and i  fired server side code on click of context menu and open rad window.

its work perfectly when scheduler is out side of update panel but when scheduler is in side update panel then its not working.

Aspx Code is below:-

 

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

 

 

<ContentTemplate>

 


<

 

telerik:RadScheduler AllowInsert="false" HoursPanelTimeFormat="hh:mm tt" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"

 

 

OnAppointmentCreated="RadScheduler1_AppointmentCreated" runat="server" ID="RadScheduler1"

 

 

Skin="Office2007" Height="545px" CustomAttributeNames="StatusId" Width="690px"

 

 

ShowFooter="false" SelectedDate="2010-03-18" DayStartTime="07:00:00" DayEndTime="21:00:00"

 

 

FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" EnableDescriptionField="true"

 

 

ShowNavigationPane="false" OnAppointmentDelete="RadScheduler1_AppointmentDelete"

 

 

DataSubjectField="1" DataStartField="1" DataEndField="1" ShowAllDayRow="false"

 

 

AllowEdit="false" DataKeyField="" DataDescriptionField="Description" OnTimeSlotContextMenuItemClicked="RadScheduler1_TimeSlotContextMenuItemClicked"

 

 

AllowDelete="false" OnAppointmentContextMenuItemClicked="RadScheduler1_AppointmentContextMenuItemClicked"

 

 

OnNavigationCommand="RadScheduler1_NavigationCommand" OnTimeSlotCreated="RadScheduler1_TimeSlotCreated">

 

 

<AppointmentContextMenuSettings EnableDefault="false" />

 

 

<TimelineView UserSelectable="false" />

 

 

<AppointmentTemplate>

 

<%

# Eval("Subject")%>

 

 

<br />

 

 

<asp:Label runat="server" ID="Teacher" />

 

 

<br />

 

 

<asp:Label runat="server" ID="Students" />

 

 

</AppointmentTemplate>

 

 

 

<AppointmentContextMenus>

 

 

 

<telerik:RadSchedulerContextMenu runat="server" DataTextField="Status" DataValueField="StatusId"

 

 

ID="SchedulerAppointmentContextMenu" AppendDataBoundItems="true">

 

 

 

<Items>

 

 

 

<telerik:RadMenuItem Text="Copy" Value="Copy" />

 

 

<telerik:RadMenuItem IsSeparator="True" />

 

 

<telerik:RadMenuItem Text="Edit" Value="Edit" />

 

 

<telerik:RadMenuItem IsSeparator="True" />

 

 

</Items>

 

 

</telerik:RadSchedulerContextMenu>

 

 

</AppointmentContextMenus>

 

 

<TimeSlotContextMenus>

 

 

<telerik:RadSchedulerContextMenu runat="server" ID="SchedulerTimeSlotContextMenu">

 

 

<Items>

 

 

<telerik:RadMenuItem Text="New Appointment" Value="New" />

 

 

<telerik:RadMenuItem IsSeparator="true" />

 

 

<telerik:RadMenuItem Text="Paste" Value="Paste" />

 

 

</Items>

 

 

</telerik:RadSchedulerContextMenu>

 

 

</TimeSlotContextMenus>

 

 

<TimeSlotContextMenuSettings EnableDefault="False" />

 

 

</telerik:RadScheduler>

 

</

 

ContentTemplate>

 

 

 

 

 

<Triggers>

 

 

 

 

 

</Triggers>

 

 

 

 

 

</asp:UpdatePanel>

 

 

 



CS Page Code is Below.:-

 

protected

 

void RadScheduler1_TimeSlotContextMenuItemClicked(object sender, TimeSlotContextMenuItemClickedEventArgs e)

 

{

 

if (e.MenuItem.Value == "New")

 

{

 

//RadWindowManager1.Windows[0].Op

 

 

 

 

 

//Alert.Show("Chandan Kumar");

 

 

 

 

 

RadWindowManager windowManager = new RadWindowManager();

 

 

RadWindow widnow1 = new RadWindow();

 

 

// Set the window properties

 

 

 

 

 

//e.TimeSlot.Duration.

 

 

 

 

widnow1.NavigateUrl =

"~/Appointment/AppointmentDetails.aspx?FacilityId=" + ddlFacility.SelectedValue + "&StTime=" + e.TimeSlot.Start.Hour.ToString() + "&EndTime=" + RadScheduler1.DayEndTime.Hours.ToString() + "&appDate=" + RadScheduler1.SelectedDate.Date.ToString("dd/MM/yyyy") + "&appid=0&doctorId=" + ddlDoctor.SelectedValue + "&TimeInterval=" + RadScheduler1.MinutesPerRow.ToString() + "&FromTimeHour=" + e.TimeSlot.Start.Hour.ToString() + "&FromTimeMin=" + e.TimeSlot.Start.Minute.ToString() + "&Provider=" + ddlDoctor.SelectedItem.Text; ;

 

widnow1.Height = 500;

widnow1.Width = 700;

widnow1.Top = 40;

widnow1.Left = 100;

widnow1.ID =

"RadWindow1";

 

widnow1.OnClientClose =

"OnClientClose";

 

widnow1.VisibleOnPageLoad =

true; // Set this property to True for showing window from code

 

 

 

 

widnow1.Modal =

true;

 

widnow1.VisibleStatusbar =

false;

 

widnow1.Behavior =

WindowBehaviors.Close | WindowBehaviors.Move;

 

windowManager.Windows.Add(widnow1);

 

 

this.Form.Controls.Add(widnow1);

 

}

 

else if (e.MenuItem.Value == "Paste")

 

{

 

if (Convert.ToString(ViewState["CopyAppId"]) != "")

 

{

DAL.

DAL dl = new DAL.DAL(DAL.DAL.DBType.SqlServer, sConString);

 

 

Hashtable hshtableout = new Hashtable();

 

 

Hashtable hshtablein = new Hashtable();

 

hshtablein.Add(

"inyHospitalLocationId", Session["HospitalLocationID"]);

 

hshtablein.Add(

"intCopyAppointmentID", Convert.ToInt64(ViewState["CopyAppId"]));

 

hshtablein.Add(

"chrAppFromTime", e.TimeSlot.Start.Hour.ToString()+ ":" + e.TimeSlot.Start.Minute.ToString() );

 

hshtablein.Add(

"chrAppointmentDate", RadScheduler1.SelectedDate.ToString("dd/MM/yyyy"));

 

hshtablein.Add(

"intDoctorId", ddlDoctor.SelectedValue);

 

hshtablein.Add(

"intEncodedBy", Session["UserID"].ToString());

 

hshtableout.Add(

"intAppointmentNo", SqlDbType.Int);

 

hshtableout.Add(

"chvErrorStatus", SqlDbType.VarChar);

 

hshtableout = dl.getOutputParametersValues(

CommandType.StoredProcedure, "UspCopyDoctorAppointment", hshtablein, hshtableout);

 

 

//Cache.Remove("copyappointmentId");

 

 

 

 

 

//Alert.ShowAjaxMsg("Appointment Updated - " + hshtableout["intAppointmentNo"].ToString(), Page);

 

 

 

 

btnRefresh_OnClick(sender, e);

}

}

 

}

Peter
Telerik team
 answered on 06 May 2010
4 answers
137 views
Is it possible to capture the start and end date when the user clicks on one date (in month view) and drags across, maybe, the next three days(for example)?  I need the event to be triggered when the user releases the mouse click
Peter
Telerik team
 answered on 06 May 2010
1 answer
135 views
I am struggling with the following problem:
I want to create a chart with months on the X-axis like

1/2010 2/2010 3/2010 4/2010 5/2010 6/2010 7/2010 etcetera

On the Y-axis [Level] is displayed, but not every month has a [Level] value.
It can come from the DB like:

Date    | Level
-------------------
1/2010 | 50
2/2010 | 50
4/2010 | 52
7/2010 | 53

I want to display the months without a [Level] value in the chart to create a realistic time picture.

What is the best way to do this? I have tried several examples but no succes.

Best Regards,
Marc
Ves
Telerik team
 answered on 06 May 2010
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?