Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
135 views
I am using the RadGrid and the RadAjaxManager to Ajaxify my Grid.  I have paging enabled and when I click from Page 1 to Page 2, the loading panel appears properly.  However the problem comes when I click back to Page 1 or forward to Page 3 etc.  The LoadingPanel no longer appears....

any thought?
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true" UpdatePanelsRenderMode="Inline" DefaultLoadingPanelID="RadAjaxLoadingPanel1">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadGrid1">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="20" BackColor="White">  
    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border: 0px; position:relative; top:50%;" /> 
</telerik:RadAjaxLoadingPanel> 
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Telerik" /> 
Chase Florell
Top achievements
Rank 1
 answered on 08 Nov 2008
1 answer
134 views
I have a FormTemplate where the user enters a non-bound text message.  In the UpdateCommand code-behind, I want to capture the new message (txtBody) and combine it with the text of a GridBoundColumn value (body) from the owning grid.  In the UpdateCommand code-behind I cannot seem to access either value.  Can you point me in the right direction?  Thanks.

My aspx:

<radg:radgrid Skin="Monochrome" ID="rgData" runat="server"
            AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" BorderStyle="None" EnableAJAX="True" EnableAJAXLoadingTemplate="True"
            GridLines="None" Width="99%" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
            AllowAutomaticUpdates="False" OnUpdateCommand="GridUpdateCommand" OnItemCommand="rgData_ItemCommand">
            <MasterTableView CommandItemDisplay="Bottom" PageSize="10">
                <PagerStyle Mode="NextPrevAndNumeric" />
                <EditFormSettings EditFormType="Template">
                    <FormStyle CssClass="radEnabledCss_WebBlue" />
                    <FormTemplate>
                        <table style="width: 80%" align="center">
                            <tr>
                                <td style="width: 15%">Category:</td>
                                <td style="width: 85%">
                                    <div class='field'>
                                        <radC:RadComboBox ID="cmbCategory" runat="server" Skin="WebBlue" Width="180px"
                                         DataTextField="poptext" DataValueField="MSG_CATEGORY" SelectedValue='<%# Bind("MSG_CATEGORY") %>'>
                                         <Items>
                                                <radC:RadComboBoxItem Text="Select" Value="" />
                                                <radC:RadComboBoxItem Text="Question" Value="Question" />
                                                <radC:RadComboBoxItem Text="Request" Value="Request" />
                                                <radC:RadComboBoxItem Text="Comment" Value="Comment" />
                                                <radC:RadComboBoxItem Text="Other" Value="Other" />
                                            </Items>
                                        </radC:RadComboBox>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>Subject:</td>
                                <td>
                                    <asp:TextBox ID="txtSubject" runat="server" Width="375" Text='<%# Bind("SUBJECT") %>' />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:Label ID="lblMessage" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Message:" : "Reply:" %>' />
                                </td>
                            </tr>
                            <tr>
                            <td colspan="2">
                                <radI:RadTextBox ID="txtBody" runat="server"  TextMode="MultiLine" Width="500" Height="100" />
                            </td>
                            </tr>
                            <tr>
                                <td colspan="2" align="center">
                                    <asp:Button ID="btnInsert" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' />
                                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" CommandName="Cancel" />
                                </td>
                            </tr>
                        </table>
                    </FormTemplate>
                </EditFormSettings>
                <ExpandCollapseColumn Visible="False" Resizable="False">
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <RowIndicatorColumn Visible="False">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <Columns>
                    <radG:GridBoundColumn HeaderText="ID" UniqueName="pk" DataField="CPK_WEB_MESSAGES"
                        Display="False" ReadOnly="True" />
                    <radG:GridBoundColumn UniqueName="subject" DataField="subject" Visible="False" ReadOnly="False" />
                    <radG:GridBoundColumn UniqueName="body" DataField="body" Visible="False" ReadOnly="False" />
                    <radG:GridBoundColumn HeaderText="Message Source" UniqueName="SOURCE" DataField="web_message_source" HeaderButtonType="TextButton" />
                    <radG:GridBoundColumn HeaderText="Category" UniqueName="msg_category" DataField="MSG_CATEGORY" HeaderButtonType="TextButton" />
                    <radG:GridBoundColumn HeaderText="Date Sent" UniqueName="RECEIVED" DataField="received" HeaderButtonType="TextButton" />
                    <radG:GridBoundColumn HeaderText="Subject / Message" UniqueName="subjectbody" DataField="subjectbody" HeaderButtonType="TextButton" />
                    <radG:GridBoundColumn HeaderText="Status" UniqueName="msg_status" DataField="msg_status" HeaderButtonType="TextButton" />
                    <radG:GridButtonColumn ButtonType="PushButton" Text="Reply" CommandName="Edit" UniqueName="edit">
                    </radG:GridButtonColumn>
                    <radG:GridButtonColumn ButtonType="PushButton" Text="Delete" CommandName="Delete" UniqueName="delete">
                    </radG:GridButtonColumn>
                </Columns>
                <CommandItemTemplate>
                    <asp:Button ID="btnInsert" CommandName="InitInsert" ImageUrl="~/Images/add_small_off.png"
                        runat="server" Text="Add Message" />
                    <asp:Button ID="btnRefresh" CommandName="RebindGrid" ImageUrl="~/Images/refresh_list_off.png"
                        runat="server" Text="Refresh List" />
                </CommandItemTemplate>
            </MasterTableView>
            <HeaderStyle Font-Bold="True" Font-Size="14px" Font-Underline="False" HorizontalAlign="Left" />
            <ItemStyle Font-Size="12px" />
            <AlternatingItemStyle Font-Size="12px" />
        </radg:radgrid>

My code-behind:

protected void rgData_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)                   <---This does not work
        {
            TextBox txtBox = e.Item.FindControl("txtBody") as TextBox;
            Session["savedOldBody"] = txtBox.Text;
        }
    }

    protected void GridUpdateCommand(object source, Telerik.WebControls.GridCommandEventArgs e)
    {
        GridEditableItem editedItem = (GridEditableItem)e.Item;
        int iPKey = (int)editedItem.GetDataKeyValue("CPK_WEB_MESSAGES");

        Hashtable newValues = new Hashtable();
        e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);
        string subject = newValues["SUBJECT"].ToString().Trim();
        string body = newValues["txtBody"].ToString().Trim();                          <---This does not work
        string category = newValues["MSG_CATEGORY"].ToString().Trim();
        string orig_body = Session["savedOldBody"].ToString().Trim();            <---This does not work

        string strSqlCmd = "exec dbo.wa_Update_Web_Messages " + iPKey.ToString().Trim() + "," + category + ",'" + subject.Replace("'", "''") + "','" + body.Replace("'", "''") + "','Sent'";
        DataAccess sda = new DataAccess();
        sda.RunSqlCmd(strSqlCmd);
    }

Dan
Top achievements
Rank 2
 answered on 07 Nov 2008
5 answers
193 views
Hi,

Is there a way to make two or more checkboxes act like radio buttons. The beauty of checkboxes is that you can check and uncheck them, but not with radio buttons.

Thanks! Also, I am creating a survey website with all sorts of controls in it (checkboxes, radiobuttons, textboxes...),  can anyone suggest any radcontrols that should be an underlying container for these controls.

Have a great day!
Shaun Peet
Top achievements
Rank 2
 answered on 07 Nov 2008
7 answers
952 views
Hello,

I have a particular scenario where I need to retrieve the ComboBox Value through a Request.Form method.

For a standard ASP.NET dropdownlist control, the following code returns the selected item value:

Request.Form("DropDownID")

However, with the comboBox, I cannot get the value.  Upon finding the control Key, i see that there are two options:

"ComboBoxID_Input", which returns the Text Value and
"CombboBoxID_ClientState", which returns something like this:

"{"logEntries":[],"value":"1461","text":"5 Business Days","enabled":true}"

Is there a way to extract the value easily, without having to dissect the "clientState" string?

Thank you.
Jay
Top achievements
Rank 1
 answered on 07 Nov 2008
3 answers
147 views

localHost working fine but production server error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 1:  <%@ Master Language="VB" CodeFile="MainPage.master.vb" Inherits="MainPage" %>
Line 2: <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>Line 3:  <%@ Register Assembly="FlashControl" Namespace="Bewise.Web.UI.WebControls" TagPrefix="Bewise" %>
Line 4:  

Source File: /desarrollo/br/mgrp/es/MainPage.master    Line: 2

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Telerik.Web.UI' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Serrin
Top achievements
Rank 1
 answered on 07 Nov 2008
5 answers
432 views
My Group Headers look like this:

adType: Web Banner

adType: Van

adType: Map

adType: Graphic Design

adType: Experience Guide

adType: Community Profile

 I would like to remove the "adType:" (fieldname) and leave the rest of the text.

Also, how do I enable expand on click for these header rows?

Brett
Levi
Top achievements
Rank 1
 answered on 07 Nov 2008
4 answers
199 views
Hi

I have two situations with treeview:

1) I have a textbox where I enter an ID to search in a treeview. Sometimes, the textbox loses focus and I cannot insert nothing any more. The textbox is in the same window with treeview.

2) I have a searching operation using server code to  find and select the node I'm looking for. After that, server code calls a Javascript function to load detailed information in another window. This is working ok, however, I need to guarantee that selected node is visible and not outside of my window. It seems that "scrollIntoView" is the solution to this.
I try to add this code:

  var tree = $find("<%= RadTreeView1.ClientID %>");
  if (tree.get_selectedNode() != null)
  {
       tree.get_selectedNode().scrollIntoView();
   }

but I got an error: 'null' is null or not an object.
I'm calling my javascript function using scriptmanager.RegisterClientScriptBlock

Regards

Quim
Top achievements
Rank 1
 answered on 07 Nov 2008
1 answer
154 views
Hello,

I am using a RadCombobox in a Grid to store linkbuttons for command like edit, delete, reset password, etc...

I set the default text to "Select an Action..".  Some of the linkbuttons have confirm prompts that if the user selects 'cancel' the page does not postback.  However, when this happens, the text displayed changes from "Select an action...." to a string somewhat like "editresetpassworddelete".  These are the text of my link buttons.  How can I prevent this text from changing?

Thanks.

Jon
 <telerik:RadComboBox ID="RadComboBox_Commands" MarkFirstMatch="false" runat="server" OnClientSelectedIndexChanging="HandleIndexChanging" OnClientDropDownClosed="HandleClose" 
                                Width="210px" HighlightTemplatedItems="false"   
                                ShowToggleImage="True" Skin="Default" 
                                DropDownWidth="210px" AllowCustomText="false" EnableLoadOnDemand="false">  
                                
                                <ItemTemplate> 
                                   <div style="padding-bottom:5px;"><dadds:LinkButton ID="btnShowEdit" CommandName="ShowEdit" runat="server" Text="edit" Roles="Administrator, Manager" /></div>  
                                   <div style="padding-bottom:5px;"><dadds:LinkButton ID="btnResetPassword" CommandName="ResetPassword" runat="server" Text="reset password" Roles="Administrator, Manager, Operator" /></div>  
                                   <div style="padding-bottom:5px;"><dadds:LinkButton ID="btnDelete" CommandName="Delete" runat="server" Text="delete" Roles="Administrator, Manager" /></div>  
                                   <div style="padding-bottom:5px;"><dadds:LinkButton ID="btnExpirePassword" CommandName="ExpirePassword" runat="server" Text="expire password" Roles="Administrator" /></div>  
                                   <div style="padding-bottom:5px;"><dadds:LinkButton ID="btnClearPasswordHistory" CommandName="ClearPasswordHistory" runat="server" Text="clear password history" Roles="Administrator" /></div>     
                                </ItemTemplate> 
                                <Items> 
                                     <telerik:RadComboBoxItem Selected="True"></telerik:RadComboBoxItem>                                            
                                </Items> 
                            </telerik:RadComboBox> 

Jon (I.T. Agility Inc.)
Top achievements
Rank 1
 answered on 07 Nov 2008
1 answer
91 views
HI,

In the RADGrid we are using pagin option with mode as

NextPrevNumericAndAdvanced



Our customers actually want to have all records displayed in one page as one option.so we set the Page size to total number of records so that alll products display on a single page..

But still on the left side the it shows the Chane Pgae option with left and right arrows which are actually meaningless in this situation as there are no pages to move left or right..
is there a way we can remove the arrows in this case

Thanks
Bala
Daniel
Telerik team
 answered on 07 Nov 2008
1 answer
118 views
We have three fields in our layout that we are using the editor on... when we toggle full screen on the editor is not brought to the front. The editors not being toggled show on top of the other editor.

See screen shot for better explanation please.

Screen shot
Tervel
Telerik team
 answered on 07 Nov 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?