Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
116 views
Hello,

I was wondering teh following:
In search of SEO friendly url's Implemented "Routing" in my ASP.NET webform application. This gives us nice url's like:
 www.portal.com/products/Show/UX-7624
for example.
Now, working on a different application with AJAX and one page that loads usercontrols (modules) I was wondering how to combine the two of them. Is that even possible? Because the first application I mentioned does a URL click for a product view, while the second does it internal and keeps www.portal.com/default.aspx in the address bar...

Any ideas of experiance about this anyone?

Thanks,

Erik

Erik
Top achievements
Rank 2
 answered on 17 Sep 2011
2 answers
96 views
Hi,

I am having one issue with radGrid. I have nested radgrids and while exporting them to word, I get one extra inputbox in document, which is not visible in grid while pressing the export button.

Please check the attached images.

Here is the aspx page code for inner grid:
<telerik:RadGrid ID="radComments" AllowPaging="True" runat="server" PageSize="15" Skin="" GridLines="None" BorderStyle="None" BorderColor="Transparent" ShowHeader="false"                                                      OnItemCommand="radComments_ItemCommand" OnItemDataBound="radComments_ItemDataBound"                                          OnItemCreated="radComments_ItemCreated" Width="100%" EnableTheming="false" Style="padding-left: 16px;"               OnPageIndexChanged="radComments_PageIndexChanged">                                                                             <PagerStyle Mode="NumericPages" />                                                                                              <ExportSettings ExportOnlyData="true">                                                                                  </ExportSettings>
<MasterTableView TableLayout="Fixed" Width="100%" Height="100%" BorderStyle="None"                                          DataKeyNames="BookID,commentid,CommentAttachment,userid,Commenttype">                                                    <ItemTemplate>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td valign="top" align="left" style="text-align: center; width: 5%; border: 1px;border-style: solid; padding-bottom: 5px;" class="box-border">                                                                                                                            <asp:Image ImageAlign="AbsMiddle" ID="imgWriterImage" runat="server" />
</td>
<td width="20%" align="left">
<strong><%# Eval("UserName") + ":" %></strong>
</td>
<td class="altbg" width="45%" align="left"><%# Eval("Commenttext") %></td>
<td width="20%" align="left">
<asp:Label ID="lblType" runat="server" Text='<%# Eval("Commenttype") %>'></asp:Label>
</td>
<td id="tdEditDelete" runat="server" align="center" width="20%">
<asp:HiddenField ID="hdnCommentID" runat="server" Value='<%# Eval("commentid") %>' />
<asp:HiddenField ID="hdnBookID" runat="server" Value='<%# Eval("bookid") %>' />
<asp:ImageButton ID="btnImgEdit" runat="server" ImageUrl="~/Forum/ForumImages2/edit.gif" OnClientClick="Edit(this);return false;" ToolTip="Edit" />
<asp:ImageButton ID="btnImgDelete" runat="server" ImageUrl="~/Forum/ForumImages2/delete.gif"class="DelComment" ToolTip="Delete" /></td></tr></table>
</ItemTemplate>
</MasterTableView>
</telerik:RadGrid>

Why I am getting extra inputbox in word after export?
Daniel
Telerik team
 answered on 17 Sep 2011
1 answer
101 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
55 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
129 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
88 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
48 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
43 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
86 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
124 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?