Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
117 views
I have a datasource with the fields of FirstName and LastName.  I want the griddropdowncolumn to display the concatenated firstname and lastnam fields together, but the ListTextField only wants one column.  Is there a quick solution for this?  Thanks.

 

Kathy
Top achievements
Rank 1
 answered on 03 Oct 2010
4 answers
691 views
I am testing a RadGrid that uses multiple GridTemplateColumns because I need a multi-line header so inside of each GridTemplateColumn I have HeaderTemplate and an ItemTemplate to define cells with a table for display. This works as required. In my test case I have 6 gridtemplatecolumns that make up one RadGrid. Now I want to test how to make one of these six gridtemplatecolumns Not Visible at PreRender. I have tried this in the declarative (as part of the GridTemplateColumn I set this to Visible=False) and the column is not displayed, just as I want. However, I cannot figure out how to accomplish the same in code behind.

Let's say I have:
    GridTemplateColumn UniqueName="GTC1"
         HeaderTemplate
         ItemTemplate
    GridTemplateColumn UniqueName="GTC2"
         HeaderTemplate
         ItemTemplate
    GridTemplateColumn UniqueName="GTC3"
         HeaderTemplate
         ItemTemplate

Now I want to make "GTC2" Not Visible in code behind. How do I perform a findcontrol on "GTC2" in PreRender event? If I can find "GTC2" then I can set Visible=False. I think I want to perform this findcontrol in PreRender or do I need to access the GridTemplateColumn in a different event to make this work?

I tried this in PreRender:

 

Dim gtc As GridTemplateColumn = TryCast(RadGrid1.FindControl("GTC2"), GridTemplateColumn)

 

gtc.Visible =

 

False

 

 


This gives the message "Type System.Web.Ui.Control cannot be converted to Telerik.Web.Ui.GridTemplateColumn." Maybe I cannot access the GridTemplateColumn in code behind? If not, how might I access the tables that are defined inside of the HeaderTemplate and ItemTemplate?

Thanks in advance for any help you can provide...Dan

DanR
Top achievements
Rank 1
 answered on 03 Oct 2010
2 answers
117 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
71 views
forget it fixed it :) I was being dumb
Stephen Naughton
Top achievements
Rank 1
 asked on 02 Oct 2010
3 answers
214 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
112 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
125 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
85 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
145 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
233 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?