Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
96 views
If I set the Datasource in the Page_Laod event the paging does'nt work if the page mode is set to slider (see code) - in other modes it works:


Protected

 

 

Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

 

 

 

 

If Page.IsPostBack = False Then

 

SPCommand = db.GetStoredProcCommand(

 

"SEARCH_NET_Wogehmahin")

 

 

db.AddParameter(SPCommand,

 

"ReturnValue", DbType.Int32, 0, ParameterDirection.ReturnValue, False, 0, 0, "", DataRowVersion.Default, Nothing)

 

 

db.AddInParameter(SPCommand,

 

"Suchbegriff", DbType.AnsiString, Request("Suchbegriff"))

 

 

 

 

Using dataReader As DataSet = db.ExecuteDataSet(SPCommand)

 

 

RadListView1.DataSource = dataReader

 

RadListView1.DataBind()

 

 

 

End Using

 

 

 

End If

 

 

 

End Sub

 

Marin
Telerik team
 answered on 02 Mar 2011
2 answers
120 views
I am trying to determine how to get the original values from the record I am trying to update and what the changed values are in the code behind.  I can not figure out which event and what syntax to use to get these values when the user hits the "Update" link.  Any help would be appreciated.

Todd
Todd
Top achievements
Rank 1
 answered on 02 Mar 2011
5 answers
189 views
Hello Admin,

i am getting problem with RadDateTime picker control i.e.while clicking to edit the time in the date control field ,The date gets changed to the today's date,and existing date was changed,This should not be happen i only need to change the time,

Please provide me any solution on this ASAP,

Thanks

Radoslav
Telerik team
 answered on 02 Mar 2011
1 answer
63 views
Hello Admin,

I am implementing the radscheduler. In the appointments table i have a field IsEdited which is to be updated if and only if the date and time of the appointment is changed. I have used the following code which works fine for the simple appointment and also for the recurring appointments while editing the series. When I tried to update an occurence of the appointment the master's IsEdited field gets updated, but the occurence's field doesn't.
protected void rsAppointments_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
{
     if (e.ModifiedAppointment.Start != e.Appointment.Start || e.ModifiedAppointment.End != e.Appointment.End)
       {
                    e.ModifiedAppointment.Attributes["IsEdited"] = "1";
         
}
I want only the occurence's IsEdited field to be updated while updating the particular occurence and while editing the series the Master's field should be updated. How i can achive this?
Please Help me........

Thanks and regards,
roshani
Peter
Telerik team
 answered on 02 Mar 2011
4 answers
79 views
hi all
I have 3level Hierarchical radgrid in my page.
I  use a template column in it that have RadNumericTextBox and it has TextChanged method.

I have some questions and need your help please:

1)when user expand a node and type numbers in  RadNumericTextBox ,then collapse this,and then expand this node,text of this textbox was clear.
how can I avoid clearing datas(that users enterd)?

2)
In my RadNumericTextBox user enter number for grade.I want check this grade that wasn't greather than grade of it's parent.

In TextChanged Method,how can I reach the value of field "grade" of parent row of this textbox?
samaneh
Top achievements
Rank 1
 answered on 02 Mar 2011
10 answers
158 views
I'm using the control pond in RadScheduler, I have the following problem: the controls, and shows me that I have reservations in the database, I insert, edit and delete reservations, but I did not alter or remove stocks that have recurrence, which may be , leave the respective code:

 

 

object[] opParametrosEmpleados = new object

[2];

 

 

 

opParametrosEmpleados[0] = Session[

 

 

 

"CodigoCliente"

];

 

 

 

opParametrosEmpleados[1] = Session[

 

 

 

"CodigoCompania"

];

 

 

 

DsEmpleado = _fwAccesoDatos.ExecuteDataset(StrCadenaConexion,

 

 

 

"spObtenerListaEmpleados"

, opParametrosEmpleados);

 

 

 

 

 

object[] opParametrosSalas = new object

[2];

 

 

 

opParametrosSalas[0] = Session[

 

 

 

"CodigoCliente"

];

 

 

 

opParametrosSalas[1] = Session[

 

 

 

"CodigoCompania"

];

 

 

 

DsSalas = _fwAccesoDatos.ExecuteDataset(StrCadenaConexion,

 

 

 

"spObtenerListaSalas"

, opParametrosSalas);

 

 

 

 

 

 

 

 

//

RadCalendar1.SelectedDate = RadScheduler1.SelectedDate;

 

 

 

SyncCalendars();

 

opParametros[0] = Session[

 

 

 

"CodigoCliente"

];

 

 

 

opParametros[1] = Session[

 

 

 

"CodigoCompania"

];

 

 

 

DsReservas = _fwAccesoDatos.ExecuteDataset(StrCadenaConexion,

 

 

 

"spObtenerListaReservas"

, opParametros);

 

 

 

 

 

RadScheduler1.DataKeyField =

 

 

 

"CodigoReserva"

;

 

 

 

RadScheduler1.DataStartField =

 

 

 

"FechaHoraInicio"

;

 

 

 

RadScheduler1.DataEndField =

 

 

 

"FechaHoraFin"

;

 

 

 

RadScheduler1.DataSubjectField =

 

 

 

"Asunto"

;

 

 

 

RadScheduler1.DataDescriptionField =

 

 

 

"Descripcion"

;

 

 

 

RadScheduler1.DataRecurrenceField =

 

 

 

"RecurrenceRule"

;

 

 

 

RadScheduler1.DataRecurrenceParentKeyField =

 

 

 

"RecurrenceParentId"

;

 

 

 

RadScheduler1.DataSource = DsReservas.Tables[0];

 

 

 

 

 

 

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

 

 

 

 

 

//roomsS+++++++++++++

 

 

 

 

 

 

ResourceType sa = new ResourceType("Sala" );

 

sa.DataSource = DsSalas.Tables[0];

sa.KeyField =

 

"CodigoSala" ;

 

 

sa.ForeignKeyField = "IdSala" ;

 

sa.TextField = "Descripcion" ;

 

RadScheduler1.ResourceTypes.Add(sa);

 

 

 

 

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

//employee+++++++++++++++++++++

 

 

ResourceType em = new ResourceType("Empleado" );

 

 

em.DataSource = DsEmpleado.Tables[0];

em.KeyField = 

 

"CodigoEmpleado" ;

 

 

em.ForeignKeyField = "CodigoEmpleado" ;

 

em.TextField = "NombresCompletos" ;

 

RadScheduler1.ResourceTypes.Add(em);

control code:

 

<telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Hay" StartInsertingInAdvancedForm="True"

 

 

 OnAppointmentDelete="RadScheduler1_AppointmentDelete" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"  

OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnNavigationComplete="RadScheduler1_NavigationComplete"

 

 

 Height="550px" Width="800px" CustomAttributeNames="Engagement,CodigoEmpleado"

 

 OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" ShowFooter="False"

 

 DayStartTime="07:00:00" WorkDayEndTime="18:00:00" WorkDayStartTime="07:00:00"

 

 OnAppointmentCreated="RadScheduler1_AppointmentCreated" OnFormCreating="RadScheduler1_FormCreating"

 

 OnFormCreated="RadScheduler1_FormCreated" EnableDescriptionField="True" BorderStyle="Solid"

 

 EnableCustomAttributeEditing="True">  

<TimelineView UserSelectable="False" />

 

 

 <

 

 

AppointmentTemplate>

 

 

 

 

 

 

<span style="font-weight: bold; font-size: small"> 

 

 

<div

 

 

 

 

<%

 

 

# Eval("Subject" ) %>

 

 

 

 

 

</div>

 

 

 

 

 

/span >

 

 

 

 <

 

 

%# Eval("Resources[0].text") %>

 

 

 

 

 

 

 

<div >

 

 

 

 

 

 

<%# Eval("Resources[1].text" )%>

 

 

 

 

 

 

 

</div >

 

 

 

 

 

 

</AppointmentTemplate >

 

 

 

 

 

 

<TimeSlotContextMenuSettings EnableDefault="True" />

 

 

 

 

 

 

 

 

<AppointmentContextMenuSettings EnableDefault="True" />

 

 

 

 

 

 

 

 

<AdvancedForm Modal="True" EnableCustomAttributeEditing="True" />

 

 

 

 <

 

 

WeekView DayStartTime="07:00:00" WorkDayEndTime="18:00:00" WorkDayStartTime="07:00:00"/>

 

 

 

 

 

 

<Localization AdvancedAllDayEvent="Todo el d&#237;a" AllDay="Todo el d&#237;a" AdvancedEditAppointment

="Modificar Reserva"

 

 

 

 

 

 

AdvancedNewAppointment="Nueva Reserva" Cancel="Cancelar" ConfirmDeleteText

="Esta seguro de querer eliminar la reserva?"

 

 

 

 

Save="Guardar"/>

 

 

 

 

 

 

<DayView DayStartTime="07:00:00" WorkDayEndTime="18:00:00" WorkDayStartTime="07:00:00" />

 

 

 

 

 

 

</telerik:RadScheduler >

 

 

 

 

 

 

 

 

 

 

modify the code:

 

 

 

 

 

protected

 

 

 

 

 

 

 

 

void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)

 

 

  

 

{

 

 

 

 

opParametrosReservaUpdate[0] = Session[

 

 

 

"CodigoCliente"];

 

 

opParametrosReservaUpdate[1] = Session[

 

"CodigoCompania"];

 

 

 

opParametrosReservaUpdate[2] = e.ModifiedAppointment.Resources[0].Key;

opParametrosReservaUpdate[3] = e.ModifiedAppointment.Attributes[

 

"CodigoEmpleado"].ToString();

 

opParametrosReservaUpdate[4] = e.ModifiedAppointment.ID;

opParametrosReservaUpdate[5] = e.ModifiedAppointment.Subject;

 

opParametrosReservaUpdate[6] = e.ModifiedAppointment.Description;

 

opParametrosReservaUpdate[7] = e.ModifiedAppointment.Start;

 

opParametrosReservaUpdate[8] = e.ModifiedAppointment.End;

 

opParametrosReservaUpdate[9] = e.ModifiedAppointment.Attributes[

 

"Engagement"].ToString();

 

 

 

 

opParametrosReservaUpdate[10] = e.ModifiedAppointment.RecurrenceRule;

 

 

opParametrosReservaUpdate[11] = e.ModifiedAppointment.RecurrenceParentID;

 

opParametrosReservaUpdate[12] = 

 

 

"" ;
 

 

 

 ResultadoReserva = _fwAccesoDatos.ExecuteNonQuery(StrCadenaConexion, 

 

"updateAppoinment", opParametrosReservaUpdate);

 

 

 

 

 

}

Code to eliminate:

 

 

 

 e.Cancel = e.Appointment.Start <

 

DateTime.Now;

 

 

 

 

 

if

(e.Cancel)

 

 {

 

 

 

RadAjaxManager1.Alert(

 

"You can not delete reservations who are before the current date." );

 

 

 

 }

 

 

 

else

 

 

 

 

 

 

{

 

 

 

 

 

 

 

 

 

object[] opParametrosDeleteReserva = new Object [3];

 

 

 

  opParametrosDeleteReserva[0] = Session[

 

"CodigoCliente"];

 

 

 

  opParametrosDeleteReserva[1] = Session["CodigoCompania"];

 

 opParametrosDeleteReserva[2] = e.Appointment.ID.ToString();

 

 

 

 

 

try

 

 {

 

 

 

 _fwAccesoDatos.ExecuteNonQuery(StrCadenaConexion, "clearAppoinment", opParametrosDeleteReserva);

 

 

cargaRadScheduler();

 

 

 }

 

 

 

 

catch (EvaluateException ex)

 

 

 

 {

 

//LOG }

 

 

 

 

}

 

 

 

 }

 

 

 

 

 

 

 

 

thanks for your help

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Peter
Telerik team
 answered on 02 Mar 2011
2 answers
86 views
Ho there!

I've got a strange Problem using RadTextBox, RadComboBox or RadEditor in an EditTemplate (opened in Popup Mode) involving Sharepoint 2010:

When I place either control in the EditTemplate of a RadGrid "something" gets messed up. By "something" I mean that I dont know exactly what goes wrong... e.g. the Buttons in my RadToolBox are not triggering any action any more (there is no JavaScript error).

Replacing the Controls with standard asp.net controls brings back functionality and running the Code in a Playground Project (not involving Sharepoint) works as well.

Any ideas what could be the problem?

Thanks!
Maria Ilieva
Telerik team
 answered on 02 Mar 2011
1 answer
99 views
Hi,

I'm currently creating a tree dynamically using nodes with a ServerSideCallBack expandmode once the root nodes have been loaded. Is there any way for me to do this programatically? i.e. simulate the action of a user clicking on every treenode which in turn will populate the entire tree with data?

The actual use case is that I need to search for specific nodes on pageload in certain cases - the issue with this being that the tree is normally populated on the fly via user interaction. I've been trying to mimic this by attempting to recursively expand all nodes but have not had much success.

Using version 2010.3.1109.0

Thank you!,
Kesara.
Nikolay Tsenkov
Telerik team
 answered on 02 Mar 2011
1 answer
77 views
Hello.  I have tried everything to remove the indent for the text on the title bar of the PanelBar.  Has anyone had any luck with this?  Any assistance would be greatly appreciated.  Thank you!
Nikolay Tsenkov
Telerik team
 answered on 02 Mar 2011
1 answer
59 views
Hi;
We have use two RadListBox .We have unusal requirement such as Consider the Scenario when user Select on one list box then item of other listbox must not be selected and viceversa . The listBox are DragDrop listBox. we have tried using clientside event
"OnClientSelectedIndexChanging" on both the listbox and tried using the following code

 

 

var RHSBoxControl;

 

 

lstRHSBoxControl = $find(

 

'<%= RHSListBox.ClientID %>');

 

 

 

 

if (RHSBoxControl != null) {

 

 

 

 

var items = RHSBoxControl.get_items();

 

 

 

 

for (var lrhsnumCount = 0; lrhsnumCount < RHSBoxControl.get_items().get_count(); lrhsnumCount++) {

 

 

items.getItem(lrhsnumCount).set_selected(

 

false);

 

 

}

 

} .
but the issue is that when we try to fire this method on both list box . the system get hanged and it gives error such as A script on this page is causing Internet Explorer to run slowly.
If it continues to run , your computer might become unresponsive.

Please help how we can resolve this issue ASAP.
As we have go Live next week 

Dimitar Terziev
Telerik team
 answered on 02 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?