Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
98 views
OK, Here's is my situation.

I have an application that is used to manage training events in different cities around the country.
I have a page that has a radPanel on the left side of the page and a RadScheduler on the right.
The RadPanel contains 8 checkboxes, each representing a city. When the user selects a checkbox, a postback is performed and if there are appointments scheduled for the selected city, they are displayed in the RadScheduler.  

Each city has a number of instructors assigned to it. The instructors are setup as resources in a custom provider that Ive written. In order to pass the Selected_Training_City_ID as a parameter to the custom provider, Ive setup the custom provider to be instantiated on each page load. I filter the instructor resources based on the Selected_Training_City_ID so that only instructors from the selected city are shown on the Advanced Edit Form.

This all works great....Now here's the problem. Each time a new city is selected, the page does a postback and reloads the Instructor resources based on which city checkbox is selected. Then, when a change is made to an appointment, but that isnt the currently selected city, the resource is not available and the update fails.

For example, let say I do the following:

1. select New york from the city checkboxs
2. the page posts back and loads the instructors (Joe and Jim) for NY as Instructor resources into the provider.
3. I double click the scheduler and create an appointment, I select Joe and Jim as the instructors, fill out the other details and save it.
4. back on the main page, I now check the Chicago checkbox and un-check NY.
5. the page posts back and loads the instructors (Mary and Jane) for Chicago as resources into the provider.
6. Now I click and hold my NY appointment and move it, the Instructor resources (Joe and Jim from NY) aren't available since Chicago is currently checked and my update fails.

Is there a recommended approach for handling a use case like this?
Any help would be greatly appreciated.
Thanks in advance.
Alex

Peter
Telerik team
 answered on 07 Apr 2011
7 answers
137 views
Is there any way for designer to auto-generate the FormTemplate so that it can be modified according to my needs?

For example I'm binding ObjectType that has many many fields (using ObjectDataSource) I can generate columns in designer so I can nontrol them manually - but I would like designer to also generate the FormTemplate for edit/insert operations (It may be the layout like it's done automatically when I have EditFormType="AutoGenerated" property set)
That would be especially useful for grids with many columns.

Thanks
Greetings
Michal Szilder, Krakow, Poland
Tsvetoslav
Telerik team
 answered on 07 Apr 2011
1 answer
100 views
How can I format the data in the data table?  I would like to format the number in a certain format and alos right justify the values.
Giuseppe
Telerik team
 answered on 07 Apr 2011
4 answers
218 views
Hello,

I have a tabstrip with the multipage's scrollbar property set to 'auto'. When the content inside the pageview grows too large, the scrollbar appears and works excellently.

However, anytime there is an ajax postback on the page, the pageview's scrollbar gets reset to the top. I was just wondering if there is a relatively simple way to force the pageview to remember its scroll position after a postback.

Using Q2 2010 and IE7

Thank you,
Josh
Yana
Telerik team
 answered on 07 Apr 2011
1 answer
96 views
Hi,

There appears to be a bug in the Image editor in Firefox 4. When you attempt to rotate an image 90 the saved thumbnail is distorted. The function works in IE9. I tested on the demo site.

Jeff
Marin Bratanov
Telerik team
 answered on 07 Apr 2011
1 answer
197 views
Hello

I wonder if there's any way to edit the content of a RadListView into a PopUp?  (like RadGrid does)
Can you provide an example to achieve it?

I have some grids and a RadListView, and I want to provide an homogeneous way to input data.
My RadListView have a lot of items that are not shown on the ItemTemplate or SelectedItemTemplate, but must show on EditItemTemplate so will be confortable if can be on a PopUp...

Thank You
Carlos Asensio Martinez
Princy
Top achievements
Rank 2
 answered on 07 Apr 2011
2 answers
137 views
I am trying to complete a task that I have found half the answer for. I would like the context menu in the grid to only work on files, not folders. I found the solution for hiding the context menu. However, I'm not sure how to check each row for whether it is a file or folder. I am digging through the javascript now, but this is time sensitive so I thought I would post right away.
Dobromir
Telerik team
 answered on 07 Apr 2011
4 answers
759 views
Hi
I am using the Radlistview like a list of checkboxes and I can select multiple items out of it.

How can I get the selected values on a Button click event?

Here is my aspx code:

 <telerik:RadListView ID="rlv_Aircraft" runat="server"   
                                AllowMultiItemSelection="True" ClientDataKeyNames="name"   
                                DataSourceID="SqlDataSource_Aircraft" Skin="Black" 
                                DataKeyNames="name" > 
                                <LayoutTemplate> 
                                    <div class="RadListView RadListView_Black">  
                                        <table cellspacing="0" style="width:40px;">  
                                            <tbody> 
                                                <tr ID="itemPlaceholder" runat="server">  
                                                </tr> 
                                            </tbody> 
                                        </table> 
                                    </div> 
                                </LayoutTemplate> 
                                <ItemTemplate> 
                                    <tr class="rlvI">  
                                        <td width="20px">  
                                            <asp:Button ID="SelectButton" runat="server" CommandName="Select"   
                                                CssClass="rlvBSel" Text=" " /> 
                                        </td> 
                                        <td width="60px">  
                                            <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' /> 
                                        </td> 
                                        <td>&nbsp;  
                                        </td> 
                                    </tr> 
                                </ItemTemplate> 
                                <AlternatingItemTemplate> 
                                    <tr class="rlvA">  
                                        <td width="20px">  
                                            <asp:Button ID="SelectButton" runat="server" CommandName="Select"   
                                                CssClass="rlvBSel" Text=" " /> 
                                        </td> 
                                        <td width="60px">  
                                            <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' /> 
                                        </td> 
                                        <td>&nbsp;  
                                        </td> 
                                    </tr> 
                                </AlternatingItemTemplate> 
                                <EmptyDataTemplate> 
                                    <div class="RadListView RadListView_Black">  
                                        <div class="rlvEmpty">  
                                            There are no items to be displayed.</div> 
                                    </div> 
                                </EmptyDataTemplate> 
                                <SelectedItemTemplate> 
                                    <tr class="rlvISel">  
                                        <td width="20px">  
                                            <asp:Button ID="DeselectButton" runat="server" CommandName="Deselect"   
                                                CssClass="rlvBSel" Text=" " /> 
                                        </td> 
                                        <td width="60px">  
                                            <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' /> 
                                        </td> 
                                        <td>&nbsp;  
                                        </td> 
                                    </tr> 
                                </SelectedItemTemplate> 
                            </telerik:RadListView> 
Princy
Top achievements
Rank 2
 answered on 07 Apr 2011
1 answer
110 views
Hi, I'm using Radupload and trying to save a record to the database like so on a button click event:

If RadUpload1.UploadedFiles.Count > 0 Then
        .Picture = RadUpload1.UploadedFiles(0).FileName
Else
        .Picture = ""
End If

However, I would also like to change the filename when the file already exists. So I added the FileExists function:
        Protected Sub RadUpload1_FileExists(ByVal sender As Object, ByVal e As UploadedFileEventArgs) Handles RadUpload1.FileExists
            Dim counter As Integer = 1
            Dim file As UploadedFile = e.UploadedFile
            Dim targetFolder As String = Server.MapPath(RadUpload1.TargetFolder)
            Dim targetFileName As String = System.IO.Path.Combine(targetFolder, file.GetNameWithoutExtension & counter & file.GetExtension)
            While System.IO.File.Exists(targetFileName)
                counter += 1
                targetFileName = System.IO.Path.Combine(targetFolder, file.GetNameWithoutExtension & counter & file.GetExtension)
            End While
            file.SaveAs(targetFileName)
        End Sub

This results in changing the filename to picture1.jpg if picture.jpg already exists.
However, it will still save picture.jpg to the database.
How can I make sure it will be updated in the correct way?
Dimitar Terziev
Telerik team
 answered on 07 Apr 2011
7 answers
136 views
Hi,

My problem is that on my opened RadWindow I have a RadGrid.
Is it possible to return a complex list of object to parent?
Lets say my grid has 3 columns (1 checkbox and 2 string ones)
Can I return something like datasource or create custom class in js?
Should I iterate through the radgrid items?
Any code sample would be great.

Thanks
Marin Bratanov
Telerik team
 answered on 07 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?