Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
169 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
113 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
56 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
54 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
103 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
145 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
115 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
288 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
1 answer
88 views
Hi,

I have a start datetime picker and an End datetime picker on my edit form. Please let me know a way to make the End datetime to always pick a datetime period that follows the start datetime

thanks,
Minh Bui
Shinu
Top achievements
Rank 2
 answered on 17 Sep 2011
2 answers
152 views
Hi Telerik team,
I am using a Radlistbox and show a tooltip .The proble is i am not able to get the tooltip at correct position . Here is my RadlistBOx code.
<telerik:RadListBox ID="RadListBox2" runat="server" Width="280px" Height="280px"
         CssClass ="radcss" AutoPostBackOnTransfer="true"  AllowTransferOnDoubleClick="true"
            SelectionMode="Multiple" AutoPostBackOnReorder="true" EnableDragAndDrop="true" AutoPostBack="true"
                 Skin="Office2010Blue"     OnSelectedIndexChanged="row_click"
                 AllowDelete="True"  >
           
            <ButtonSettings ShowTransferAll="false" />
             </telerik:RadListBox>

and here is my tooltip code. Actually i am using user control as tooltip.

<telerik:RadToolTip ID="RadToolTip1" runat="server" BackColor="white"  
            ManualClose="false"   OnClientBeforeShow="OnClientBeforeShow"  Relative To ="Element"
             
              RenderInPageRoot="true" EnableShadow="true" Animation="Slide"   >
                            
                        
             <web:web ID ="tooltip" runat="server" /></telerik:RadToolTip>

and here is my c # code onSelectedIndexChanged="row_click"
public void row_click(object sender, EventArgs e)
    {
 
        tooltip.Refresh(Convert.ToInt32(((Telerik.Web.UI.ControlItem)(((Telerik.Web.UI.RadListBox)(sender)).SelectedItem)).Value));
 
        tooltip.UserName = Convert.ToString(((Telerik.Web.UI.ControlItem)(((Telerik.Web.UI.RadListBox)(sender)).SelectedItem)).Text);
        ((System.Web.UI.Control)(((Telerik.Web.UI.RadListBox)(sender)).SelectedItem)).Focus();
         
        RadToolTip1.TargetControlID = ((System.Web.UI.Control)(((Telerik.Web.UI.RadListBox)(sender)).SelectedItem)).UniqueID;
        RadToolTip1.RelativeTo =Telerik.Web.UI.ToolTipRelativeDisplay.Element;
        RadToolTip1.Position = ToolTipPosition.MiddleRight;
        RadToolTip1.Overlay = true;
 
       
            RadToolTip1.ShowEvent = Telerik.Web.UI.ToolTipShowEvent.OnClick;
            RadToolTip1.Show();
            
         
 
 
    }


And here is my defect: It is coming perfectly for first 12 elements which loads on page refresh. But the moment i scroll down and then select and item in radlistbox . Tooltip  position goes up. I have tried many things. please help me asap.

Screenshot of problem. please use Google chrome to check my problem.

 
ashirvad
Top achievements
Rank 1
 answered on 17 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?