Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
144 views
I have a basic time entry grid, with a RadComboBox and a set of RadNumericTextBoxes. I want to be able to tab from the Combo, through the textboxes, then to the 'Insert' and 'Cancel' links that are inherent when Inserting with RadGrid. I set the tab order in the ItemDataBound event.  How can I programatically access the 'Insert' and 'Cancel' links in order to set the TabIndex for those?
protected void detailsGrid_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
        { 
      
            if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
            { 
             
                GridEditableItem item = e.Item as GridEditableItem; 
                RadComboBox list = item.FindControl("List1"as RadComboBox; 
 
                list.TabIndex = 10; 
                    RadNumericTextBox tb = (RadNumericTextBox)edititem["day1"].Controls[0]; 
                    tb.Width = Unit.Pixel(intSize); 
                    tb.TabIndex = 11; 
                    RadNumericTextBox tb1 = (RadNumericTextBox)edititem["day2"].Controls[0]; 
                    tb1.Width = Unit.Pixel(intSize); 
                    tb1.TabIndex = 12; 
                    RadNumericTextBox tb2 = (RadNumericTextBox)edititem["day3"].Controls[0]; 
                    tb2.Width = Unit.Pixel(intSize); 
                    tb2.TabIndex = 13; 
                    RadNumericTextBox tb3 = (RadNumericTextBox)edititem["day4"].Controls[0]; 
                    tb3.Width = Unit.Pixel(intSize); 
                    tb3.TabIndex = 14; 
                    RadNumericTextBox tb4 = (RadNumericTextBox)edititem["day5"].Controls[0]; 
                    tb4.Width = Unit.Pixel(intSize); 
                    tb4.TabIndex = 15; 
                    RadNumericTextBox tb5 = (RadNumericTextBox)edititem["day6"].Controls[0]; 
                    tb5.Width = Unit.Pixel(intSize); 
                    tb5.TabIndex = 16; 
                    RadNumericTextBox tb6 = (RadNumericTextBox)edititem["day7"].Controls[0]; 
                    tb6.Width = Unit.Pixel(intSize); 
                    tb6.TabIndex = 17;
}
                    <telerik:RadGrid runat="server" Visible="true" ID="detailsGrid" MasterTableView-EditMode="EditForms"  
                        onneeddatasource="detailsGrid_NeedDataSource" Width="100%"  AllowSorting="true" 
                        MasterTableView-CommandItemDisplay="Bottom" ShowHeader="true" AutoGenerateColumns="False" 
                         OnItemDataBound="detailsGrid_ItemDataBound" EnableLinqExpressions="false" onupdatecommand="detailsGrid_UpdateCommand" 
                         oninsertcommand="detailsGrid_InsertCommand" onitemcommand="detailsGrid_ItemCommand"
                        <MasterTableView DataKeyNames="taskName,taskID,projectid" editmode="InPlace" width="100%" > 
                         <Columns>  
                             <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Task" SortExpression="taskName"  
                                                         EditFormHeaderTextFormat="Task:<FONT COLOR=RED >  * </FONT>"  > 
                                <ItemTemplate> 
                                    <asp:Label id="Label1" runat="server" ToolTip=<%# DataBinder.Eval(Container.DataItem, "description") %>
                                    <%# DataBinder.Eval(Container.DataItem, "taskName") %> 
                                    </asp:Label> 
                               </ItemTemplate> 
                               <EditItemTemplate > 
                                   <telerik:RadComboBox id="List1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="List1_SelectedIndexChanged"  /> 
                               </EditItemTemplate> 
                             </telerik:GridTemplateColumn> 
                             <telerik:GridNumericColumn DataField="day1" DataType="System.Decimal"  /> 
                             <telerik:GridNumericColumn DataField="day2" DataType="System.Decimal" /> 
                             <telerik:GridNumericColumn DataField="day3" DataType="System.Decimal" /> 
                             <telerik:GridNumericColumn DataField="day4" DataType="System.Decimal" /> 
                             <telerik:GridNumericColumn DataField="day5" DataType="System.Decimal" /> 
                             <telerik:GridNumericColumn DataField="day6" DataType="System.Decimal" /> 
                             <telerik:GridNumericColumn DataField="day7" DataType="System.Decimal" /> 
                              
                         </Columns>     
                    </MasterTableView> 
                    </telerik:RadGrid> 

Princy
Top achievements
Rank 2
 answered on 24 Jun 2010
4 answers
125 views
I've inherited some stylesheets from a client and apparently something in their css files is causing the effect that when you click on the PageSizeComboBox to expand it, it expands about 400 pixels to the right of where it should.  Is there any easy css fix I can use for this?  I'd rather not dig through their voluminous stylesheets if at all possible.

Thanks.

Laurie
Iana Tsolova
Telerik team
 answered on 24 Jun 2010
5 answers
796 views
I'm having issues with the placement of the LoadingPanel. For some reason, I am unable to get it to start in the top left corner of the screen. Instead, by default it loads up exactly where the updated control (the control specified in the controlid of the ajaxupdatedcontrol, in the RadAjaxManagerProxy) is.

I can get it to the top right corner by placing a div inside the LoadingPanel, and specifying its top and left css properties, however, when I do this (and also specify the opacity and filter properties too), the modal is transparent but the controls behind it disapear until the modal closes.

If I set the transparency property of the LoadingPanel, I can see the controls, but the modal is positioned where the updatedcontrol is

I also should mention that I'm using the RadAjaxManagerProxy and the modal in a custom Sitefinity module (I figure this is more of a LoadingPanel question than a Sitefinity question).

The panel that is being updated (the ajaxupdatedcontrol) wraps the content of the Module's Control Panel, and the Loading Panel by default is displayed in the top left corner of the Control Panel, to the right of the Command Panel, and under the navigation bar.

Here are two screenshots of my dilemma
http://www.carlj.ca/images/modal1.gif
This is what happens when I specify the transparency property of the RadAjaxLoadingPanel.

http://www.carlj.ca/images/modal2.gif
This is what happens when I don't use the transparency property. Notice that the controls in the middle dispapear?

Below is the code that I'm using. For screenshot #1, use as is. For screenshot #2, remove the transparency from the LoadingPanel

    <telerik:radajaxloadingpanel id="LoadingPanel1" transparency="25" runat="server"
        <div style="position: fixed; top: 0px; left: 0px; z-index: 98; height: 100%; width: 100%; background-color: black; opacity: 0.4; filter: alpha(opacity=40)"
         
        </div> 
        <div style="position: absolute; top: 0px; left: 0px; z-index: 99;height: 100%; width: 100%; "
            <div style="position: absolute;"
                <div style="position: absolute; z-index: 100; background-color: White;"
                    <asp:Label id="Label2" runat="server" ForeColor="Red">Loading... </asp:Label> 
                    <asp:Image id="Image1" runat="server" Width="224px" Height="48px" ImageUrl="Loading.gif"></asp:Image>     
                </div> 
            </div>   
        </div> 
    </telerik:radajaxloadingpanel> 

Thanks,
Carl J

http://www.carlj.ca/images/modal1.gif

Iana Tsolova
Telerik team
 answered on 24 Jun 2010
4 answers
126 views
Does anyone know of a way to reproduce the ConfirmText functionality that's available on GridButtonColumn controls for RadMenuItem controls?  I have a menu item that the user will click in order to delete something, but before proceeding with the delete operation I would like to ask the user to confirm in case they clicked the button by accident.  This is basic stuff, and I could use another means of doing this, but the menu item I want to use is the most convenient at this time.

Any ideas?

Thanks,
jeff
liu qingshui
Top achievements
Rank 1
 answered on 24 Jun 2010
3 answers
192 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
532 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
128 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
469 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
267 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 ObjectByVal 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 ObjectByVal 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 IntegerString) = GetItemsByText(e.Text, fromRow, toRow, maxItems) 
        Dim data As IDictionary(Of IntegerString) = 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
94 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
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?