Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
138 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
74 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
70 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
109 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
169 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
126 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
318 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
105 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
164 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
1 answer
127 views
Hello,

Hope someone can help me out, i'm struggling with some thing that i want to do.

I have 


public class AttributeValue
{
        public string Name {get;set;}
        public string Value {get;set;}
}
  
public class Entry
{
        public string EntryName {get;set;}
        public List<AttributeValue> Attributes {get;set;}
}

All i want to do is binding a List<Entry> to a RadGrid and then show the Attributes as a columns. i'm thinking about having the Attributes radgrid inside the Entry radgrid.

<telerik:RadGrid ID="rgEntry" runat="server">
    <MasterTableView>
        <Columns>
            <telerik:GridTemplateColumn>
                <ItemTemplate>
                    <telerik:RadGrid ShowHeader="false" ShowFooter="false" runat="server" ID="rgAttributes">
                    </telerik:RadGrid>
                </ItemTemplate>
                <HeaderTemplate>
                     
                </HeaderTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Do you think i'm in the right way ? Or should i used Hierarchical Rad Grid or NestedViewTemplate ?

Thanks in advance





Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?