Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
121 views
I'm trying to load an RTF document that we retrieve from a database when a user clicks on an ImageButton on a row in a standard ASP.net gridview. The code seems to get called (RowCommand on server side) to load the RTF but when the dialog is displayed it is blank. It is as if the dialog has been loaded and the callback to load the RTF is ignored.

In ASPX page I have:

<!-- Model Definition Viewer -->
<div id="Viewer">
  <twu:RadEditor runat="server" ID="DefViewer" Enabled="false" EditModes="Design" BorderStyle="None" Skin="Office2007">
    <Content>
    </Content>
  </twu:RadEditor>
</div>
<asp:UpdatePanel ID="GridUpdatePanel" runat="server" ChildrenAsTriggers="False" 
                    UpdateMode="Conditional">
  <ContentTemplate>
    <asp:GridView ID="ModelList" runat="server" AutoGenerateColumns="False" AutoGenerateSelectButton="false"
                        AllowPaging="true" CssClass="GridView" Width="600px" HorizontalAlign="Center" HeaderStyle-Height="40px">
                        <Columns
                          <asp:TemplateField HeaderStyle-Width="20px">
                            <ItemTemplate>
                              <asp:ImageButton ID="InfoPopup" Width="15px" ToolTip="Click to display full model definition" Style="border: 0px"
                                               runat="server" ImageUrl="~/Images/definition.gif" CommandName="Definition" />
                            </ItemTemplate>
                          </asp:TemplateField>
                          <asp:BoundField DataField="ModelID" />
                                    <asp:TemplateField HeaderText="Model Name" SortExpression="Name" HeaderStyle-Width="350px">
                                        <ItemTemplate>
                                            <asp:LinkButton style="text-decoration:none" ID="ModelNameHyperLink" runat="server" CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' Text='<%# Eval("ModelName") %>' Font-Bold="True"></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="ProviderId" />
                          <asp:BoundField DataField="Provider" HeaderText="Provider" HeaderStyle-Width="290px"/>
                        </Columns>
                        <AlternatingRowStyle CssClass="GridAlternating" />
                        <RowStyle CssClass="rowStyle" />
                        <PagerSettings Mode="NumericFirstLast" />
                        <SelectedRowStyle BackColor="#66CCFF"  Font-Bold="true" ForeColor="Black"  />
                      </asp:GridView
                    </ContentTemplate>
                    <Triggers>
                      <asp:AsyncPostBackTrigger ControlID="ModelList" EventName="PageIndexChanged" />
                      <asp:AsyncPostBackTrigger ControlID="ModelList" EventName="SelectedIndexChanged" />
                      <asp:AsyncPostBackTrigger ControlID="ModelList" EventName="RowCommand" />
                    </Triggers>
                  </asp:UpdatePanel>

Code Behind contains:

Protected Sub OnRowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles ModelList.RowCommand
  
 Try
    Select Case e.CommandName
    Case "Definition"
                    Dim RowIndex As Integer = Integer.Parse(e.CommandArgument.ToString)
                    Dim ModelID As String = Me.ModelList.Rows(RowIndex).Cells(ModelListColumnEnum.ModelId).Text
                    Dim ProviderId As String = Me.ModelList.Rows(RowIndex).Cells(ModelListColumnEnum.ProviderId).Text
  
                    'Get the Definition for the specified model/provider and display it.
                                       Try
                        Dim ModelDefinition As String = String.Empty
                        Dim ErrorDetails As String = String.Empty
                        If JiatClient.GetModelDefinition(ProviderId, ModelID, ModelDefinition, ErrorDetails, Utilities.CurrentJIATUser(Session).UserID) Then
                            Me.DefViewer.LoadRtfContent(ModelDefinition)
                        Else
                            Me.DefViewer.Content = "Either this model doesn't have a definition or it could not be loaded."
                        End If
 ScriptManager.RegisterClientScriptBlock(Page, Me.GetType, "FileOpen", "openDialog('Viewer');", True)
                    Catch ex As System.Exception
                        ThrowErrorMessage(ex.Message)
                    Finally
                        'We do some cleanup in here
     
                    End Try

openDialog is javascript jquery code in a separate js file. The code all seems to work except that the radeditor comes up empty. My only thought is that it is because the radeditor is loaded when the page is loaded and on every postback. the only way I could probably get this to work is to check in page load and see if I have a hiddenfield or something set to the RTF. Any ideas? I'm sure people will need more information.
Dobromir
Telerik team
 answered on 20 Dec 2010
1 answer
98 views
Hi Team

I'm trying to pass a value and redirect to another page based on the row user select. The code works fine on my local PC but after I deployed the application to the dev. server the following error is returned (54) Connection reset by peer. after clicking the select button.

 

 

 

protected void RadAnswers_ItemCommand(object sender,GridCommandEventArgs e)
{

 

if (e.CommandName == RadGrid.EditCommandName)
{
 
CreditLifeManager.AnswerID = Convert.ToInt64(RadGridQuestionnaire.SelectedItems[0].OwnerTableView.DataKeyValues[RadGridQuestionnaire.SelectedItems[0].ItemIndex]["AnswerID"]);Response.Redirect("MaintenancePortal/EvaluateQuestionnaireSection1.aspx");

 

 

 

 

    }

 

}

Dev. server is running Windows Server 2003 and running IIS7.5.
Can anyone asssist me on this issue or i'm missing to set configuration.
Any advice will be greatly appreciated

Thanks in advance


Radoslav
Telerik team
 answered on 20 Dec 2010
3 answers
150 views
Hi,

I'm having a problem with the RadSlider while inside of a RadGrid's Template Column.  

What happens on my page, is a user will select a date from a RadCalendar.  For each date selected, a new column will appear in the RadGrid. Each Row will have three Template Columns.   The first template column has an ASP RadioButton List, the second has an ASP CheckBox List and the third and final column has a RadSlider control. 

Everything works fine, except on creation of the first row the RadSlider is not display (it is created and retrievable programmatically).   When the second row is created the first and second RadSlider are displayed correctly.   The code used to create the rows is entirely client side, so I am using set_dataSource() and dataBind() to bind my RadGrid.    My question is, what is different the second time through for the RadGrid that allows it to display the RadSlider after the second date selection and not the first?

Below is the Mark-up for the RadGrid:
<tel:RadGrid runat="server" ID="gvNumNauseaEpisodesPerOccurance"
       AutoGenerateColumns="false"
       GridLines="None"
       Skin=""
       Width="100%"
       style="display:none;"
    <HeaderStyle CssClass="GridHeader" />
    <ItemStyle CssClass="GridRow" />
    <AlternatingItemStyle CssClass="GridAltRow" />
    <ClientSettings>
        <ClientEvents OnCommand="function(){}"                                                                                                                                                                                                                                                                            
                OnRowDataBound="gvNumNauseaEpisodesPerOccurance_RowDataBound"  />
        <Scrolling AllowScroll="true" />
    </ClientSettings>
    <MasterTableView TableLayout="Fixed" ShowHeader="true">
        <Columns>
            <%-- Date --%>
            <tel:GridBoundColumn HeaderText="Date"
                        DataField="date_str"
                        HeaderStyle-Width="80px">
            </tel:GridBoundColumn>
            <%-- Frequency --%>
            <tel:GridTemplateColumn HeaderText="Frequency"
                           HeaderStyle-Width="150px">
                <ItemTemplate>
                    <asp:RadioButtonList runat="server" ID="gvNumNauseaEpisodesPerOccurance_Frequency"
                                RepeatColumns="1"
                                RepeatDirection="Vertical"
                                Width="100%">
                        <asp:ListItem Text="Constant" Value="C">
                        </asp:ListItem>
                        <asp:ListItem Text="Intermittent" Value="I">
                        </asp:ListItem>
                    </asp:RadioButtonList>
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <%-- Time of Day --%>
            <tel:GridTemplateColumn HeaderText="Time of Day"
                           HeaderStyle-Width="175px">
                <ItemTemplate>
                    <asp:CheckBoxList runat="server" ID="gvNumNauseaEpisodesPerOccurance_chklstTimeOfDay"
                               RepeatColumns="2"
                               RepeatDirection="Horizontal">
                        <asp:ListItem Text="Morning" Value="Morning">
                        </asp:ListItem>
                        <asp:ListItem Text="Afternoon" Value="Afternoon">
                        </asp:ListItem>
                        <asp:ListItem Text="Evening" Value="Evening">
                        </asp:ListItem>
                        <asp:ListItem Text="Night" Value="Night">
                        </asp:ListItem>
                    </asp:CheckBoxList>
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <%-- Severity style="display:none;"--%>
            <tel:GridTemplateColumn HeaderText="Severity">
                <ItemTemplate>                                                                                                  
                    <tel:RadSlider runat="server" ID="gvNumNauseaEpisodesPerOccurance_Severity"
                              Skin="Web20"
                              Width="100%">
                        <Items>
                            <tel:RadSliderItem Text="0 (None)" Value="0" />
                            <tel:RadSliderItem Text="1" Value="1" />
                            <tel:RadSliderItem Text="2" Value="2" />
                            <tel:RadSliderItem Text="3" Value="3" />
                            <tel:RadSliderItem Text="4" Value="4" />
                            <tel:RadSliderItem Text="5" Value="5" />
                            <tel:RadSliderItem Text="6" Value="6" />
                            <tel:RadSliderItem Text="7" Value="7" />
                            <tel:RadSliderItem Text="8" Value="8" />
                            <tel:RadSliderItem Text="9" Value="9" />
                            <tel:RadSliderItem Text="10 (Worst)" Value="0" />
                        </Items>
                    </tel:RadSlider>
                </ItemTemplate>
            </tel:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</tel:RadGrid>
Tsvetie
Telerik team
 answered on 20 Dec 2010
3 answers
131 views
I have some controls inside of a multipage enclosed in div tags.  All of the controls update/postback correctly with ajax, however, the loading panel does not appear.  If i take all of the controls and just wrap them with a panel bar, then the loading panel appears properly.  Any ideas why the loading panel will not appear just inside of the div tags inside the RadPageView inside the RadMultiPage?  Thanks.

 

 

 

<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="4" Width="898px"
    CssClass="tabPageView">
    <telerik:RadPageView ID="RadPageView1" runat="server">
                        <div id="divLease" class="divLease">
                            <asp:Label ID="lbl1" runat="server" Text="Label" CssClass="lbl1"></asp:Label>
                            <telerik:RadGrid ID="grdLs" runat="server" EnableEmbeddedSkins="false"
                                Skin="" ShowHeader="false" GridLines="None">
                                <MasterTableView>
                                </MasterTableView>
                            </telerik:RadGrid>
                            <telerik:RadListBox ID="lstLs" runat="server" Width="85"
                                AutoPostBack="True" CausesValidation="False">
                                                                        </telerik:RadListBox>
                            <asp:Label ID="lbllss" runat="server" Text="Label" ></asp:Label>
                            <telerik:RadGrid ID="grdasf" runat="server" ShowHeader="False"
                                Width="300px" AutoGenerateColumns="False" GridLines="None">
                                <MasterTableView>
                                    <RowIndicatorColumn>
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn>
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="ss" UniqueName="ss">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="xx" DataFormatString="{0:0.00%}" DataType="System.Decimal"
                                            UniqueName="xx">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="aa" UniqueName="aa">
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                            <asp:Label ID="lblasdfs" runat="server" Text="Remarks"                                            Visible="false"></asp:Label>
                            <telerik:RadTextBox ID="txt1" runat="server"                                             Width="298" Visible="false" TextMode="MultiLine" CausesValidation="False" Font-Size="Smaller"
                                ReadOnly="true">
                            </telerik:RadTextBox>
                            <asp:RadioButton ID="rbRd" runat="server" Text="test1" Checked="true" CssClass="rbOwnerType"
                                AutoPostBack="True" />
                            <asp:RadioButton ID="rbAaa" runat="server" Text="test2" Checked="false"
                                 AutoPostBack="True" />
                        </div>
                                 </telerik:RadPageView>

 

Veli
Telerik team
 answered on 20 Dec 2010
4 answers
174 views
Hi. I've got two RadButton's side-by-side and display okay in FireFox but not IE7/8. My main container is a DIV and fills the middle part of the page as a percentage. I've got other controls in there like RadTextBoxes and RadComboBoxes that don't have any issues. To get it to display properly, I need to place each button inside their own DIV with a set width and float them. Regular buttons don't have the same problem. I've attached some screens which best describes the problem. I'm using 2010_3_1215. Thanks.
Bozhidar
Telerik team
 answered on 20 Dec 2010
2 answers
192 views
Hi.

I have a couple of RADComboBoxes on a page. When a value in the first combo box is selected, the second one is dynamically filled in with values using javascript.

I've been trying to attach image tooltips (via RadToolTip) to items on the second RadComboBox, but I can't seem to find a way to do this. The following code does not work:

var target = $find("<%= ddlTypes.ClientID %>");
 
...
 
item = new Telerik.Web.UI.RadComboBoxItem();
item.set_text("Text1");
item.set_value("Value1");
target.get_items().add(item);
 
var tooltip = $find("<%= RadToolTip1.ClientID %>");
tooltip.set_targetControl(item);

Is there any way to add tooltips to dynamically added items?

Thanks ...
Mehdi
Top achievements
Rank 1
 answered on 20 Dec 2010
1 answer
69 views
How can I set a grid up so that there is just a delete option for each row ?
I dont need insert or edit as that done on a separate screen.
Shinu
Top achievements
Rank 2
 answered on 20 Dec 2010
1 answer
167 views
http://demos.telerik.com/aspnet-ajax/scheduler/examples/outlook2007/defaultcs.aspx

This demo shows a RadScheduler with a scroller that starts just where you'd want it, below the "all day event" rows, so only the hour-by-hour section of the RadScheduler scrolls.  However, I'm unable to replicate this.  The code below, despite explicitly giving a Height parameter, gives me a RadScheduler expands to whatever height it wants to.  What gives?

<telerik:RadScheduler
    ID="RadSchedulerCalendarEvents"
    runat="server"
    Width="100%"
    Height="500px"
    BorderStyle="None"
    BorderWidth="0"
    HoursPanelTimeFormat="h:mm tt"
    ShowFullTime="true"
    TimeSlotContextMenuSettings-EnableDefault="true"
    StartInsertingInAdvancedForm="true"
    DisplayRecurrenceActionDialogOnMove="true"
    EnableDatePicker="False"
    EnableDescriptionField="True"
    DataSourceID="SqlDataSourceEvents"
    DataKeyField="evtID"
    DataStartField="evtStartTime"
    DataEndField="evtEndTime"
    DataSubjectField="evtName"
    DataDescriptionField="evtDescription"
    DataReminderField="evtReminder"
    DataRecurrenceField="evtRecurrenceRule"
    DataRecurrenceParentKeyField="evtRecurrenceParentID"
    OnAppointmentDelete="RadSchedulerCalendarEvents_AppointmentDelete"
    OnAppointmentUpdate="RadSchedulerCalendarEvents_AppointmentUpdate"
    OnAppointmentInsert="RadSchedulerCalendarEvents_AppointmentInsert"
    OnClientAppointmentInserting="RadSchedulerCalendarEvents_OnClientAppointmentInserting"
    OnClientAppointmentEditing="RadSchedulerCalendarEvents_OnClientAppointmentEditing"
    OnClientAppointmentMoveEnd="RadSchedulerCalendarEvents_OnClientAppointmentMoveEnd"
    OnClientAppointmentResizeEnd="RadSchedulerCalendarEvents_OnClientAppointmentResizeEnd"
    OverflowBehavior="Scroll"
    >
    <AdvancedForm Modal="true" />
    <TimeSlotContextMenus>
        <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerTimeSlotContextMenu">
            <Items>
                <telerik:RadMenuItem Text="New Event" ImageUrl="/Images/Icons16x16/calendar.png" Postback="false" NavigateUrl="javascript: SwitchToCalendarEventInsertForm(null, null);" />
                <%--<telerik:RadMenuItem Text="New Recurring Event" ImageUrl="/Images/Icons16x16/recurring-event.png" NavigateUrl="javascript: alert('upmp');" />--%>
                <%--<telerik:RadMenuItem IsSeparator="true" />--%>
                <%--<telerik:RadMenuItem Text="Group by Calendar" Value="EnableGrouping" />--%>
                <telerik:RadMenuItem IsSeparator="true" />
                <telerik:RadMenuItem Text="Go to today" Value="CommandGoToToday" />
            </Items>
        </telerik:RadSchedulerContextMenu>
    </TimeSlotContextMenus>
    <AppointmentContextMenuSettings EnableDefault="true" />
    <Localization
        ContextMenuAddAppointment="New Event"
        ContextMenuAddRecurringAppointment="New Recurring Event"
        ContextMenuEdit="Edit Event" />
</telerik:RadScheduler>
Jesse Lawler
Top achievements
Rank 1
 answered on 20 Dec 2010
1 answer
86 views
I have a popup modal window that displays a youtube link that fits inside the window horizontally, yet there are horizontal scroll bars visible.  How do I disable these scrollbars without making the windows much wider than it actually needs to be
Shinu
Top achievements
Rank 2
 answered on 20 Dec 2010
1 answer
187 views
My heading describes what i want. I am using rad tabs and radmultipages . I want that when the user clicks on the tab e the pageview loads after clickin on the tab , currently the pageviews load when the page loads which increases the page_load time .
Shinu
Top achievements
Rank 2
 answered on 20 Dec 2010
Narrow your results
Selected tags
Tags
+124 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?