Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
92 views
Hi,

I use this code :
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        ProviderName="System.Data.SqlClient" SelectCommandType="StoredProcedure"  SelectCommand="Net_DepechesTest"  />
  
<telerik:RadListView ID="Liste" DataSourceID="SqlDataSource1"  runat="server"  ClientIDMode="Static"
                onitemdatabound="Liste_ItemDataBound" AllowPaging="True" ItemPlaceholderID="ArticlesHolder"  DataKeyNames="IDDepeche" PageSize="15">
                <LayoutTemplate>
                    <telerik:RadDataPager ClientIDMode="Static" ID="PagerUp" SEOPagingQueryPageKey="pager"  AllowSEOPaging="true" runat="server" PagedControlID="Liste" PageSize="15" Visible='<%# Container.PageCount != 1%>'>
                        <Fields>                                
                            <telerik:RadDataPagerButtonField FieldType="NextLast" />
                            <telerik:RadDataPagerButtonField FieldType="Numeric" />
                            <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                            <telerik:RadDataPagerTemplatePageField><PagerTemplate>Page(s) : </PagerTemplate></telerik:RadDataPagerTemplatePageField>
                        </Fields>
                     </telerik:RadDataPager>
                     <div id="ListDepeches">
                        <asp:Panel ID="ArticlesHolder" ClientIDMode="Static" runat="server" />
                     </div>
                     <telerik:RadDataPager ClientIDMode="Static" ID="PagerDown" SEOPagingQueryPageKey="pager" AllowSEOPaging="true" runat="server" PagedControlID="Liste" PageSize="15" Visible='<%# Container.PageCount != 1%>'>
                        <Fields>                                
                            <telerik:RadDataPagerButtonField FieldType="NextLast" />
                            <telerik:RadDataPagerButtonField FieldType="Numeric" />
                            <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                            <telerik:RadDataPagerTemplatePageField><PagerTemplate>Page(s) : </PagerTemplate></telerik:RadDataPagerTemplatePageField>
                        </Fields>
                     </telerik:RadDataPager>
                </LayoutTemplate>
                <ItemTemplate>
                        <asp:Literal ID="LesArticles" runat="server"></asp:Literal>
                </ItemTemplate>
                <EmptyDataTemplate>Aucune actualité disponible</EmptyDataTemplate>
            </telerik:RadListView>

When i call this page, i have 28 records and so 2 pages of results.
If i click on the second page (paging number or next button), my url change to "mypage.aspx?pager=2" and all is allright !!.

Now i decide to modify directly my url to "mypage.aspx?pager=3" (3 is for example, but is the same with a number superior to the Max Pages showing "2"). And that is my problem !!, the page call a StackOverFlow Error on my WeDevServer and in Production on a IIS 7.5 !. My Application Pool Stop and never restart !

Can someone help me, if you understand my english :o)
Mikolaj
Top achievements
Rank 1
 answered on 02 Oct 2010
0 answers
49 views
forget it fixed it :) I was being dumb
Stephen Naughton
Top achievements
Rank 1
 asked on 02 Oct 2010
3 answers
139 views
I have a couple of problems that I cannot figure out.

1. When editing an appointment, the advance form is displayed. If I make changes to the form and click 'Save', I handle the updates to SQL with the following. This updates my database, but the window does not close. How do I get the modal window to close?

 

Private Sub UpdateButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles UpdateButton.Click

 

 

Dim AppointmentBE as New AppointmentBE

 

 

Dim ProspectToolDAL As New ProspectToolDAL

 

 

Dim startDateString as String

 

 

Dim startTimeString as String

 

 

Dim endDateString as String

 

 

Dim endTimeString as String

 

AppointmentBE.Subject = SubjectText.Text

AppointmentBE.AppointmentKey = Appointment.ID

startDateString =

"#" & Format(StartDate.SelectedDate, "MM/dd/yyyy")

 

startTimeString = StartTime.SelectedDate.Value.ToShortTimeString &

"#"

 

AppointmentBE.StartTime =

CDate(startDateString & " " & startTimeString)

 

endDateString =

"#" & Format(EndDate.SelectedDate, "MM/dd/yyyy")

 

endTimeString = EndTime.SelectedDate.Value.ToShortTimeString &

"#"

 

AppointmentBE.EndTime =

CDate(endDateString & " " & endTimeString)

 

 

 

Dim appointmentKey as Int32 = ProspectToolDAL.SaveAppointment(AppointmentBE, "U")

 

 

End Sub

2. The second problem is once the window is closed (by clicking 'Cancel'), the appointment does not show it's new values. How can I get the scheduler to 'refresh' once the modal window is closed?

Thanks,
Susan

 

Susan
Top achievements
Rank 1
 answered on 02 Oct 2010
2 answers
88 views
Hi,

I am using radgrid for showing database data, and in footer section, i am showing average of  one column data.
Now beside that i need to show that average to the some where inside pager template region.

But i dont know how can i show that thing inside pager region.

naimish
Top achievements
Rank 1
 answered on 02 Oct 2010
1 answer
107 views

We would like to pass custom data back from a RadScheduler WebService call. We have managed to do this with SchedulerResult in the GetAppointments call. However, we would also like to do this with the InsertAppointment call, but we are getting an error.

public

 

SchedulerResult InsertAppointment(SchoolCalendarInfo schedulerInfo, AppointmentData appointmentData)

 

{

 

 SchedulerResult result = null;

 

 

 result = new SchedulerResult();

 

 result.Appointments = Controller.InsertAppointment<

AppointmentData>(schedulerInfo, appointmentData);

 

 result.Code = 2;

}

 

 

return result;

 

}

The error is "Unknown web method InsertAppointment".

Can this be done? If it can, what is wrong with our setup?

 

Peter
Telerik team
 answered on 02 Oct 2010
2 answers
56 views
Anyome managed to get spliter to work with non IE browsers?

As simple splitter as below will display fine in IE i.e 600px high and panelbar aligned to top of pane..
But in both safari and chrome the splitter is FULL screen height,and the panel bar is center aligned?
What to do?.

PS: all the lastest versions including telerick.

Also to prove it is a telerik bug..
1. Open in Safari,
2. do a save as ( this saves all content and all files required for page locally)
3. Open static page in safari or Chrome, display bug..
4. Open static files in IE works fine..

Do the same with IE, produces same result..
In fact there appears to eb no difference between IE and Safarie, i.e telerick does not produce any different code, dependign on brower type.. Given the issues with alignment/css processing this seems to be a fundermantal logic flaw..

 

 

-- code

<telerik:RadSplitter id="RadSplitter1" runat="server" BorderWidth="0" height="600px" Width="100%" LiveResize="True">

 

 

 

 

 

<telerik:RadPane id="left" runat="server" BorderWidth="0" minwidth="30" maxwidth="200" width="100">

 

 

 

 

 

<telerik:RadPanelBar runat="server" ID="RadPanelBar1" Width="100px" >

 

 

 

 

 

<CollapseAnimation Type="None"></CollapseAnimation>

 

 

 

 

 

<Items>

 

 

 

 

 

</Items>

 

 

 

 

 

</telerik:RadPanelBar>

 

 

 

 

 

</telerik:RadPane>

 

 

 

 

 

<telerik:RadPane id="main" runat="server" BorderWidth="0" minwidth="600" maxwidth="1500" width="1000">

 

 

 

 

 

</telerik:RadPane>

 

 

 

 

 

</telerik:RadSplitter>

 

 

 

Ray
Top achievements
Rank 1
 answered on 01 Oct 2010
1 answer
68 views
 I have implemented custom paging in radgrid following the steps described in http://www.telerik.com/help/aspnet-ajax/grdcustompaging.html (using NeedDataSource).

 It works, but when the user clicks to change the grid page, the NeedDataSource Event is called twice (one for the actual page and one for the new page). Is it a bug? How can i avoid this?

Fred.
Fred
Top achievements
Rank 1
 answered on 01 Oct 2010
7 answers
192 views
The declaritive way is great but I have a scenerio for example that I have a list of organizations.. and adding and deleting all work great..

But when I update or create a new item I also need to programmtically get the UserID and insert that as well... so because of that it seems its breaks the whoel declaritive way of doing things right?

So I am searching for some EF/RadGrid/code behind data access sample. anyone ?

Daniel
Telerik team
 answered on 01 Oct 2010
5 answers
212 views
I have created a dynamic  dashboard for my application using code from the following two examples:


I have modified the My Portal example to fit our data structure, but the way that user-controls are dynamically added into RadDocks to create "widgets" is the same as the My Portal example.  My problem is that about half of my user-controls are using the Grid context menu technique mentioned above.  When one of these user-control/dock objects gets added to the page I get the following JS error which is puzzling to me.  

Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500 
Line: 6 
Char: 62099 
Code: 0 
URI: http://localhost:53177/Website/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ScriptManagerMain_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ad0c4ca6e-6b5d-49b6-922d-5244924fb100%3aea597d4b%3ab25378d2 

My guess to as what is happening is that the RowContextMenu function has not been loaded at the time the Grid is looking for it.  I am not using a RadAjaxManager on this page, only an asp:updatepanel with the button that adds the dock set as an AsyncPostBackTrigger.

How can I get this two great code samples to cooperate with each other? Please let me know if more information is needed.  

Thanks, Andy

Edit:  I should also add that this also occurs on a separate page where a user-control that is being loaded dynamically and contains a  RadGrid and is using the RowContextMenu code.

There error I get here is more helpful in deciphering the issue but I do not know how to go about fixing it still:

Message: 'PersonToDoRowContextMenu' is undefined 
Line: 204658269 
Char: 5 
Code: 0 
URI: http://localhost:53177/Website/Contacts/Contacts.aspx 
 

This seems to back up my guessing that the JS is not added when the grid looks for it.
Rumen
Telerik team
 answered on 01 Oct 2010
1 answer
775 views
Hi,

  I am trying last 3 days for one solution. But i could not fix it still. Problem is this one.

I am using telerik rad script manager in my asp.net web page. I have two update panel. one update panel is for whole page and
another update panel for one particular control. I put two drop down list in the second update panel. I gave AutoPostback = "True".
In update panel i gave UpdateMode = "Conditional". What my requirement is when i click selectedindexchanged in the first drop down the data will bind in the second drop down. I am using the Trigger event in the update panel for this event. My problem is the i select the value in the drop down, the selectedIndexChanged is fired and data bind in the second dropdown. This is happening in the first time only. When i click again in another value (second,third), nothing happened in the second drop down list that is the selectedIndexchanged is not fired. I gave ChildrenAsTriggers = "false" in the update panel, guided from one forum. But it doesnt work. This is my aspx designer page,.

 

<form id="MAPPNHSTDAfrm" runat="server">

 

<telerik:RadScriptManager ID="RdScptMgrMAppNHSTDAfrm" EnablePartialRendering="true"

 

 

AsyncPostBackTimeout = "36000" runat="server">

 

 

</telerik:RadScriptManager>

 

 

<telerik:RadStyleSheetManager ID="RdStyMgrMAppNHSTDAfrm" EnableStyleSheetCombine="true"

 

 

runat="server">

 

 

</telerik:RadStyleSheetManager>

 

 

<asp:UpdatePanel ID="unGeneralInformation" runat="server" UpdateMode="Conditional">

 

 

<ContentTemplate>

 

 

<div class="contentcontainer">

 

 

<fieldset style="width:98%;height:93%">

 

 

<div style="overflow: auto; height: 100%; width: 99%" id="Div1" runat="server">

 

 

<div style="height: 100%; width: 98%" id="ManifestDiv" runat="server">

 

 

<table border="0" cellpadding="3" cellspacing="2" width="100%">

 

 

<tr>

 

 

<td colspan="7">

 

 

<fieldset>

 

 

<legend>General Information</legend>

 

 

<table border="0" cellpadding="3" cellspacing="2" width="100%">

 

 

<tr>

 

 

<td class="datafield width0" width="4%">

 

 

</td>

 

 

<td class="datatext width1" width="20%">

 

 

MISIS ID.

 

 

</td>

 

 

<td class="datafield" width="26%">

 

 

<asp:TextBox ID="uxMISISNo2" runat="server" Enabled="false" />

 

 

</td>

 

 

<td id="Td3" runat="server" width="26%">

 

 

&nbsp;

 

 

</td>

 

 

<td id="Td4" class="datafield" width="24%">

 

 

&nbsp;

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td class="datafield width0">

 

 

&nbsp;

 

 

</td>

 

 

<td class="datatext width1">

 

 

Birth Date

 

 

<br />

 

 

(DD-MMM-YYYY)

 

 

</td>

 

 

<td class="datafield">

 

 

<telerik:RadDatePicker ID="uxDateofBirth2" runat="server" DateInput-DateFormat="dd-MMM-yyyy"

 

 

Enabled="false" Skin="Default2006">

 

 

<DateInput ID="DateInput6" runat="server" LabelCssClass="radLabelCss_Default2006"

 

 

Skin="Default2006">

 

 

</DateInput>

 

 

<Calendar ID="Calendar5" runat="server" Skin="Default2006" UseColumnHeadersAsSelectors="False"

 

 

UseRowHeadersAsSelectors="False" ViewSelectorText="x">

 

 

</Calendar>

 

 

<DatePopupButton CssClass="radPopupImage_Default2006" />

 

 

</telerik:RadDatePicker>

 

 

</td>

 

 

<td id="Td5" runat="server" style="width: 100%;">

 

 

Cohort :

 

 

<asp:DropDownList ID="uxCohort" runat="server">

 

 

<asp:ListItem Value="1">--Select--</asp:ListItem>

 

 

<asp:ListItem Value="2">Green</asp:ListItem>

 

 

<asp:ListItem Value="3">Yellow</asp:ListItem>

 

 

</asp:DropDownList>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td class="datafield width0">

 

 

</td>

 

 

<td class="datatext width1">

 

 

Trust and Allocation Code

 

 

</td>

 

 

<asp:UpdatePanel ID="unTACDetails" runat="server" UpdateMode="Conditional" >

 

 

<ContentTemplate>

 

 

<td id="Td7" runat="server">

 

 

Branch :

 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

 

<asp:DropDownList ID="TrustAllocationBranch" runat="server"

 

 

AutoPostBack="true" OnSelectedIndexChanged="TrustAllocationBranch_SelectedIndexChanged">

 

 

</asp:DropDownList>

 

 

</td>

 

 

<td id="Td8" runat="server">

 

 

Trust :

 

&nbsp;&nbsp;

 

<asp:DropDownList ID="TrustAllocationTrust" runat="server" Width="85%">

 

 

</asp:DropDownList>

 

 

</td>

 

 

</ContentTemplate>

 

 

<Triggers>

 

 

<asp:AsyncPostBackTrigger ControlID="TrustAllocationBranch" EventName="SelectedIndexChanged" />

 

 

</Triggers>

 

 

</asp:UpdatePanel>

 

 

</tr>

 

 

</table>
</div>

 

 

</div>

 

 

</fieldset>

 

 

</div>

 

 

</ContentTemplate>

 

 

</asp:UpdatePanel>

 

 

</form>
========================================================
This is i put it in the above aspx page inside:
--------------------------------------------------------
<asp:UpdatePanel ID="unTACDetails" runat="server" UpdateMode="Conditional" >

 

 

<ContentTemplate>

 

 

<td id="Td7" runat="server">

 

 

Branch :

 

 

 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

 

<asp:DropDownList ID="TrustAllocationBranch" runat="server"

 

 

AutoPostBack="true" OnSelectedIndexChanged="TrustAllocationBranch_SelectedIndexChanged">

 

 

</asp:DropDownList>

 

 

</td>

 

 

<td id="Td8" runat="server">

 

 

Trust :

 

 

 

&nbsp;&nbsp;

 

<asp:DropDownList ID="TrustAllocationTrust" runat="server" Width="85%">

 

 

</asp:DropDownList>

 

 

</td>

 

 

</ContentTemplate>

 

 

<Triggers>

 

 

<asp:AsyncPostBackTrigger ControlID="TrustAllocationBranch" EventName="SelectedIndexChanged" />

 

 

</Triggers>

 

 

</asp:UpdatePanel>

=====================================================================================

This is my server side code
======================
protected void TrustAllocationBranch_SelectedIndexChanged(object sender, EventArgs e)

 

 

{

TrustAllocationTrust.ClearSelection();

TrustAllocationTrust.Items.Clear();

 

 

if (TrustAllocationBranch.SelectedIndex == 1)

 

 {

FillForBranchAdult();

}

 

if (TrustAllocationBranch.SelectedIndex == 2)

 

 {

FillForBranchChild();

}

 

if (TrustAllocationBranch.SelectedIndex == 3)

 

 {

FillForBranchMentalHealth();

}

 

 

}

What is the problem? I solved this problem without update panel. But without updatepanel, the page is refreshed and my tab is disappeared. So i choose this way. Give me a solution.
Thanks
Ashok

 

 

Iana Tsolova
Telerik team
 answered on 01 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?