Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
196 views
 RadGrid There RadComboBox use FormTemplate edit control, automatic add, delete and update.
Click Edit when the RadComboBox can not be selected.
RadGrid and RadComboBox are two tables, the main foreign key relationship. How to RadComboBx select edit data. Thank you! ! !I use the Entity Data Source

Code:

<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" 
            AllowAutomaticUpdates="True" DataSourceID="EntityDataSource1" GridLines="None" 
            OnItemUpdated="RadGrid1_ItemUpdated" OnInsertCommand="RadGrid1_InsertCommand" 
            OnItemCommand="RadGrid1_ItemCommand">  
            <MasterTableView AutoGenerateColumns="False" HorizontalAlign="NotSet" CommandItemDisplay="TopAndBottom" 
                DataKeyNames="DicID" DataSourceID="EntityDataSource1">  
                <Columns>  
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">  
                    </telerik:GridEditCommandColumn>  
                    <telerik:GridBoundColumn DataField="DicID" HeaderText="DicID" ReadOnly="false" SortExpression="DicID" 
                        UniqueName="DicID">  
                    </telerik:GridBoundColumn>  
                    <telerik:GridBoundColumn DataField="DicDode" HeaderText="DicDode" SortExpression="DicDode" 
                        UniqueName="DicDode">  
                    </telerik:GridBoundColumn>  
                    <telerik:GridBoundColumn DataField="DicName" HeaderText="DicName" SortExpression="DicName" 
                        UniqueName="DicName">  
                    </telerik:GridBoundColumn>  
                    <telerik:GridBoundColumn DataField="DicRe" HeaderText="DicRe" SortExpression="DicRe" 
                        UniqueName="DicRe">  
                    </telerik:GridBoundColumn>  
                    <telerik:GridDropDownColumn DataField="d_DicType.DicTypeID" DataSourceID="EntityDataSource2" 
                        ListTextField="TypeName" ListValueField="DicTypeID" HeaderText="d_DicType.DicTypeID" 
                        SortExpression="d_DicType.DicTypeID" UniqueName="d_DicType.DicTypeID">  
                    </telerik:GridDropDownColumn>  
                    <telerik:GridButtonColumn HeaderText="Delete" ConfirmText="Delete this product?" 
                        ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" 
                        CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">  
                        <ItemStyle HorizontalAlign="Center" />  
                    </telerik:GridButtonColumn>  
                </Columns>  
                <EditFormSettings EditFormType="Template" ColumnNumber="2" CaptionDataField="RoleName">  
                    <EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update record" 
                        UniqueName="EditCommandColumn1" CancelText="Cancel edit">  
                    </EditColumn>  
                    <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" />  
                    <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White" 
                        Width="100%" />  
                    <FormTableItemStyle Wrap="False"></FormTableItemStyle>  
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>  
                    <FormTableButtonRowStyle HorizontalAlign="Right"></FormTableButtonRowStyle>  
                    <FormTemplate>  
                        <table align="center" border="2" cellpadding="2" cellspacing="1" style="width: 100%;
                            border-collapse: collapse;">  
                            <tr>  
                                <td style="width: 100px; height: 40px">  
                                    <telerik:RadTextBox ID="DicID" runat="server" Text='<%# Bind("DicID") %>' Width="150px" 
                                        Visible="false">  
                                    </telerik:RadTextBox>  
                                    DicDode:  
                                </td>  
                                <td style="height: 30px">  
                                    <telerik:RadTextBox ID="RadTextBox_UserName" runat="server" Text='<%# Bind("DicDode") %>'  
                                        Width="150px">  
                                    </telerik:RadTextBox>  
                                </td>  
                                <td style="width: 120px; height: 30px">  
                                    DicName:  
                                </td>  
                                <td style="height: 30px">  
                                    <telerik:RadTextBox ID="RadTextBox_LoginName" runat="server" Text='<%# Bind("DicName") %>'  
                                        Width="150px">  
                                    </telerik:RadTextBox>  
                                </td>  
                            </tr>  
                            <tr>  
                                <td style="width: 100px; height: 40px">  
                                    DicRe:  
                                </td>  
                                <td style="height: 30px">  
                                    <telerik:RadTextBox ID="RadTextBox3" runat="server" Text='<%# Bind("DicRe") %>' Width="150px">  
                                    </telerik:RadTextBox>  
                                </td>  
                                <td style="width: 120px; height: 30px">  
                                    DicTypeID:  
                                </td>  
                                <td style="height: 30px">  
                                    <telerik:RadComboBox ID="ComboBox1" runat="server" DataSourceID="EntityDataSource2" 
                                        DataTextField="TypeName" DataValueField="DicTypeID" AppendDataBoundItems="true" 
                                        SelectedValue='<%# Bind("d_DicType.DicTypeID") %>'>  
                                    </telerik:RadComboBox>  
                                </td>  
                            </tr>  
                            <tr>  
                                <td colspan="4" align="center">  
                                    <asp:Button ID="btnUpdate" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'  
                                        Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' />  
                                    <asp:Button ID="btnCancel" runat="server" CausesValidation="False" CommandName="Cancel" 
                                        Text="Cancel" />  
                                </td>  
                            </tr>  
                        </table>  
                    </FormTemplate>  
                </EditFormSettings>  
            </MasterTableView>  
        </telerik:RadGrid>  
 
<asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=UnicornDBEntities" 
            DefaultContainerName="UnicornDBEntities" EnableDelete="True" EnableInsert="True" 
            EnableUpdate="True" EntitySetName="d_DicInfo" EntityTypeFilter="d_DicInfo">  
        </asp:EntityDataSource>  
 
<asp:EntityDataSource ID="EntityDataSource2" runat="server" ConnectionString="name=UnicornDBEntities" 
        DefaultContainerName="UnicornDBEntities" EnableDelete="True" EnableInsert="True" 
        EnableUpdate="True" EntitySetName="d_DicType">  
    </asp:EntityDataSource> 
Princy
Top achievements
Rank 2
 answered on 24 Jun 2010
4 answers
550 views
Hi there

Is there a way around to get the files and not to save to any file location. I want to upload multiple files with RadAsyncUpload and not with simple rad upload.

I want to send the uploaded file as an email attachment. So i don't want to save them any where and for uploading I want to do it with RadAsyncUpload.
 
Similar control one below this email editor.

Any help will be much appreciated.

Thanks
Ricky
Ricky
Top achievements
Rank 2
 answered on 24 Jun 2010
3 answers
135 views
Is it correct that all images being rotated need to be the same size?
Im trying to rotate a set of banners that are almost the same size but not exactly. the effect i get is

*some images get chopped of and the worst is that the chopped of part is shown in the beginning of the next image!
*there is a delay between images when nothing is shown.

Here is my code:

CSS: 
.banner 
{ 
  border:blue 1px solid; 
    overflow: hidden; 
    height: 320px; 
    width: 920px; 
    margin: 9px 9px 9px 11px; 
} 
 
 
aspx: 
 
             <telerik:RadRotator ID="radrotBanners" Width="923" Height="325" runat="server" CssClass="banner" 
                  
                                     SlideShowAnimation-Type="CrossFade" 
                      SlideShowAnimation-Duration="100" 
                        FrameDuration="5000" 
                  InitialItemIndex="1" 
                   PauseOnMouseOver="false" 
                    RotatorType="SlideShow" 
                     ItemHeight="320" 
                      ItemWidth="920" 
                > 
                <ItemTemplate> 
                 
             
                    <asp:Image ID="imgBanner"   CssClass="banner" ImageUrl='<%# Eval("url") %>' runat="server" /> 
                </ItemTemplate> 
                </telerik:RadRotator> 

Fiko
Telerik team
 answered on 24 Jun 2010
2 answers
480 views
Here's my code:

<radTelerik:RadTreeView ID="t" runat="server" style="width:200px;white-space:normal;overflow: hidden;text-overflow:ellipsis;" EnableEmbeddedScripts="False" Skin="Vista" >

But the radtreeview still has text-overflow: clip; behavior on long texts. Can someone from telerik help me?

Thanks.
iTools
Top achievements
Rank 1
 answered on 24 Jun 2010
6 answers
278 views
I have a RadCombo using LoadOnDemand and ShowMoreResultsBox because my RadComboBox needs to support a large data source.
I have tried, without success, to disable the MoreResultsBox when the end of the the data source is reached.

Here is what I'm doing:
Private WithEvents ctlRadCombo As New RadComboBox() With { 
        .ID = "ctlRadCombo", 
        .EmptyMessage = "Enter some text", 
        .ShowMoreResultsBox = True, 
        .EnableViewState = False, 
        .EnableLoadOnDemand = True, 
        .AppendDataBoundItems = True, 
        .NoWrap = True, 
        .ItemRequestTimeout = 1000, 
        .Width = 350, 
        .MaxHeight = 400 
    } 
 
    Private Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Init 
        pnlContents.Controls.Add(ctlRadCombo) 
        AddHandler ctlRadCombo.ItemsRequested, AddressOf ctlRadCombo_ItemsRequested 
    End Sub 
 
    Private Sub ctlRadCombo_ItemsRequested(ByVal sender As Object, ByVal e As RadComboBoxItemsRequestedEventArgs) 
        Dim theCombo As RadComboBox = DirectCast(sender, RadComboBox) 
        Dim maxItems As Integer 
 
        Dim fromRow As Integer = e.NumberOfItems + 1 
        Dim toRow As Integer = fromRow + 9 
        Dim items As IDictionary(Of Integer, String) = GetItemsByText(e.Text, fromRow, toRow, maxItems) 
        Dim data As IDictionary(Of Integer, String) = items 
        theCombo.DataTextField = "Value" 
        theCombo.DataValueField = "Key" 
        theCombo.DataSource = data 
        theCombo.DataBind() 
 
        e.EndOfItems = maxItems <= toRow 
        theCombo.ShowMoreResultsBox = Not e.EndOfItems 
    End Sub 

iTools
Top achievements
Rank 1
 answered on 24 Jun 2010
0 answers
98 views
I have an aspx page that has 2 RadGrids on the page and depending on what RadioButtonList is selected i set the grid visible or not.

The problem is when I load the grid with data then hide it and then load new data in the grid and unhide it the styling of the grid is all messed up.  The filters lose the filter image, that alternating row color is lost and so on.

Can you tell me the best way to clear the grid, hide it and unhide it so to not lose the styling?

Thank you.
Mark Andrew
Top achievements
Rank 1
 asked on 23 Jun 2010
2 answers
70 views
We are using RADTooltip to show a modal message in our pages. Following is the tooltip definition

<telerik:RadToolTip ID="infoFlash" runat="server" EnableEmbeddedSkins="false" Modal="true"
    ShowCallout="false" Position="Center" ManualClose="true" RelativeTo="BrowserWindow" OnClientShow="SetHideTimeOut"
    OnClientHide="ResetHideTime">
    <div id="divBody" class="divInfoFlashBody">
        <div id="divInfoImage" class="leftAlignElement divInfoSuccessImage" style="background-image:url(<%= GetImagePath(ImageType.Success) %>)">
        </div>
        <div id="textBox" class='rightAlignElement divInfoText resultMessage FontColor3'
            runat="server">
        </div>
    </div>
</telerik:RadToolTip>

We are opening the tooltip using Show() method on serverside. We also use clientside Show() method. This is working fine in regular environments. But when we deploy this in a HTTPS environment, it shows security warning message when the tooltip is about to show. We have observed this in IE6, 7, 8.

We are using Telerik webcontrols version 2008.2.1001.35.

Any thoughts on this?
Lakshmi Satish Maddela
Top achievements
Rank 1
 answered on 23 Jun 2010
2 answers
177 views
I have a pretty simple situation where I have the following arrangement:-
<telerik:RadSplitter ID="Radsplitter1" runat="server"......
    <telerik:RadPane ID="Radpane1" runat="server" .....
        <telerik:RadSlidingZone ID="Radslidingzone1" runat="server" ....
            <telerik:RadSlidingPane ID="rsp1" ...... 
            <telerik:RadSlidingPane ID="rsp2" ...... 
            <telerik:RadSlidingPane ID="rsp3" ...... 

All I want to do is to be able to programmatically, on the server side, make the contents on the "rsp2" to be selected and visible to the user. Is it possible or can it only be activated/selected by the user?
 
Ben Thompson
Top achievements
Rank 1
 answered on 23 Jun 2010
6 answers
278 views
I use Rad AjaxManager and open all of my popups through window.radopen. A particular page (contentpage.aspx) is opened in a rad window. I would, like, if the user clicks on the "X" to execute some codebehind on the contentpage.aspx. I see one can wire up the OnCLientClose event of rad window, but it seems the javascript funciton has to exist in the page the window was opened from, and not in the page that is loaded in the window. ALso, the timing of wiring up this event doesn't seem to work for me, since it seems the event has to be wired up prior to the eindow being opened. so, in general, is it possible to run some server-side code behind method in a content page in response to a user clicking on the "X" in a rad window opened through Window Manager?
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
 answered on 23 Jun 2010
10 answers
350 views
Hi,

I have the following RadToolBar within a user control :
   <telerik:radtoolbar id="rtbToolBar" runat="server" skin="Office2007" borderstyle="None" 
      width="100%" onbuttonclick="rtbToolBar_ButtonClick" onclientbuttonclicking="toolbarClicking">  
                              </telerik:radtoolbar> 

Buttons are then added programatically.

The problems is, the serverside button click event only fires the first time that a button is clicked.  After that, nothing happens.
The clientside onclientbuttonclicking event still fires.
As a test I have placed an asp button in the control with the radtool bar.  The buttons click event fires succefully each time.

I would very much appreciate some help with this issue, it's driving me crazy!

Thanks,

Sean Duffy
Cristian Malinescu
Top achievements
Rank 1
 answered on 23 Jun 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?