Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views
Hi,

I have a radgrid with a column called "description". the description datafield holds a large string, so i cut the string in the grid inside the "itemdatabound" event. In this section of the code, i add a tooltip to that particular cell holding the complete description text.

my problem is that when a user exports the grid to a word document, the cell holds the -cut- text, and not the complete description field. is there a way to send t he complete field to the word document?

thx in advance.
Willem
Shinu
Top achievements
Rank 2
 answered on 21 Feb 2011
4 answers
44 views
I have an example almost identical to the demo of the Hierarchy with templates (link).  Everything works fine until I enable my Ajax settings on the page.  What the problem is that I expand the grid to show the tabs.  The fist tab loads fine, but then I select the second tab it reloads my page to the root my site.

Example: If I move my mouse over the url of the tab it reads "http://www.mysite/#", but the tab resides on a page like "http://www.mysite.com/pages/somepage.aspx.

* This only happens when Ajax is enabled.

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="true" AllowAutomaticDeletes="True"
    AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AutoGenerateDeleteColumn="True"
    AutoGenerateEditColumn="True" DataSourceID="SqlDataSource1" GridLines="None" AllowSorting="true" ShowGroupPanel="true">
    <ClientSettings AllowDragToGroup="True" />
    <MasterTableView DataKeyNames="id" DataSourceID="SqlDataSource1" EditMode="InPlace">
        <ExpandCollapseColumn Visible="True">
        </ExpandCollapseColumn>
        <NestedViewSettings DataSourceID="SqlDataSource2">
            <ParentTableRelation>
                <telerik:GridRelationFields DetailKeyField="id" MasterKeyField="id" />
            </ParentTableRelation>
        </NestedViewSettings>
        <NestedViewTemplate>
                <div class="contactWrap">
                <asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap">
                    <telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1"  SelectedIndex="0" DataNavigateUrlField="URL">
                        <Tabs>
                            <telerik:RadTab runat="server" Text="Tab1" PageViewID="PageView1">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Tab2" PageViewID="PageView2">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Tab3" PageViewID="PageView3">
                            </telerik:RadTab>
                        </Tabs>
                    </telerik:RadTabStrip>
                    <telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="true">
                        <telerik:RadPageView runat="server" ID="PageView1">
                              Tab 1
                        </telerik:RadPageView>
                        <telerik:RadPageView runat="server" ID="PageView2">
                          Tab 2
                        </telerik:RadPageView>
                        <telerik:RadPageView runat="server" ID="PageView3">
                              tab 3
                        </telerik:RadPageView>
                    </telerik:RadMultiPage>
                </asp:Panel>
  
            </div>
        </NestedViewTemplate>
    </MasterTableView>
     <GroupingSettings ShowUnGroupButton="true" />
</telerik:RadGrid>
Maria Ilieva
Telerik team
 answered on 21 Feb 2011
1 answer
181 views
When I try to filter datetiem less than 2/17/2011, it retures all the null value.  I like to only return any dates less than 2/17/2011, but not include null value.

But when I tired to fill null, all the null column does not return.

Can anyone help me to solve this problem?

Thanks!
Princy
Top achievements
Rank 2
 answered on 21 Feb 2011
3 answers
85 views
hi there i want to find the id of RadGrid from an JS file, how to do this?

previously this code was working fine from aspx
var grid = window["<%= gv1.ClientID %>"];
var rowobj = grid.MasterTableView.Rows[cnt];
var obj = grid.MasterTableView.GetCellByColumnUniqueName(rowobj, "Values");
but the same not working from js file, please tell me how to resolve this problem?
Princy
Top achievements
Rank 2
 answered on 21 Feb 2011
1 answer
112 views
hi

i want to check a condition where i have to find whether a particular cell containing the data has been changed or not
for example

i have done this in infragistics but i got no idea to do it in telerik and this is the line

if

 

(UltraWebGrid1.Rows[i].Cells[7].DataChanged == true

 

{
...................
...................
}

Prangadj
Top achievements
Rank 1
 answered on 21 Feb 2011
1 answer
73 views
Hi all,

We are implementing a RadGrid with a templated edit form.  We've placed a custom user control within the edit form template, like this:

<EditFormSettings EditFormType="Template" >
<FormStyle 
CssClass="GridForm"></FormStyle>
<FormTemplate>
<uc:UserRights 
ID="urEditForm" 
    UserID='<%# (Container is GridEditFormInsertItem) ? 0 : 
DataBinder.Eval(Container.DataItem,"ID") %>'  
    runat="server"/>
</FormTemplate>
</EditFormSettings>

As you can see, we've set it up so that the user control's UserID property is set to 0 when inserting, or to the actual value if editing.

Here's what we want to happen:

  • User control's ID is initially set to 0 when first opening the insert form.
  • When the insert action is performed, get the DataKey value from the inserted row (int Identity).
  • Re-set the control's UserID property to that DataKey value
  • Call the Update public method on the control.

My question is: what event can I hook that will provide me both access to the identity column value of the newly inserted item AND still let me trigger the public method on my user control so that it can update what it needs to update?

(There is much more to the form than simply the user control.  We are using mostly databound controls on the form template.  This user control is somewhat more complex and needs to be reusable, which is why we chose to compartmentalize it into its own control.)

Thanks!

Veli
Telerik team
 answered on 21 Feb 2011
3 answers
88 views

 have the following code to export and I get this error:
Code:

 

 

 

 

 

 

 

protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e)

 

 

{

 

 

 

    if (e.CommandName == "Export")

 

 

    {

 

        WriteCalendar(

 

RadScheduler.ExportToICalendar(e.Container.Appointment));

 

 

     }

 

}

 

 

private

 

 

void WriteCalendar(string data)

 

 

{

 

 

 

HttpResponse response = Page.Response;

 

 

 

 

 

 

response.End();

 

 

 

response.Clear();

 

response.Buffer =

 

true;

 

 

response.ContentType =

 

"text/calendar";

 

 

response.ContentEncoding =

 

Encoding.UTF8;

 

 

response.Charset =

 

"utf-8";

 

 

response.AddHeader(

 

"Content-Disposition", "attachment;filename=\"RadSchedulerExport.ics\"");

 

 

response.Write(data);

 

response.End();

 

}


htm in the code:

 

function Export(sender, e)

 

 

{

 

$find(

 

"<%# RadAjaxManager1.ClientID %>").__doPostBack(sender.name, "");

 

 

}

<

 

telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Hay" StartInsertingInAdvancedForm="True"

 

 

OnAppointmentDelete="RadScheduler1_AppointmentDelete" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"

 

 

OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnNavigationComplete="RadScheduler1_NavigationComplete"

 

 

Height="550px" Width="800px" CustomAttributeNames="Engagement,CodigoEmpleado"

 

 

OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" ShowFooter="False"

 

 

DayStartTime="07:00:00" WorkDayEndTime="18:00:00" WorkDayStartTime="07:00:00"

 

 

OnAppointmentCreated="RadScheduler1_AppointmentCreated" OnFormCreating="RadScheduler1_FormCreating"

 

 

OnFormCreated="RadScheduler1_FormCreated" EnableDescriptionField="True" BorderStyle="Solid"

 

 

EnableCustomAttributeEditing="True" OnAppointmentCommand="RadScheduler1_AppointmentCommand">

 

 

<TimelineView UserSelectable="False" />

 

 

<AppointmentTemplate>

 

 

<span style="font-weight: bold; font-size: small">

 

 

<div>

 

<%

# Eval("Subject") %>

 

 

 

 

<asp:Button runat="server" ID="Button1" CssClass="rsExportButton" ToolTip="Exportar reserva"

 

 

CommandName="Export" OnClientClick="Export(this, event); return false;" Style="cursor: pointer;

 

 

cursor: hand;"

 

 

/>

 

 

</div>

 

 

</span>

 

<%

# Eval("Resources[0].text") %>

 

 

 

 

<div>

 

<%

# Eval("Resources[1].text")%>

 

 

 

 

</div>

 

 

</AppointmentTemplate>

 

 

<TimeSlotContextMenuSettings EnableDefault="True" />

 

 

<AppointmentContextMenuSettings EnableDefault="True" />

 

 

<AdvancedForm Modal="True" EnableCustomAttributeEditing="True" />

 

 

<WeekView DayStartTime="07:00:00" WorkDayEndTime="18:00:00" WorkDayStartTime="07:00:00" />

 

 

<Localization AdvancedAllDayEvent="Todo el d&#237;a" AllDay="Todo el d&#237;a" AdvancedEditAppointment="Modificar Reserva"

 

 

AdvancedNewAppointment="Nueva Reserva" Cancel="Cancelar" ConfirmDeleteText="Esta seguro de querer eliminar la reserva?"

 

 

Save="Guardar" />

 

 

<DayView DayStartTime="07:00:00" WorkDayEndTime="18:00:00" WorkDayStartTime="07:00:00" />

 

 

</telerik:RadScheduler>

 

the error that throws me is:
Sys.webforms.PageRequestManagerParseErrorException: the message received the server could not be parsed. Common couses for this error are when the response is modified by call to Response.Write(), response filters HttpModules or server trace is enabled.
Details: error pasing near 'BEGIN:VCALENDAR VER'

that may be, thanks for your help

Veronica
Telerik team
 answered on 21 Feb 2011
1 answer
273 views
Hello guys

I'm trying to create or activate or clone a raddatepicker dynamically using javascript and webservices
Now I tried 2 scenarios
-Render the control using webservices like this, the control appears ok, but nothing work on it (no validation, dropdown button...) and the rendered string is pretty massive, is there a function that I could use to bind/initialize the control to static scripts?

<WebMethod()> _
    Public Function HelloWorld(ByVal s As String) As String
         Dim np As Page = New Page
        np.Controls.Add(New Telerik.Web.UI.RadScriptManager)
        Dim d As Telerik.Web.UI.RadDatePicker = New Telerik.Web.UI.RadDatePicker
        d.ID = "ddd"
        d.EnableViewState = False
        d.DbSelectedDate = Now
        d.RegisterWithScriptManager = False
        d.Page = np
 
        Dim tw As System.IO.StringWriter = New System.IO.StringWriter()
        Dim hw As HtmlTextWriter = New HtmlTextWriter(tw)
        d.RenderControl(hw)
        Return tw.ToString()
    End Function


<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication2.WebForm1" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.min.js"></script>
<!--http://code.jquery.com/jquery-1.5.js-->
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
     <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <script language="javascript" type="text/javascript">
        function BC(s, e) {
            $.ajax({ url: "/Webservice1.asmx/HelloWorld?s=" + s.get_id(), success: function (result) {
                 //var nd = $("#RadDatePicker1")[0].cloneNode();
                //nd.id = "asd";
                $("#c")[0].innerHTML = result.text;
                //$("#c")[0].insertBefore($("#RadDatePicker1")[0]);
                //nd.style.visibility = "visible";
            }
            });
        }
                </script>
 
        <div id="c"></div>
    <div>
<!--        <telerik:RadDatePicker ID="RadDatePicker1" Runat="server"></telerik:RadDatePicker>-->
         
<telerik:RadButton ID="RadButton1" runat="server" onclientclicked="BC"
            AutoPostBack="False">
</telerik:RadButton>
    </div>
    </form>
</body>
</html>


-Then I tryed the cloneNode function, but I can't even make the raddatepicker appear
var nd = $("#RadDatePicker1")[0].cloneNode(true);
                
nd.id = "asd";
               $("#c")[0].insertBefore(nd);
                //$("#c")[0].innerHTML = result.text;
Idealy, I guess I want to statically generate all the necessary scripts and one instance of each control that I need 
and then clone them dynamically with javascript as needed.

Is there a way to this? Is there a javascript telerik.ui.raddatepicker constructor?
You guys must have a way since there is a client side radgrid insert row

Thank you very much

Louis
Veli
Telerik team
 answered on 21 Feb 2011
1 answer
148 views
I am wanting to validate based on a complex set of rules the entry into a textbox.  My preference would be to keep that validation on the server side in the code behind as the logic is written there already so I do not want to maintain it in javascript too for client side validation.  How can I call a validation method either on text change or focus via ajax with this control?
Shinu
Top achievements
Rank 2
 answered on 21 Feb 2011
1 answer
88 views
i am facing lot of problem,i am returning number of days by combobox and i have to add into existing days,i did almost all conversion its return object type not supported by javascript,and in alert box while debugging its reurning objec,object.


please help me out as i need this thing very soon
Veli
Telerik team
 answered on 21 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?