Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
190 views
Hello,
I have been unable to find a solution in the examples and forums.
On a page I have 3 tabs and 3 invisible Iframes. On Tab click, with autopostback=true,  I make the associated Iframe visible and set the source attribute of the Iframe if it has not previously been loaded. The Iframe loads a ASPC page with its own scriptmanager. If there is a button on the ASPX page loaded into the Iframe which display time on a label, and I click to a different tab and click back, the label is blank. It is seems that page in the Iframe is not maintaining state.

Does anyone have a solution?

My goal is to have the user be able to work on a tab, for example enter text in a textbox press a button and have the text displayed a label, click to another tab and click back to previous tab to have the text still display on the label.

Thanks
protected void RadTabStrip1_TabClick(object sender, Telerik.Web.UI.RadTabStripEventArgs e)  
{  
 if (!IFrame1Loaded)  
 {  
  path = "TabPages/Page1.aspx?";  
  Iframe1.Attributes.Add("src", path);  
  IFrame1Loaded = true;                      
 }  
 Iframe1.Visible = true;  
}  

Tabs
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" Visible="true" BorderStyle="Solid" BorderColor="black"  
 BorderWidth="0px" Skin="Outlook" SelectedIndex="0" AutoPostBack="true" OnTabClick="RadTabStrip1_TabClick"
    <Tabs> 
        <telerik:RadTab Text="Page1" ID="tab0" runat="server"></telerik:RadTab> 
        <telerik:RadTab Text="Page2" ID="tab1" runat="server"></telerik:RadTab> 
        <telerik:RadTab Text="Page3" ID="tab2" runat="server"></telerik:RadTab>         
    </Tabs> 
</telerik:RadTabStrip> 
<iframe id="Iframe1" src="" runat="server" width="98%" height="98%" frameborder="1" visible="false" ></iframe
<iframe id="Iframe2" src="" runat="server" width="98%" height="98%" frameborder="1" visible="false" ></iframe
<iframe id="Iframe3" src="" runat="server" width="98%" height="540px" frameborder="1" visible="false" ></iframe
Paul Bishop
Top achievements
Rank 1
 answered on 31 Jan 2009
2 answers
188 views
Hi, i want to add the RadSpell-control programmatically to my page and be able to set it language. Adding the control programmatically is no problem but only when I don't want to change the default language, which is en-US.

when I set it to de-DE or fr-FR (both lib's are in the App_Data-folder), the control is rendered, but when I click the button, nothing happens.

I got this code:
 RadSpell spell = new RadSpell(); 
        spell.ButtonType = Telerik.Web.UI.ButtonType.PushButton; 
        spell.ControlToCheck = tb1.ID; 
        spell.DictionaryLanguage = "fr-fr"
        spell.SupportedLanguages = new string[] { "en-us, English, de-de, German, fr-fr, French" }; 
        spell.DictionaryPath = @"~/App_Data/RadSpell"; 
 
I tried this in onInit and prerender. As said, the spell button is shown, but it only works when I leave out all the lines after dictionarylanguage. Otherwise it shows, but clicking does not trigger anything.

What should I do?

Version: 2008.03.1105.20
Teste both in FF 3 and IE 6


--------------- Edit ---------------------

When I put a RadSpell control on the page and set the properties programmatically, it is also working. However I want to be able to add  the RadSpell control on the page based on some system settings.

 RadSpell spell = (Page.Form.FindControl("clientSpell") as RadSpell); 
        spell.ButtonType = Telerik.Web.UI.ButtonType.PushButton; 
        spell.ControlToCheck = tb1.ID; 
        spell.DictionaryLanguage = "de-DE"
        //spell.SupportedLanguages = new string[] { "en-us, English, de-de, German, fr-fr, French" }; 
        //spell.DictionaryPath = @"~/App_Data/RadSpell"; 
 
        this.form1.Controls.Add(spell); 



Stephan
Top achievements
Rank 1
 answered on 31 Jan 2009
1 answer
84 views
I'm new to Telerik.  I'm trying to use the Grid control and I cannot get the properties to appear in the Properties window in Visual Web Developer 2008.  I've provided a screen shot at http://www.safetservices.com/screen_shot.doc.  I'm also using the Editor control and the properties display fine.  I can't find any other posts that describe this issue.  Thanks for any help you can provide.
Matt
Top achievements
Rank 1
 answered on 30 Jan 2009
1 answer
98 views
Hi, could someone help me with thist problem please.

I have a RadGrid on my page with a <EditFormSettings><FormTemplate> on it. (See below).  On Page load the Insert row is always shown (this was easy).
The problem I'm having is trying to edit the values of each of the controls as they change depending on what is in the db.
ie I'm trying to do something like this (Very simple example only):

Dim dt as DataTable = GetDTFromDataBase  
grid.Datasource= dt  
grid.databind  
 
If dt.rows.count =0 Then 
 grid.editItems.findcontrol("1").text = Now()  
Else 
 grid.editItems.findcontrol("1").text = dt.rows(0)("date") 
End If 


Actuall RadGrid
<telerik:RadGrid ID="rgActions" runat="server" AutoGenerateColumns="False" GridLines="None" 
    AllowAutomaticInserts="false" Skin="WebBlue">  
    <MasterTableView> 
        <RowIndicatorColumn> 
            <HeaderStyle Width="20px" /> 
        </RowIndicatorColumn> 
        <ExpandCollapseColumn> 
            <HeaderStyle Width="20px" /> 
        </ExpandCollapseColumn> 
        <EditFormSettings EditFormType="Template" > 
            <FormTemplate> 
                <%--<asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="addAction" />--%> 
                <table> 
                    <tr> 
                        <td> 
                            <asp:Label ID="lblDate" runat="server" Text="Date:"></asp:Label></td>  
                        <td> 
                            <%--<asp:TextBox ID="txtDate" runat="server"></asp:TextBox>onclick="ToggleFirstPopup()"--%> 
                            <telerik:RadDatePicker ID="rdpDate" runat="server" Culture="English (Australia)" Skin="WebBlue">  
                                <DateInput LabelCssClass="radLabelCss_WebBlue" Skin="WebBlue" > 
                                </DateInput> 
                                <Calendar Skin="WebBlue" > 
                                </Calendar> 
                            </telerik:RadDatePicker> 
                            <asp:RequiredFieldValidator ID="rfvDate" runat="server" ControlToValidate="rdpDate" 
                                ErrorMessage="Date is required" ValidationGroup="addAction">*</asp:RequiredFieldValidator></td>  
                        <td> 
                            <asp:Label ID="lblAction" runat="server" Text="Action:"></asp:Label></td>  
                        <td> 
                            <asp:TextBox ID="txtAction" runat="server"></asp:TextBox> 
                            <asp:RequiredFieldValidator ID="rfvAction" runat="server" ControlToValidate="txtAction" 
                                ErrorMessage="Action required" ValidationGroup="addAction">*</asp:RequiredFieldValidator></td>  
                    </tr> 
                    <tr> 
                        <td> 
                            <asp:Label ID="lblDateActioned" runat="server" Text="Date Actioned:"></asp:Label></td>  
                        <td> 
                            <%--<asp:TextBox ID="txtDateActioned" runat="server"></asp:TextBox>onclick="ToggleSecondPopup()"--%> 
                            <telerik:RadDatePicker ID="rdpDateActioned" runat="server" Skin="WebBlue">  
                                <DateInput LabelCssClass="radLabelCss_WebBlue" Skin="WebBlue" > 
                                </DateInput> 
                                <Calendar Skin="WebBlue">  
                                </Calendar> 
                            </telerik:RadDatePicker> 
                        </td> 
                        <td> 
                            <asp:Label ID="lblActionBy" runat="server" Text="Action By:"></asp:Label></td>  
                        <td> 
                            <%--<asp:TextBox ID="txtActionBy" runat="server"></asp:TextBox>--%> 
                            <telerik:RadComboBox ID="rcbActionBy" runat="server" Skin="WebBlue" DataSourceID="sdsEmployee" DataTextField="name" DataValueField="userID">  
                                <CollapseAnimation Duration="200" Type="OutQuint" /> 
                            </telerik:RadComboBox> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td colspan="4">  
                            <asp:TextBox ID="txtComment" runat="server" Width="399px"></asp:TextBox></td>  
                    </tr> 
                    <tr> 
                        <td> 
                            <asp:Label ID="lblNextAction" runat="server" Text="Next Action:"></asp:Label> 
                        </td> 
                        <td> 
                            <asp:TextBox ID="txtNextAction" runat="server"></asp:TextBox> 
                            <asp:RequiredFieldValidator ID="rfvNextAction" runat="server" ControlToValidate="txtNextAction" 
                                ErrorMessage="Next Action required" ValidationGroup="addAction">*</asp:RequiredFieldValidator></td>  
                        <td> 
                        </td> 
                        <td> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td> 
                            <asp:Label ID="lblNextToAction" runat="server" Text="Next To Action:"></asp:Label> 
                        </td> 
                        <td> 
                            <%--<asp:TextBox ID="txtNextToAction" runat="server"></asp:TextBox>--%> 
                            <telerik:RadComboBox ID="rcbNextToAction" AppendDataBoundItems="true" runat="server" Skin="WebBlue" DataSourceID="sdsEmployee" DataTextField="name" DataValueField="userID">  
                                <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                <Items> 
                                    <telerik:RadComboBoxItem Text=" -- Please select -- " Value="" /> 
                                </Items> 
                            </telerik:RadComboBox> 
                            <asp:RequiredFieldValidator ID="rfvNextToAction" runat="server" ControlToValidate="rcbNextToAction" 
                                ErrorMessage="Next To Action is required" ValidationGroup="addAction">*</asp:RequiredFieldValidator></td>  
                        <td> 
                            &nbsp;</td> 
                        <td> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td> 
                            <asp:Label ID="lblCC" runat="server" Text="CC:"></asp:Label></td>  
                        <td colspan="3">  
                            <telerik:RadComboBox ID="rcbCC1" AppendDataBoundItems="true" runat="server" Skin="WebBlue" DataSourceID="sdsEmployee" DataTextField="name" DataValueField="userID">  
                                <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                <Items> 
                                    <telerik:RadComboBoxItem Text=" -- Please select -- " Value="" /> 
                                </Items> 
                            </telerik:RadComboBox> 
                            <telerik:RadComboBox ID="rcbCC2" AppendDataBoundItems="true" runat="server" Skin="WebBlue" DataSourceID="sdsEmployee" DataTextField="name" DataValueField="userID">  
                                <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                <Items> 
                                    <telerik:RadComboBoxItem Text=" -- Please select -- " Value="" /> 
                                </Items> 
                            </telerik:RadComboBox> 
                            <telerik:RadComboBox ID="rcbCC3" AppendDataBoundItems="true" runat="server" Skin="WebBlue" DataSourceID="sdsEmployee" DataTextField="name" DataValueField="userID">  
                                <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                <Items> 
                                    <telerik:RadComboBoxItem Text=" -- Please select -- " Value="" /> 
                                </Items> 
                            </telerik:RadComboBox> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td> 
                        </td> 
                        <td colspan="3">  
                            <asp:TextBox ID="txtCC" Rows="3" Width="200px" TextMode="multiLine" runat="server"></asp:TextBox> 
                        </td> 
                    </tr> 
                </table> 
                <asp:Button ID="btnAdd" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Add Action", "Update") %>' 
                    runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>' ValidationGroup="addAction" /> 
                  
            </FormTemplate> 
        </EditFormSettings> 
        <Columns> 
            <telerik:GridTemplateColumn UniqueName="TemplateColumn">  
                <ItemTemplate> 
                    <table> 
                        <tr> 
                            <td> 
                                <asp:Label ID="lblDate" runat="server" Text="Date:"></asp:Label></td>  
                            <td> 
                                <asp:Label ID="txtDate" runat="server" Text='<%# Bind("dateLog") %>'></asp:Label></td>  
                            <td> 
                                <asp:Label ID="lblAction" runat="server" Text="Action:"></asp:Label></td>  
                            <td> 
                                <asp:Label ID="txtAction" runat="server" Text='<%# Bind("action") %>'></asp:Label></td>  
                        </tr> 
                        <tr> 
                            <td> 
                                <asp:Label ID="lblDateActioned" runat="server" Text="Date Actioned:"></asp:Label></td>  
                            <td> 
                                <asp:Label ID="txtDateActioned" runat="server" Text='<%# Bind("dateActioned") %>'></asp:Label></td>  
                            <td> 
                                <asp:Label ID="lblActionBy" runat="server" Text="Action By:"></asp:Label></td>  
                            <td> 
                                <asp:Label ID="txtActionBy" runat="server" Text='<%# Bind("ActionBy") %>'></asp:Label></td>  
                        </tr> 
                        <tr> 
                            <td colspan="4">  
                                <asp:Label ID="txtComment" runat="server" Width="399px" Text='<%# Bind("comment") %>'></asp:Label></td>  
                        </tr> 
                        <tr> 
                            <td> 
                                <asp:Label ID="lblNextAction" runat="server" Text="Next Action:"></asp:Label> 
                            </td> 
                            <td> 
                                <asp:Label ID="txtNextAction" runat="server" Text='<%# Bind("nextAction") %>'></asp:Label> 
                            </td> 
                            <td> 
                            </td> 
                            <td> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td> 
                                <asp:Label ID="lblNextToAction" runat="server" Text="Next To Action:"></asp:Label> 
                            </td> 
                            <td> 
                                <asp:Label ID="txtNextToAction" runat="server" Text='<%# Bind("nextToAction") %>'></asp:Label> 
                            </td> 
                            <td> 
                                &nbsp;</td> 
                            <td> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td> 
                                <asp:Label ID="lblCC" runat="server" Text="CC:"></asp:Label></td>  
                            <td> 
                                <asp:Label ID="txtCC" runat="server" Text='<%# Bind("cc") %>'></asp:Label></td>  
                            <td> 
                            </td> 
                            <td> 
                            </td> 
                        </tr> 
                    </table> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
        </Columns> 
    </MasterTableView> 
    <ClientSettings> 
        <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
    </ClientSettings> 
    <FilterMenu EnableTheming="True" Skin="WebBlue">  
        <CollapseAnimation Duration="200" Type="OutQuint" /> 
    </FilterMenu> 
</telerik:RadGrid> 
Daniel
Telerik team
 answered on 30 Jan 2009
7 answers
663 views

I’m using <ClientSettings EnablePostBackOnRowClick="True"> to do Codebehind stuff when the user click on a row in a RadGrid.

The first column in the RadGrid is a <GridTemplateColumn> that I have a checkbox in:

 

<radG:GridTemplateColumn Groupable="False" Reorderable="False" UniqueName="SelectColumn" AutoPostBackOnFilter="false" >

                        <HeaderTemplate>

                            <asp:CheckBox ID="chkCheckAll" runat="server" ToolTip="!Select/deselect all" />

                        </HeaderTemplate>

                        <ItemTemplate>

                            <asp:CheckBox ID="chkSelected" AutoPostBack="true" runat="server" OnCheckedChanged="chkSelected_CheckedChanged" />

                        </ItemTemplate>

                        <HeaderStyle Width="25px" />

                        <ItemStyle HorizontalAlign="Center"  />

                    </radG:GridTemplateColumn>

 

My problem is that I don’t want a postback when the checkbox column is checked. I also want the row to me selected when checking the checkbox.

Pavlina
Telerik team
 answered on 30 Jan 2009
2 answers
151 views

Hello,

I have a combobox that takes input for the RadUpload. The combo box loads with -- Select Value-- in it but when no selectin is made i get a NullReferenceException occurred.  at this line.

 
string  DBCreativeName = RCBXCreative.SelectedItem.Value;

so I tried to use an if and try catch to fix this
 
 string DBCreativeName = RCBXCreative.SelectedItem.Value;
 
try
 
{
 
if (Convert.ToBoolean(DBCreativeName = ""))
 
 {

    lblstatupload2.Text = "You need to select a creative";
  }

}
catch (NullReferenceException)
  {

lblstatupload2.Text = " you need to enter a creative";
 }

this didn't work either. Can someone advise me on what is the correct way to fix this.

Thanks,
 Yusef

 

 

Toni
Top achievements
Rank 1
 answered on 30 Jan 2009
4 answers
221 views
My  request/issue is simple. I have a radTreeView nested into the radComboBox. With this, I am using a custom skin with an over-written "overflow-x: hidden !important" on CSSClass ".RadComboBoxDropDown_MinExpo .rcbScroll". My request/issue is, in the browser IE 7; the scrollbar is not responding to setting the postion to the top. I have tried implementing javascript on "onClientDropDownOpened" but scrollTop, doScroll(), scroll() and scrollTo are not effective; even with a "setTimeout" event . A normal ComboBoxDropDown without the extra width set is setting the scroll position correctly. Any thoughts on how to get the scrollbar position in IE to the top?

Here is my settings reference if you need it.

<

telerik:RadComboBox ID="ddlProductCategory" runat="server" Height="140px" Width="215px" DropDownWidth="450px"

ShowToggleImage="True" Skin="MinExpo" EnableEmbeddedSkins="false" Style="vertical-align: middle;">

<ItemTemplate>

<div id="div1">

<telerik:RadTreeView runat="server" ID="radCheck" OnLoad="PopPCNodes_Load" OnClientNodeClicking="nodeClicking"

Skin="WebBlue">

</telerik:RadTreeView>

</div>

</ItemTemplate>

<Items>

<telerik:RadComboBoxItem Text="All Product Categories" Value="0" />

</Items>

</telerik:RadComboBox>

Steve
Top achievements
Rank 2
 answered on 30 Jan 2009
1 answer
57 views
Hi guys,

I am using the asp.net ajax control for rad editor. After copying all the files from global resources and app data, still I am getting the not found for all labels in the editor, even for default 'en-US' settings. Please help.

for example instead of seeing <>html in the toolbar i am seeing <> not found.
This is the same for all the labels. My site is not asp.net ajax enabled. I have done all the settings given in this page:
http://www.telerik.com/help/aspnet-ajax/editor_migrationfromradeditorclassictoradeditorprometheus.html

Thanks
Muthu
Rumen
Telerik team
 answered on 30 Jan 2009
1 answer
219 views
For those of you that are looking on how to maintain state of the columns that are marked not visible. The problem is that when you have a column that is marked as not visible and then you select to show that with the column picker, it does not maintain the state. The way that we got it to do it is by this:

// Finds all the checkboxes in the context menu.

$(

function() {

 

$(

":checkbox").filter(function() {

 

 

return this.id.match('rghcMenu')

 

}).click(

function() { OnContextMenuClick(this) });

 

}

);

var

 

columnHash;

 

// Triggered when the columns slide open.

function

 

OnHeaderContextMenuClientItemOpened() {

 

 

for (var key in columnHash) {

 

 

var control = document.getElementById(key);

 

control.checked = columnHash[key];

}

}

// Maintains the state of the checkbox.

function

 

OnContextMenuClick(checkBox) {

 

 

if (columnHash == null) {

 

columnHash =

new Object();

 

}

columnHash[checkBox.id] = checkBox.checked;

}

and then have this in the HeaderContextMenu on the grid:

 

<

 

HeaderContextMenu OnClientItemOpened="OnHeaderContextMenuClientItemOpened" />

 

 

 


I hope that this helps people. I found it frustrating to figure out how to do it. We put ours in our skins for all themes and put the javascript and JQuery above in an embedded resource file which we load up on any page with a Rad Grid.

Mike Moser

Rosen
Telerik team
 answered on 30 Jan 2009
1 answer
87 views
Hello,

in my application I use custom calendar events to be shown in Scheduler control. I need to display certain properties of my CalendarEvent object but I'm not able to get underlying DataItem in AppointmentCreated event - although there is a property Container.Appointment.DataItem, it seems to be always null.

Is there any way how can I access underlying data object in AppointmentCreated event?

Thanks,

Antonin

Brian Mains
Top achievements
Rank 1
 answered on 30 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?