Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
386 views
I have been looking around but have not found anyone with my same situation. I am using a control in an edit template inside a radgrid. I have a RadComboBox that on selection populates a panel with custom controls based on the combobox selection. After this or any other post back button is used the grid no longer posts back or functions. This also includes the other text boxes inside that same control. I was thinking this might have something to do with the viewstate but changing that around has no fixed the problem. This may just be something quick that I am missing. Any help would be much appreciated.

<asp:Content ID="conMain" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">
        <script type="text/javascript">
            function openUserAdmin() {
                var oManager = window.radopen("User.aspx", null)
                oManager = $telerik.toWindow(oManager); // intellisense
                oManager.setSize(520, 600); //Width, Height
                oManager.center(); //Centers on Screen
                oManager.set_visibleStatusbar(false); //Bottom Status Hidden
                oManager.set_modal(true); //Makes window Modal
                oManager.set_reloadOnShow(true); //Reloads the page everytime its shown
                oManager.set_destroyOnClose(true); // destroys the window on close
                oManager.SetActive(); // Sets window as active element
                return false;
            }
        </script>
    </telerik:RadScriptBlock>
    <telerik:RadScriptBlock runat="server" ID="RadScriptBlock2">
        <script type="text/javascript">
            function openBusinessSegment() {
                var oManager = window.radopen("BusinessSegment.aspx", null)
                oManager = $telerik.toWindow(oManager); // intellisense
                oManager.add_close(gridInstallationRebind); // Rebinds the grid on close
                oManager.setSize(520, 600); //Width, Height
                oManager.center(); //Centers on Screen
                oManager.set_visibleStatusbar(false); //Bottom Status Hidden
                oManager.set_modal(true);
                oManager.set_reloadOnShow(true);
                oManager.set_destroyOnClose(true);
                oManager.SetActive();
                return false;
            }
        </script>
    </telerik:RadScriptBlock>
    <telerik:RadScriptBlock runat="server" ID="rsbGridRebind">
        <script type="text/javascript">
            function gridInstallationRebind() {
                var grd = $find("<%=RadGrid1.ClientID %>"); // Finds the grid
                grd = $telerik.toGrid(grd); // intellisense
                mtv = grd.get_masterTableView(); // finds the master table
                mtv.rebind(); // rebinds the data
            }
        </script>
    </telerik:RadScriptBlock>
    <%--Removable: For javscript telerik intellisense. Comment before running--%>
    <%--<telerik:radscriptmanager runat="server" id="rsm1" />--%>
    <%--End Comment Area--%>
    <telerik:RadWindowManager runat="server" ID="rwmPopUps" Animation="Fade" IconUrl="/Images/admin.png" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <div>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
        <telerik:RadGrid runat="server" ID="RadGrid1" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" Width="100%" ShowStatusBar="True" GridLines="None"
            OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCommand="RadGrid1_ItemCommand"
            OnItemDataBound="RadGrid1_ItemDataBound" PageSize="15" EnableViewState="true" ViewStateMode="Inherit">
            <PagerStyle Mode="NumericPages" AlwaysVisible="true" />
            <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="ID" CommandItemSettings-AddNewRecordText="Add A New Installation"
                AllowSorting="True" ExpandCollapseColumn-ButtonType="SpriteButton" EditFormSettings-EditFormType="Template"
                CommandItemStyle-VerticalAlign="Middle" EnableViewState="true" ViewStateMode="Inherit">
                <CommandItemSettings AddNewRecordText="Add A New Installation"></CommandItemSettings>
                <CommandItemTemplate>
                    <div style="padding: 6px 2px 0px 2px;">
                        <div style="float: left; padding: 0px 2px 5px 2px;">
                            <telerik:RadButton runat="server" ID="btnNewInstallation" Text="Add New Installation"
                                CommandName="InitInsert" />
                        </div>
                        <div style="float: left; padding: 0px 2px 5px 2px;">
                            <telerik:RadButton runat="server" ID="btnBusinessSegment" Text="Business Segment Admin"
                                OnClientClicked="openBusinessSegment" AutoPostBack="false" />
                        </div>
                        <div style="float: left; padding: 0px 2px 5px 2px;">
                            <telerik:RadButton runat="server" ID="btnUserAdmin" Text="User Admin" OnClientClicked="openUserAdmin" AutoPostBack="false" />
                        </div>
                        <div style="float: left; padding: 0px 2px 5px 2px;">
                            <telerik:RadButton runat="server" ID="btnRefresh" Text="Refresh" CommandName="RebindGrid" AutoPostBack="false" />
                        </div>
                    </div>
                </CommandItemTemplate>
                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                </RowIndicatorColumn>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="Edit">
                        <HeaderStyle Width="3%" />
                    </telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn HeaderText="Customer Name" UniqueName="Customer" SortExpression="Customer"
                        DataField="Customer">
                        <HeaderStyle Width="35%" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn HeaderText="Customer Location" UniqueName="Location" SortExpression="Location"
                        DataField="Location">
                        <HeaderStyle Width="25%" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn HeaderText="Installation Description" UniqueName="Description"
                        SortExpression="InstallationDescription" DataField="InstallationDescription">
                        <HeaderStyle Width="35%" />
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="ImageButton"
                        ConfirmText="Delete Installation?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete">
                        <HeaderStyle Width="2%" />
                    </telerik:GridButtonColumn>
                </Columns>
                <EditFormSettings EditFormType="Template" >
                    <EditColumn ButtonType="ImageButton" />
                    <FormTemplate>
                        <div>
                            <bw:LocationDetail ID="bwLocationDetail" runat="server" />
                        </div>
                    </FormTemplate>
                </EditFormSettings>
                <PagerStyle AlwaysVisible="True" />
            </MasterTableView>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
        </telerik:RadGrid>
    </div>
</asp:Content>
James
Top achievements
Rank 1
 answered on 25 Jul 2012
2 answers
229 views
Hello , everyone, I've got a strange issue that just popped up after I upgraded to v.2012.2.607.40.

I've got a RadWindow that has VisibleOnPageLoad set to false. This RadWindow contains a few asp drop down lists, RadComboBoxes, and a RadButton. One of the drop down lists contains an item with the text and value set to "Trial". As long as this item is there, the RadWindow will partially render on page load (If I remove the Item, the window is hidden, as expected). If I change the text and value to anything else, the RadWindow is hidden as expected. I have even tried replacing the drop down list with a RadComboBox with an item that has the same "Trial" text/value and I see the same behavior. I've even gone so far as to remove all other controls from the RadWindow to narrow it down to this, so if I have this markup, the RadWindow is shown on page load even if VisibleOnPageLoad is false:

<telerik:RadWindow ID="radWindowNew" runat="server" Modal="true" Behaviors="Close"
    Skin="Windows7" Width="400" Height="350px">
    <ContentTemplate>
        <table border="0" cellpadding="2" width="100%">
            <tr>
                <td>
                    <asp:DropDownList runat="server" ID="ddlLeadSource">
                            <asp:ListItem>Trial</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
    </ContentTemplate>
</telerik:RadWindow>

However, if I change the text of the list item to anything else, the VisibleOnPageLoad setting is evaluated correctly and the RadWindow is hidden.

Is this a bug, or can someone Identify something I'm doing incorrectly?

Thanks!


Tony
Top achievements
Rank 1
 answered on 25 Jul 2012
1 answer
127 views
Hi,
When I try to ajaxified some controls in my RadDock, I've an error (see screen in attached file). This error occurs after executing "RadButtonChangeUrl_Click". 
Error : Microsoft JScript:Enable to get the "clvp" property value ; object null or undefined.

MasterPage :
<asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" >
</asp:ScriptManager>

Page.ascx :
<telerik:RadDockLayout ID="RadDockLayout1" Visible="false" runat="server">
    <telerik:RadDockZone ID="RadDockZone1" runat="server" Width="400px" BackColor="White" BorderStyle="None">
        <telerik:RadDock ID="RadDockGRIDisSCode" Visible="false" runat="server" Width="400px" DefaultCommands="ExpandCollapse">
                <ContentTemplate>
                    <telerik:RadAjaxPanel ID="RadAjaxLoadingPanel1" runat="server" Width="256px" Height="64px">
                            <asp:HyperLink ID="LabelUrlReporting" runat="server" Target="_blank"></asp:HyperLink>
                            <telerik:RadButton ID="RadButtonChangeUrl" runat="server" OnClick="RadButtonChangeUrl_Click">
                            </telerik:RadButton>
                            <telerik:RadTextBox ID="RadTextBoxNewUrl" Visible="false" runat="server" TextMode="SingleLine" EmptyMessage="-" Width="280px" />
                            <telerik:RadButton ID="RadButtonNewUrl" runat="server" Visible="false" OnClick="RadButtonNewUrl_Click">
                            </telerik:RadButton>
                            <telerik:RadButton ID="RadButtonCancelUrl" runat="server" Visible="false" OnClick="RadButtonCancelUrl_Click">
                            </telerik:RadButton>
                    </telerik:RadAjaxPanel>
                </ContentTemplate>
        </telerik:RadDock>
    </telerik:RadDockZone>
</telerik:RadDockLayout>

Page ascx.cs :
public void CreateRadDockGRIDisSCode(GridDataItem _SelectedItem)
{
    RadDockLayout1.Visible = true;
    RadDockGRIDisSCode.Visible = true;
    LabelUrlReporting.Text = "MyUrl";
    LabelUrlReporting.NavigateUrl = "http://www.myurl.com";
}
 
 public void RadButtonChangeUrl_Click(object sender, EventArgs e)
{
    LabelUrlReporting.Visible = false;
    RadButtonChangeUrl.Visible = false;
 
    RadTextBoxNewUrl.Visible = true;
    RadTextBoxNewUrl.Text = LabelUrlReporting.Text;
    RadButtonCancelUrl.Text = "Cancel";
    RadButtonCancelUrl.Visible = true;
   
    RadButtonNewUrl.Text = "OK";
    RadButtonNewUrl.Visible = true;
}
 
public void RadButtonCancelUrl_Click(object sender, EventArgs e)
{
    LabelUrlReporting.Visible = true;
    RadButtonChangeUrl.Visible = true;
    RadTextBoxNewUrl.Visible = false;
    RadButtonCancelUrl.Visible = false;
    RadButtonNewUrl.Visible = false;
}
 
public void RadButtonNewUrl_Click(object sender, EventArgs e)
{
    LabelUrlReporting.Visible = true;
    RadButtonChangeUrl.Visible = true;
    RadTextBoxNewUrl.Visible = false;
    RadButtonCancelUrl.Visible = false;
    RadButtonNewUrl.Visible = false;
    LabelUrlReporting.NavigateUrl = RadTextBoxNewUrl.Text;
    LabelUrlReporting.Text = RadTextBoxNewUrl.Text;
}

Thanks .
Maria Ilieva
Telerik team
 answered on 25 Jul 2012
3 answers
161 views
I have used a Telerik Grid control with Filter option. One of the column has the edit link. When I click on the Edit link, it works fine
When I use the Filter It results in filtered list. when I click on the Edit link on the filtered list, it results in error, like ID not found.
How do I fix this issue
Sweety
Top achievements
Rank 1
 answered on 25 Jul 2012
1 answer
86 views
Similar to this thread which has been fixed, my problem appears in Chrome when the content area style is set in OnClientLoad.

Open notepad and create a document as follows

Line 1
Line 2

Line 4

Set the font programatically within OnClientLoad (we don't want to set it in the .css as we would like the font to be customizable per-user).

function OnClientLoad(editor) {
    var style = editor.get_contentArea().style;
    style.fontFamily = "Tahoma";
}

Paste the text into the editor and the line breaks are doubled.
Dobromir
Telerik team
 answered on 25 Jul 2012
3 answers
213 views
Hi

This is my requirement

I want to disable the DownloadFile option  if i click on folder and once i select the folder if no records are there in grid that time also it should disable downloadFile option.
If click on file DownloadFile option shuld be enable
All these things happen rad gridview context menu shown and file or folder click.
Note:DownloadFile i added custom button.

i have done like this for if no records are there to display in gridview.But in case of if click on folder i want to disable download option and if i click on file download file option shuld be enable.

 

 

function OnClientShown(oMenu, args) {

 

 

 

var iCount =0;

 

 

 

var deleteMenuItem = oMenu.findItemByValue("Delete");

 

 

 

var radExplorer = $find("<%# radFileExplorer.ClientID %>");

 

 

 

var getGrid = radExplorer.get_grid();

 

 

 

var table = getGrid.get_masterTableView();

 

 

 

var rows = table.get_dataItems();

 

 

 

var downloadFileItem = oMenu.findItemByValue("Download_File");

 

 

 

if (rows.length == 0) {

 

downloadFileItem.set_enabled(

 

false);

 

 

 

 

deleteMenuItem.set_enabled(

 

true);

 

}



Please can u solve this prob.

Thanks
Bhavani.
Dobromir
Telerik team
 answered on 25 Jul 2012
2 answers
165 views
Asp. Net Versión: Aspnet 2.0
OS:  Windows 7, 
Navegador: chrome 18.0.1025.152 m
Versión Telerik: ASP.NET AJAX Q2 2010
Lenguaje de Programación VB. NET 2008


I am experiencing a problem using RadGrid and RadWindow when property is set AllowPaging = "True", the paging controls do not work:

a) Click the page numbers in the RadWindow is closed
b) Click on Next Page displays the following error: Argument for repayment orinvalid callback. Event validation is enabled using <pagesenableEventValidation="true"/>


Thanks for your help 
Olivier
Top achievements
Rank 2
 answered on 25 Jul 2012
3 answers
125 views

I have grid on my page located in div with id "Lists":

<div id="Lists"
    <telerik:RadGrid runat="server" ID="mygrid"
    <ClientSettings> 
        <ClientEvents OnGridCreated="document_Grid_OnGridCreated" /> 
    </ClientSettings
    </telerik:RadGrid
</div>
<div id="ParentList">
</div>

when grid is created documentGrid variable is set with that grid:

<script type="text/javascript" >
    var documentGrid = null;
    function document_Grid_OnGridCreated(sender, args) {
        documentGrid = sender;
    }
</script>

to this point everything seems to be fine, I can call following code:
function updateDocumentGrid(){
    documentGrid.get_masterTableView().rebind();
}

after I move Lists div inside another div with id ParentList
global variable window.documentGrid is null.

is there any way to prevent variable documentGrid from beeing set to null?
Kostadin
Telerik team
 answered on 25 Jul 2012
3 answers
141 views
Dear All,

i am developing product in asp.net using c sharp and I have listbox in my page and i have list items in Listbox which is added dynamically
here i need to insert value against partcular listbox item after inserting value corresponding listbox item should be disable.how to implement this..

Thanks in advance....
Nencho
Telerik team
 answered on 25 Jul 2012
5 answers
315 views
I have a problem where the DateInput and DatePopupButton follows the screen if I scroll down.

I have solved the scrolling problem for DatePopupButton with:

.rcSingle .rcCalPopup
{
    position:static !important;
}

But the DateInput control still scolls with the screen.


This helped me with some the problem: http://www.telerik.com/community/forums/aspnet-ajax/calendar/alignment-problem-w-raddatepicker.aspx 
Kostadin
Telerik team
 answered on 25 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?