Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
159 views
How do I do the following:

1. Remove Hourly, Daily, Monthly & Yearly recurrence radio buttons? Just want weekly.
2. Remove "Recur every 1 weeks on" - just want to do 1 week so will that default still work if control is hidden?
3. Do not allow recurrence of another recurrence - specifically don't allow recurrence of a record w/ a recurrentparentid.
James B.
Top achievements
Rank 1
 answered on 18 Jun 2012
0 answers
65 views

Hi I am testing the google-like example but encounter  a problem when asking for the CurrentFilterValue, here is the code,

protected void RadGrid_ItemCommand(object source, GridCommandEventArgs e)
        {
            if ((e.CommandName == "Filter"))
            {
                string something = "";
                foreach (GridColumn column in e.Item.OwnerTableView.Columns)
                {
                    something = column.CurrentFilterValue;
                    column.CurrentFilterValue = string.Empty;
                    column.CurrentFilterFunction = GridKnownFunction.NoFilter;
                }
            }
        }


The issue is that the string something is always “” for all the values. I test the same code with a default GridColumn and it works fine (change the value of “something”) but not with the current google-like filtering example.

The code in the CustomeFilter is the same as the demo code(MyCustomFilteringColumnCS.cs).

Thanks

Carlos
Top achievements
Rank 1
 asked on 18 Jun 2012
2 answers
89 views
hello community,

does someone know if there is a possibility to bind RadScheduler to pagemethods (webservice)?

kind regards,

bernhard  
Bernhard Rosenfelder
Top achievements
Rank 1
 answered on 18 Jun 2012
0 answers
109 views
Hi Team,

  I'm getting below javascript error. I'm using Q22010 version.

  Accroding to my requirement with help of  "Load on Demand" demo implemented.

  In aspx page I write below  code
  <telerik:RadAjaxManager runat="server" ID="ramMasterData">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

and in my user control page also below code I write:
 <telerik:RadAjaxManager ID="ramRes" runat="server" EnableAJAX="true" OnAjaxRequest="ramRes_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ramRes">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgGroup" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rgGroup">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgGroup" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
   and in ascx.cs file

protected void ramRes_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        try
        {
            if (e.Argument.StartsWith("Rebind$"))
            {
                //get groupId& Row Position from e.Argument
                string[] arrVal = e.Argument.Split('$');
                var groupId = arrVal[1].Trim();
                var rowpos = arrVal[2].Trim();

                rgGroup.MasterTableView.HierarchyDefaultExpanded = false;

                //refresh the Approvers list
                rgGroup.Rebind();

                //Call the javascript function to expand the parent node.
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "loadscript1", "ExpandMasterTableViewItem(" + rowpos + ");", true);
            }
            else if (e.Argument.StartsWith("Rebind"))
            {
                rgGroup.Rebind();
            }
        }
runtime I getting below error.

 Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same id 'ctl00_ContentPlaceHolder1_rgGroup_userControl_ramRes' can't be added to the application.
Thanks in Advance.
Mr.Perfect
Perfect
Top achievements
Rank 1
 asked on 18 Jun 2012
0 answers
96 views
I have a grid which dates entering valid but I want to change the state will not let me stay in the initial state can help me


 void list1_SelectedIndexChanged(
object sender, RadComboBoxSelectedIndexChangedEventArgs e)

{

RadComboBox estado = (RadComboBox)sender;

GridEditFormItem editItem = (GridEditFormItem)estado.NamingContainer;

estado_ps4 = estado.SelectedValue;

////

//mensaje = estado.SelectedValue;

//string html = "<SCRIPT> alert('" + mensaje + "'); </SCRIPT>";

//Response.Write(html);

 

switch (estado.SelectedValue)

{

case "Adjudicado":

editItem[

"contratista_prc"].Visible = true;

editItem[

"montocontratado_prc"].Visible = true;

editItem[

"negociacion_prc"].Visible = true;

break;

case "Por Adjudicar":

editItem[

"contratista_prc"].Visible = false;

editItem[

"montocontratado_prc"].Visible = false;

editItem[

"observacion_prc"].Visible = false;

editItem[

"negociacion_prc"].Visible = false;

break;

case "Contratista Fallido":

editItem[

"numeroproceso_prc"].Enabled = false;

editItem[

"nombre_con"].Enabled = false;

editItem[

"fechapublicacion_ps4"].Enabled = false;

editItem[

"preguntasdesde_ps4"].Enabled = false;

editItem[

"preguntashasta_ps4"].Enabled = false;

editItem[

"recepcionofertas_ps4"].Enabled = false;

editItem[

"aperturaofertas_ps4"].Enabled = false;

editItem[

"solicitarconvalidacion_ps4"].Enabled = false;

editItem[

"entregaconvalidacion_ps4"].Enabled = false;

editItem[

"actacalificacion_ps4"].Enabled = false;

editItem[

"iniciopuja_ps4"].Enabled = false;

editItem[

"finpuja_ps4"].Enabled = false;

editItem[

"adjudicacion_ps4"].Enabled = false;

editItem[

"contratista_prc"].Visible = true;

editItem[

"montocontratado_prc"].Visible = true;

editItem[

"negociacion_prc"].Visible = true;

break;

case "Desierto":

editItem[

"numeroproceso_prc"].Enabled = false;

editItem[

"nombre_con"].Enabled = false;

editItem[

"fechapublicacion_ps4"].Enabled = false;

editItem[

"preguntasdesde_ps4"].Enabled = false;

editItem[

"preguntashasta_ps4"].Enabled = false;

editItem[

"recepcionofertas_ps4"].Enabled = false;

editItem[

"aperturaofertas_ps4"].Enabled = false;

editItem[

"solicitarconvalidacion_ps4"].Enabled = false;

editItem[

"entregaconvalidacion_ps4"].Enabled = false;

editItem[

"actacalificacion_ps4"].Enabled = false;

editItem[

"iniciopuja_ps4"].Enabled = false;

editItem[

"finpuja_ps4"].Enabled = false;

editItem[

"adjudicacion_ps4"].Enabled = false;

editItem[

"contratista_prc"].Visible = true;

editItem[

"montocontratado_prc"].Visible = true;

editItem[

"contratista_prc"].Visible = false;

editItem[

"montocontratado_prc"].Visible = false;

editItem[

"negociacion_prc"].Visible = true;

editItem[

"observacion_prc"].Visible = false;

break;

}

////

//mensaje = estado.SelectedValue;

//string html1 = "<SCRIPT> alert('" + mensaje + "'); </SCRIPT>";

//Response.Write(html1);

////

//estado_ps4 = estado.SelectedValue;

}

void montoadjudicado_TextChanged(object sender, EventArgs e)

{

RadNumericTextBox monto = (RadNumericTextBox)sender;

GridEditFormItem editItem = (GridEditFormItem)monto.NamingContainer;

if (Convert.ToDouble(monto.Value) > objpaso4.montoreferencial_ps2)

editItem[

"observacion_prc"].Visible = true;

else

editItem[

"observacion_prc"].Visible = false;

}

void list_PreRender(object sender, EventArgs e)

{

RadComboBox estado = (RadComboBox)sender;

GridEditFormItem editItem = (GridEditFormItem)estado.NamingContainer;

RadDateTimePicker fecha = (RadDateTimePicker)editItem["fechapublicacion_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"fechapublicacion_ps4"].Enabled = false;

else

editItem[

"fechapublicacion_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["preguntasdesde_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"preguntasdesde_ps4"].Enabled = false;

else

editItem[

"preguntasdesde_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["preguntashasta_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"preguntashasta_ps4"].Enabled = false;

else

editItem[

"preguntashasta_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["recepcionofertas_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"recepcionofertas_ps4"].Enabled = false;

else

editItem[

"recepcionofertas_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["aperturaofertas_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"aperturaofertas_ps4"].Enabled = false;

else

editItem[

"aperturaofertas_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["solicitarconvalidacion_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"solicitarconvalidacion_ps4"].Enabled = false;

else

editItem[

"solicitarconvalidacion_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["entregaconvalidacion_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"entregaconvalidacion_ps4"].Enabled = false;

else

editItem[

"entregaconvalidacion_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["actacalificacion_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"actacalificacion_ps4"].Enabled = false;

else

editItem[

"actacalificacion_ps4"].Enabled = true;

fecha = (

RadDateTimePicker)editItem["adjudicacion_ps4"].Controls[0];

if (fecha.SelectedDate < DateTime.Now)

editItem[

"adjudicacion_ps4"].Enabled = false;

else

editItem[

"adjudicacion_ps4"].Enabled = true;

////

//mensaje = estado_ps4;

//string html2 = "<SCRIPT> alert('" + mensaje + "'); </SCRIPT>";

//Response.Write(html2);

////

////

//mensaje = estado.SelectedValue + "-------";

//string html3 = "<SCRIPT> alert('" + mensaje + "'); </SCRIPT>";

//Response.Write(html3);

////

if(estado_ps4.Equals(""))

switch (estado.SelectedValue)

{

case "Adjudicado":

editItem[

"contratista_prc"].Visible = true;

editItem[

"montocontratado_prc"].Visible = true;

editItem[

"negociacion_prc"].Visible = true;

break;

case "Por Adjudicar":

editItem[

"contratista_prc"].Visible = false;

//editItem["montocontratado_prc"].Visible = false;

editItem[

"observacion_prc"].Visible = false;

editItem[

"negociacion_prc"].Visible = false;

break;

case "Contratista Fallido":

editItem[

"numeroproceso_prc"].Enabled = false;

editItem[

"nombre_con"].Enabled = false;

editItem[

"fechapublicacion_ps4"].Enabled = false;

editItem[

"preguntasdesde_ps4"].Enabled = false;

editItem[

"preguntashasta_ps4"].Enabled = false;

editItem[

"recepcionofertas_ps4"].Enabled = false;

editItem[

"aperturaofertas_ps4"].Enabled = false;

editItem[

"solicitarconvalidacion_ps4"].Enabled = false;

editItem[

"entregaconvalidacion_ps4"].Enabled = false;

editItem[

"actacalificacion_ps4"].Enabled = false;

editItem[

"iniciopuja_ps4"].Enabled = false;

editItem[

"finpuja_ps4"].Enabled = false;

editItem[

"adjudicacion_ps4"].Enabled = false;

editItem[

"contratista_prc"].Visible = true;

editItem[

"montocontratado_prc"].Visible = true;

editItem[

"negociacion_prc"].Visible = true;

break;

case "Desierto":

editItem[

"numeroproceso_prc"].Enabled = false;

editItem[

"nombre_con"].Enabled = false;

editItem[

"fechapublicacion_ps4"].Enabled = false;

editItem[

"preguntasdesde_ps4"].Enabled = false;

editItem[

"preguntashasta_ps4"].Enabled = false;

editItem[

"recepcionofertas_ps4"].Enabled = false;

editItem[

"aperturaofertas_ps4"].Enabled = false;

editItem[

"solicitarconvalidacion_ps4"].Enabled = false;

editItem[

"entregaconvalidacion_ps4"].Enabled = false;

editItem[

"actacalificacion_ps4"].Enabled = false;

editItem[

"iniciopuja_ps4"].Enabled = false;

editItem[

"finpuja_ps4"].Enabled = false;

editItem[

"adjudicacion_ps4"].Enabled = false;

editItem[

"contratista_prc"].Visible = true;

editItem[

"montocontratado_prc"].Visible = true;

editItem[

"contratista_prc"].Visible = false;

editItem[

"montocontratado_prc"].Visible = false;

editItem[

"negociacion_prc"].Visible = true;

editItem[

"observacion_prc"].Visible = false;

break;

}

estado_ps4 = estado.SelectedValue;

}

void tipocontratacion_PreRender(object sender, EventArgs e)

{

TextBox texto = (TextBox)sender;

GridEditFormItem editItem = (GridEditFormItem)texto.NamingContainer;

RadDateTimePicker fecha = (RadDateTimePicker)editItem["iniciopuja_ps4"].Controls[0];

if (!texto.Text.ToLower().Contains("subasta inversa") || fecha.SelectedDate < DateTime.Now)

editItem[

"iniciopuja_ps4"].Enabled = false;

fecha = (

RadDateTimePicker)editItem["finpuja_ps4"].Controls[0];

if (!texto.Text.ToLower().Contains("subasta inversa") || fecha.SelectedDate < DateTime.Now)

editItem[

"finpuja_ps4"].Enabled = false;

if (texto.Text.ToLower().Contains("subasta inversa"))

editItem[

"negociacion_prc"].Enabled = true;

else

editItem[

"negociacion_prc"].Enabled = false;

editItem[

"nombre_con"].Enabled = false;

}

private DateTime verificarFecha(string fecha)

{

if (fecha.Equals(""))

return Convert.ToDateTime("1900-01-01");

else

return Convert.ToDateTime(fecha);

}

private bool validarCampo(string campo, DateTime fecha, ValidacionFecha[] objvalidacion)

{

bool respuesta = false;

string estado = "";

DateTime fecha2 = DateTime.Now;

for (int i = 0; i < objvalidacion.Length; i++)

{

if (objvalidacion[i].campofecha_vaf.Equals(campo))

{

estado =

"encontro";

switch (objvalidacion[i].campovalidar_vaf)

{

case "fechapublicacion_ps4":

fecha2 = objpaso4.fechapublicacion_ps4;

break;

case "preguntasdesde_ps4":

fecha2 = objpaso4.preguntasdesde_ps4;

break;

case "preguntashasta_ps4":

fecha2 = objpaso4.preguntashasta_ps4;

break;

case "recepcionofertas_ps4":

fecha2 = objpaso4.recepcionofertas_ps4;

break;

case "aperturaofertas_ps4":

fecha2 = objpaso4.aperturaofertas_ps4;

break;

case "solicitarconvalidacion_ps4":

fecha2 = objpaso4.solicitarconvalidacion_ps4;

break;

case "entregaconvalidacion_ps4":

fecha2 = objpaso4.entregaconvalidacion_ps4;

break;

case "actacalificacion_ps4":

fecha2 = objpaso4.actacalificacion_ps4;

break;

case "iniciopuja_ps4":

fecha2 = objpaso4.iniciopuja_ps4;

break;

case "finpuja_ps4":

fecha2 = objpaso4.finpuja_ps4;

break;

case "adjudicacion_ps4":

fecha2 = objpaso4.adjudicacion_ps4;

break;

}

switch (objvalidacion[i].operador_vaf)

{

case "Entre":

if (objvalidacion[i].unidadtiempo_vaf.Equals("Das"))

{

if (fecha >= fecha2.AddDays(objvalidacion[i].diainicio_vaf) && fecha <= fecha2.AddDays(objvalidacion[i].diafinal_vaf))

respuesta =

true;

else

{

respuesta =

false;

mensaje += objvalidacion[i].etiquetacampofecha_vaf +

" debe estar entre " + objvalidacion[i].diainicio_vaf + " y " + objvalidacion[i].diafinal_vaf + " das despus de " + objvalidacion[i].etiquetacampovalidar_vaf + "\\n";

}

}

else

{

if (fecha >= fecha2.AddMinutes(objvalidacion[i].diainicio_vaf) && fecha <= fecha2.AddMinutes(objvalidacion[i].diafinal_vaf))

respuesta =

true;

else

{

respuesta =

false;

mensaje += objvalidacion[i].etiquetacampofecha_vaf +

" debe estar entre " + objvalidacion[i].diainicio_vaf + " y " + objvalidacion[i].diafinal_vaf + " minutos despus de " + objvalidacion[i].etiquetacampovalidar_vaf + "\\n";

}

}

break;

case "Mayor a":

if (objvalidacion[i].unidadtiempo_vaf.Equals("Das"))

{

if (fecha >= fecha2.AddDays(objvalidacion[i].diainicio_vaf))

respuesta =

true;

else

{

respuesta =

false;

mensaje += objvalidacion[i].etiquetacampofecha_vaf +

" debe ser mayor en " + objvalidacion[i].diainicio_vaf + " das a " + objvalidacion[i].etiquetacampovalidar_vaf + "\\n";

}

}

else

{

if (fecha >= fecha2.AddMinutes(objvalidacion[i].diainicio_vaf))

respuesta =

true;

else

{

respuesta =

false;

mensaje += objvalidacion[i].etiquetacampofecha_vaf +

" debe ser mayor en " + objvalidacion[i].diainicio_vaf + " minutos a " + objvalidacion[i].etiquetacampovalidar_vaf + "\\n";

}

}

break;

}

}

else

estado =

"no encontro";

}

if (estado.Equals("no encontro"))

return true;

else

return respuesta;

}

private void lanzarVentanaInformacion()

{

string html = "<SCRIPT> alert('" + mensaje + "'); </SCRIPT>";

Response.Write(html);

}

protected void RadGrid1_PreRender(object sender, EventArgs e)

{

if (rowindex > -1)

{

RadGrid1.Items[rowindex].Edit =

true;

rowindex = -1;

}

RadGrid1.Rebind();

}

}

}


Andrea
Top achievements
Rank 1
 asked on 18 Jun 2012
1 answer
117 views
Hi there,

I am currently using the Modal RadDock popup example.  I have a save button that does some server side validation before saving to the database.  If the validation and save is successful, I would like to close the RadDock Modal popup.  Is there a way to close the RadDock via server side code?

Thanks
John
Slav
Telerik team
 answered on 18 Jun 2012
4 answers
78 views
Hallo,

i will change the snooze times for reminder. I didn't need snooze time 5, 10 and 15 minutes befor start event, because i have only all times events without time.

Regards,
Christian
Frank
Top achievements
Rank 1
 answered on 18 Jun 2012
11 answers
312 views
I'm not clear on how to do this and I assume someone out there has done it.
Slav
Telerik team
 answered on 18 Jun 2012
1 answer
49 views
my problem is that when I want to edit my appointment, the calendar that have to be linked not select default.
I manage to see a list of calendar that is in my database but I can not select a schedule to open by default to which it belongs.

Thank you for your help .
Peter
Telerik team
 answered on 18 Jun 2012
1 answer
55 views
I have a combobox and it fires event onItemsRequested. In the code, I bring some class objects and convert them to table and bind with combobox. So far so good. but when the data returned is zero then I want to show error message on the screen that combobox is empty because of the errorr... I update the label (id = lblError) during the code i.e. lblError.Text = "blah bla blah...." but it does not get updated on the screeen. I have ajaxmanager on the aspx page and lblError is included under the ajax settings. so I basically I want to update the label during Combobox_ItemRequested event.

  RadComboBox rcb = (RadComboBox)sender;
 rcb.ClearSelection();
 rcb.Text = string.Empty;
  rcb.Items.Clear();
  rcb.ShowMoreResultsBox = false;
  rcb.BackColor = System.Drawing.Color.Empty;
  
 Employee[] lemployee = Employee.Search();
  
                            if (lemployee.Length == 0)
                            {
                                lblError.Text = "No employee found";
                                return;
                            }
                            else
                            {
                                lblError.Text = "";
                                 
                                DataTable dtable = new DataTable();
                                DataRow orow;
  
                                dtable.Columns.Add("empID");
                                dtable.Columns.Add("name");
                                dtable.Columns.Add("SortFlag");
                                dtable.Columns.Add("Address");
  
                                foreach (Employee oemp  in lEmployee)
                                {
                                    orow = dtable.NewRow();
  
                                    orow["empID"] = oemp.empId.ToString();
                                    orow["name"] = oemp.name.Trim();
                                    orow["Address"] = oemp.Address;
                                    orow["SortFlag"] = "2";
  
                                    dtable.Rows.Add(orow);
                                }
  
                                rcb.DataSource = dtable;
                                rcb.DataBind();
}


Kalina
Telerik team
 answered on 18 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
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
Bronze
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?