Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
117 views
Hi
I have a rad menu and I want to handle Item Clicked event. So I set NavigateUrl="" and  write a handler for the event and it works ok. However if the current form has required field validators and the form has empty fields the validation failure causes ItemClick not to be fired. Is there any way to work around this/fix this ?
Thanks
Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Sep 2011
4 answers
82 views
Guys,

I previously had my scheduler set up to be the regular way, server side w/ postbacks, and I had a lot of custom functionality built into the AppointmentDataBound function that now doesn't work because I'm running web services binding.

How can I build this functionality with web services binding? It's key to my project working.

Even my Category resource list is managed via the database, so I can't use the static resource coloring feature.

Thoughts?

protected void radAppointments_AppointmentDataBound(object sender, SchedulerEventArgs e) {
        if (e.Appointment.Resources.GetResourceByType("Category") != null) {
            bvAppointmentCategory c = new bvAppointmentCategory(int.Parse(e.Appointment.Resources.GetResourceByType("Category").Key.ToString()));
            e.Appointment.CssClass = c.CssClass;
        }

        if (e.Appointment.ID != null) {
            bvAppointmentDoctor a;

            if (e.Appointment.RecurrenceParentID == null) {
                a = new bvAppointmentDoctor(int.Parse(e.Appointment.ID.ToString()));
            } else {
                a = new bvAppointmentDoctor(int.Parse(e.Appointment.RecurrenceParentID.ToString()));
            }

            String subject = e.Appointment.Subject;
            String client_name = "";
            String pet_name = "";
            String confirmed = "";

            if (a.ClientID != null) {
                bvClient client = new bvClient(a.ClientID.Value);
                client_name = " w/ " + client.PrimaryFirstName + " " + client.PrimaryLastName + " @ " + client.PrimaryPhoneHome;
            }

            if (a.PetID != null) {
                bvPet p = new bvPet(a.PetID.Value);
                pet_name = " (" + p.Name + ")";
            }

            if (e.Appointment.RecurrenceState == 0) {
                if (a.Confirmed) {
                    confirmed = " Confirmed? - [X]";
                } else {
                    confirmed = " Confirmed? - [ ]";
                }
            }

            e.Appointment.Subject = subject + client_name + pet_name + confirmed;
        }

        if (c_security_level < 2) {
            e.Appointment.AllowDelete = false;
        }
    }
Peter
Telerik team
 answered on 17 Sep 2011
3 answers
176 views
Hi all,
I have one problem with RadTimePicker. Here my code:
<telerik:RadTimePicker ID="RadTimePicker1" runat="server" MinDate="2011-09-11 10:00:01">
</telerik:RadTimePicker>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="RadTimePicker1"
    ErrorMessage="AAA!"></asp:RequiredFieldValidator>
<asp:Button runat="server" ID="btnSubmit" OnClick="btnSubmit_Click" Text="Submit" />

If I will click on submit button then I will see "AAA!" - it is ok.
If I will choose 11:00 and then on 9:00 then I will have 11:00 in time picker with warning icon. but if I will click on submit then I will get real submit and null in RadTimePicker1.SelectedDate, of course Page.IsValid will be false, but I will get post back.
I think this behavior is wrong. May be page should be valid and time picker should have 11:00 because user see that he has 11:00 in time picker and warning only means that he can't choose 9:00? 

Can anybody suggest a workaround?
P.S. I don't want change RequiredFieldValidator to CustomValidator.
Marin
Telerik team
 answered on 17 Sep 2011
4 answers
119 views
I know there's a couple of posts on this topic already, but I have questions still.

I have to pass the current user ID that is creating the appointment to the Insert method of the web service so that attribute can be saved to the appointment.

I have this set up here in MySchedulerInfo.cs

    public int UserID { get; set; }

    public MySchedulerInfo(ISchedulerInfo baseInfo, int doctorID, int userID) : base(baseInfo) {
        UserID = userID;
    }

    public MySchedulerInfo() {
    }


And then on the front end, I have this:

    protected void radAppointmentsDoctors_AppointmentInsert(Object sender, AppointmentInsertEventArgs e) {
        e.SchedulerInfo = new MySchedulerInfo(e.SchedulerInfo, c_user_id);
    }

So then in MyDbSchedulerProvider,cs , I have:

public override void Insert(RadScheduler owner, Appointment appointmentToInsert) {
        if (!PersistChanges) {
            return;
        }

        bvAppointmentDoctor a = new bvAppointmentDoctor();

        a.AssignedTo = int.Parse(appointmentToInsert.Resources.GetResourceByType("Doctor").Key.ToString());
        a.UserId = ?????
^^^ here's the problem. How do I get access to the schedulerinfo UserID property from within this method?

// Then Assign other object properties here and save object
Peter
Telerik team
 answered on 17 Sep 2011
1 answer
62 views
Hi

I have one main grid and two detailed grid inside main grid.
Eg : ParentGrid --> ChildGrid -- > GrandChildGrid

When i select a item in Grand child Grid associated Child grid and Parent grid items should get selected.
I need it do it using client side events or functions.

Please Help.


Thanks in Advance.
Saju
Tsvetina
Telerik team
 answered on 17 Sep 2011
1 answer
62 views
Hi,

 In my application i am using Radgrid with skin name Office2007(Width 100% for Main Grid and MatserTableView) .Its displaying properly in Google Chrome and Mozilla but not in IE9 .
Could any one please  suggest solution asap.


Regards
Reddy.
Pavlina
Telerik team
 answered on 17 Sep 2011
1 answer
104 views
Can the drag and drop rows feature used with the RadGrid be made to work with iOS or Android devices?  
Marin
Telerik team
 answered on 17 Sep 2011
2 answers
158 views
Hello..!
Im working with clientside databinding, When I try to hide some RadGrid  columns this works fine, but the paging stop working..! 
I need to show my columns again (this is the only way i could solve my problem) but showing|hiding my columns again (every page change) is heavy and the performance is affected. Here some code:

This is my grid..!! with only one column
<telerik:RadGrid ID="gdvOrdenes" Width="100%" PageSize="20"
                                        AllowPaging="True" runat="server" EnableViewState="false">
 
          <MasterTableView AutoGenerateColumns="false" AllowFilteringByColumn="True" ShowFooter="True"
           <Columns>
           <%--Grupo del permiso--%>
           <telerik:GridBoundColumn DataField="GrupoPermiso" HeaderText="Grupo permiso" ShowFilterIcon="false"
                                                                                 Resizable="False" SortExpression="GrupoPermiso"  
                                                                                 AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith"
                                                                                UniqueName="PermissionGroup"/>
                                                                             
            </Columns>
           </MasterTableView>
          <ClientSettings EnableRowHoverStyle="false">                                                                              
          <Scrolling AllowScroll="false" />
          <ClientEvents OnCommand="Solicitudes_Command"/>
          </ClientSettings>
  </telerik:RadGrid>

This function is executed at the begining

function PreparaVistaRadGrid(lista)
{
try {
      
     var listaColumnasBloqueadas =  lista[0].ListaColumnaBloqueadas.split('|');
     var cantidad = tableView.get_columns().length;
     
     //Muestra todas las columnas, Show all columns
     for(var x = 0 ; x < cantidad ;  x++ )
         tableView.showColumn(x);
     
     //Oculta columnas, Hide some columns
     var columnas = tableView.get_columns();
     for(var x = 0 ; x < columnas.length ;  x++ )
        if($.inArray(columnas[x]._data.UniqueName, listaColumnasBloqueadas) >= 0)
           tableView.hideColumn(x);
 
  }
  catch (ex)
  {
     AtraparError("PoolAgente.aspx", arguments, ex);
  }  
}

//This is the function for the Paging, Filtering and Sorting

function Solicitudes_Command(sender, args)
{
  try
  {
     args.set_cancel(true);
 
     commandName = args.get_commandName();
      

     PageMethods.EjecutaConsulta(tableView.get_currentPageIndex() * tableView.get_pageSize(),  tableView.get_pageSize(), tableView.get_sortExpressions().toString(),
                                   tableView.get_filterExpressions().toDynamicLinq(), _tipoAccionSeleccionada, false, RealizoAccion);
      
  }
  catch (ex)
  {
     $find(_nombreRadAjaxLoadingOperations).hide(_nombreGdvOrdenes);
  }
}

Here is where im obligated to hide and show my columns again

function RealizoAccion(result)
{
 try {
    
    //Oculta ventana de loading
    $find(_nombreRadAjaxLoadingOperations).hide(_nombreGdvOrdenes);
 
    tableView.set_dataSource(result.resultado);
    tableView.dataBind();
     
   //HERE IM OBLIGATED TO HIDE/SHOW IN ORDER TO THE "PAGING" WORKS
    //PreparaVistaRadGrid()
    
    if (commandName == "Filter" || commandName == "Load" || commandName == "Page")
        PageMethods.GetCount(updateVirtualItemCount);
        
  }
  catch (ex) {
      AtraparError('Valida Inicio', arguments, ex);
   }   
}

function updateVirtualItemCount(result)
{
   try {
       
      //Se visualiza el número de documentos encontrados
      if(commandName == "Load")
      {
        tableView.set_currentPageIndex(0,true);
      }
       
      tableView.set_virtualItemCount(result);
     
     }
  catch (ex)
  { AtraparError("PoolAgente.aspx", arguments, ex);
  }
}



Please help me, ..!! :(
Pavlina
Telerik team
 answered on 17 Sep 2011
1 answer
116 views
Hi telerik,

The filter context menu of the RadGrid is not displayed properly near the filter icon in the grid.

This position varies based on the mouse pointer and the page vertical scroll bar position.
Please assist on sorting out this issue.

Thanks.
Tsvetina
Telerik team
 answered on 17 Sep 2011
1 answer
299 views
I am not using any datasource controls, all db access done only in BusinessLayer, and front end is not aware of any built-in .NET data objects either. (no DataTable). The underlying type which grid is bound to is keyvaluepair<string,string>.

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
        {
   if (e.CommandName==RadGrid.PerformInsertCommandName )
            {
 
                // how to get text that user just typed in textbox in the grid ?
                      // so I can pass it to Busnesslayer for validation and handling.
 
            }
}
Shinu
Top achievements
Rank 2
 answered on 17 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?