Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
102 views
Hello,

Is it possible to change the image of the header of a radWindow and to use an own one?

I guess the image is shown depending on the used skin.

Thank you in advance.
Patxi
Top achievements
Rank 1
 answered on 09 Mar 2009
1 answer
97 views
Hi.

I'm using a RadWindow to give the user a modal dialog where he can enter some additional data before an action takes place. However, I'm having an issue stiching the whole thing together. The user clicks a RadToolBarButton to activate the dialog. I need a post-back to take place, as the page shown in the RadWindow needs something set in Page.Session to work properly.

First, I attempted doing everything server-side. It works, but the code becomes very "dirty". I'll explain. When the user clicks the RadToolBarButton, I set these two attributes on the RadWindow:

Window.VisibleOnPageLoad = true
Window.Visible = true

It causes the Window to show up, and since I've set the Session during the postback, everything works like a charm. However, *every* possible action the user could take after the RadWindow has been shown, will show the window again. The only way I found to remedy that, was to put the following call in every possible place a postback could take place on the page. Suffice to say, it's not pretty:

private void HideWindow() 
    Window.VisibleOnPageLoad = false
    Window.Visible = false

What if I add something new that does a postback, and I forget to include this code piece? It's going to cause it to pop up on every page load again. It's not sustainable.

My other attempt was to try to mix server and client side. After all, I only need the server to set a Session variable. I placed the RadWindow inside a RadWindowManager, and called the following code in the OnClientButtonClicking event:

var man = GetRadWindowManager(); 
man.open(null"Window"); 

It shows the window as it should, but the post-back caused by the click to the button causes the page to reload (naturally), and after the reload, the window is gone. Also, even if I got the postback to take place without the page actually reloading, I'm afraid the page in the Window could load before the postback has taken effect, leaving the window page without the proper Session variable set. Quite honestly, I'm feeling a little stumped. What's the proper solution to this?


Georgi Tunev
Telerik team
 answered on 09 Mar 2009
3 answers
285 views
Hi,

I have the following scenario.
A MasterTable shows Items - for each item subitems are available.
The subitems are editable - the masteritems not.

So I have my grid with the items - when I click on + I see the subitems.
When I click on Edit with the subitems I get the popup.
BUT - whatever I do - this popup is not modal!!
<DetailTables> 
    <telerik:GridTableView DataSourceID="sqdsStringsLoc" AutoGenerateColumns="False" DataKeyNames="StringsID,LanguageCode" AllowAutomaticUpdates="true" AllowSorting="false" AllowFilteringByColumn="false" Width="100%" EditFormSettings-EditColumn-Visible="true" EditMode="PopUp">  
    <EditFormSettings PopUpSettings-Width="780px" EditFormType="Template" PopUpSettings-Modal="true" CaptionDataField="LanguageCode">  
    <FormTemplate> 
        <asp:Button ID="Button1" Text="Update" runat="server" CommandName="Update"></asp:Button>&nbsp;&nbsp;  
        <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> 
        <br /> 
        <telerik:RadEditor ToolsFile="/Images/MySetOfTools.xml" Skin="Office2007" Language="de-DE" ID="edTheString1" runat="server" Width="760px" Height="150px" Content='<%# Bind("TheString") %>'>  
        </telerik:RadEditor> 
    </FormTemplate> 
    </EditFormSettings> 

By the way - the Rest works like it should. Only the popup is not showing modal.

Regards

Manfred
Yavor
Telerik team
 answered on 09 Mar 2009
3 answers
438 views
I have a radgrid that uses a rad context menu.  The rad grid itself is controlled through a rad ajax manager and it uses the automatic inserts, updates, and deletes.  When the page loads, the context menu works fine.  But if I insert a new record, edit a record, delete a record, sort the grid, or refresh the grid with the automatic refresh button, the context menu disappears and when I right click, I get the normal IE7 popup dialog.

Here's the code:

    <telerik:RadCodeBlock ID="rcb" runat="server" > 
    <script type="text/javascript" language="javascript" > 
        var rgFunding = null 
        var rcmFunding = null 
        var motype = null 
          
        function pageLoad() {  
            rgFunding = $find('<%= rgFunding.ClientID %>')  
            rcmFunding = $find('<%= rcmFunding.ClientID %>');  
            motype = $find('<%= motype.ClientID %>');  
        }  
        function fundingClientClicked(sender, args) {  
            var itemLabel = args.get_item().get_value();  
            switch (itemLabel) {  
                case "Select All":  
                    rgFunding.get_masterTableView().selectAllItems();  
                    break;  
                case "Clear All":  
                    rgFunding.get_masterTableView().clearSelectedItems();  
                    break;  
                case "Move":  
                    var selectedRows = rgFunding.get_masterTableView().get_selectedItems();  
                    for (i = 0; i < selectedRows.length; i++) {  
                        iID = selectedRows[i].getDataKeyValue("iID");  
                        bIsFlagselectedRows[i].getDataKeyValue("bIsFlag");  
                        PageMethods.MoveFunding(iID, bIsFlag == "True" ? false : true, Repaint, HandleError);  
                    }  
                    break;  
            }  
        }  
        function Repaint(results) {  
            location.reload(true);  
        }  
    </script> 
    </telerik:RadCodeBlock> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"   
        DefaultLoadingPanelID="RadAjaxLoadingPanel1">  
        <ajaxsettings> 
            <telerik:AjaxSetting AjaxControlID="rgFunding">  
                <updatedcontrols> 
                    <telerik:AjaxUpdatedControl ControlID="rgFunding" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </updatedcontrols> 
            </telerik:AjaxSetting> 
        </ajaxsettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
        Width="75px" Transparency="25" > 
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
            style="border: 0px;" /> 
    </telerik:RadAjaxLoadingPanel> 
    <telerik:RadContextMenu ID="rcmFunding" runat="server"   
        Skin="WebBlue" OnClientItemClicked="fundingClientClicked"   
        style="top: 213px; left: 317px" > 
        <Targets> 
            <telerik:ContextMenuControlTarget ControlID="rgFunding" /> 
        </Targets> 
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
    </telerik:RadContextMenu> 
    <asp:Label ID="lblFundingHeader" runat="server" CssClass="HeaderTag" /> 
    <telerik:RadGrid ID="rgFunding" runat="server" Skin="WebBlue"   
        AutoGenerateColumns="False" GridLines="None" ShowFooter="True"   
        AllowSorting="True" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"   
        AllowAutomaticDeletes="true" DataSourceID="ldsFunding"   
        AllowMultiRowEdit="true" oncustomaggregate="rgFunding_CustomAggregate"   
        OnDataBound="rgFunding_DataBound" Width="1000px"   
        onitemdeleted="rgFunding_ItemDeleted" oniteminserted="rgFunding_ItemInserted"   
        onitemupdated="rgFunding_ItemUpdated" AllowMultiRowSelection="True"   
        onitemcreated="rgFunding_ItemCreated" > 
        <ClientSettings> 
            <Selecting AllowRowSelect="true" /> 
            <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="200px" /> 
        </ClientSettings> 
        <HeaderContextMenu Skin="WebBlue">  
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
        </HeaderContextMenu> 
        <MasterTableView DataSourceID="ldsFunding" CommandItemDisplay="Top" DataKeyNames="iID" ClientDataKeyNames="iID, bIsFlag" AutoGenerateColumns="false" EditMode="InPlace" > 
            <Columns> 
                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="Edit" ItemStyle-Width="25px" > 
                    <ItemStyle CssClass="editbutton" /> 
                </telerik:GridEditCommandColumn> 
                <telerik:GridBoundColumn DataField="iID" HeaderText="ID" ReadOnly="true" SortExpression="iID" UniqueName="iID" Visible="False" /> 
                <telerik:GridDateTimeColumn DataField="dtSettlement" ItemStyle-Width="55px" HeaderText="Settlement" SortExpression="dtSettlement" UniqueName="dtSettlement" DataFormatString="{0:d}" /> 
                <telerik:GridDateTimeColumn DataField="dtMaturity" ItemStyle-Width="55px" HeaderText="Maturity" SortExpression="dtMaturity" UniqueName="dtMaturity" DataFormatString="{0:d}" /> 
                <telerik:GridNumericColumn DataField="curAmount" ItemStyle-Width="55px" HeaderText="Amount" SortExpression="curAmount" UniqueName="curAmount" DataFormatString="{0:N3}" Aggregate="Sum" /> 
                <telerik:GridBoundColumn DataField="iNoOfDays" ReadOnly="true" ItemStyle-Width="45px" HeaderText="# of<br />Days" SortExpression="iNoOfDays" UniqueName="iNoOfDays" DataFormatString="{0:0}" Aggregate="Custom" /> 
                <telerik:GridBoundColumn DataField="sSource" ItemStyle-Width="55px" HeaderText="Source" SortExpression="sSource" UniqueName="sSource" /> 
                <telerik:GridNumericColumn DataField="nCost" ItemStyle-Width="45px" HeaderText="Cost" SortExpression="nCost" UniqueName="nCost" DataFormatString="{0:N3}" Aggregate="Custom" /> 
                <telerik:GridButtonColumn ConfirmText="Delete this Funding?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">  
                    <ItemStyle HorizontalAlign="Center" CssClass="deletebutton" /> 
                </telerik:GridButtonColumn> 
            </Columns> 
        </MasterTableView> 
        <FilterMenu Skin="WebBlue">  
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
        </FilterMenu> 
    </telerik:RadGrid> 
    <asp:LinqDataSource ID="ldsFunding" runat="server"   
        ContextTypeName="fhlb.debt.middletier.DAL.DebtDataContext" EnableInsert="true"   
        EnableDelete="true" EnableUpdate="true" TableName="Funding_Currents" 
        OnInserting="ldsFunding_Inserting" OnDeleting="ldsFunding_Deleting"   
        OnUpdating="ldsFunding_Updating" oninserted="ldsFunding_Inserted"   
        onupdated="ldsFunding_Updated" Where="bIsFlag == @ bIsFlag&amp;&amp; dtBOM == @dtBOM" > 
        <WhereParameters> 
            <asp:QueryStringParameter Name="bIsFlag" QueryStringField="Flag" DefaultValue="false" Type="Boolean" /> 
            <asp:QueryStringParameter Name="dtBOM" QueryStringField="BOM" Type="DateTime" /> 
        </WhereParameters> 
    </asp:LinqDataSource> 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"   
        style="font-weight: 700">  
    </telerik:RadWindowManager> 
 
 
        protected void Page_Load(object sender, EventArgs e)  
        {  
            LoadFormElements();  
        }  
 
 
        private void LoadFormElements()  
        {             
            lblFundingHeader.Text = "Funding";  
            rcmFunding.Items.Clear();  
 
 
            RadMenuItem rmiMove = new RadMenuItem();  
            rmiMove.Text = "Move to " + (this.bIsFlag ? "Yes" : "No");  
            rmiMove.Value = "Move";  
              
            rmiMove.Attributes.Add("motype", (this.bIsFlag ? "Yes" : "No"));  
            rmiMove.PostBack = true;  
            RadMenuItem rmiSelectAll = new RadMenuItem();  
            rmiSelectAll.Text = "Select All";  
            rmiSelectAll.Value = "Select All";  
            RadMenuItem rmiClearAll = new RadMenuItem();  
            rmiClearAll.Text = "Clear All";  
            rmiClearAll.Value = "Clear All";  
            rcmFunding.Items.Add(rmiMove);  
            rcmFunding.Items.Add(rmiSelectAll);  
            rcmFunding.Items.Add(rmiClearAll);  
        }  
 
 
        [WebMethod]  
        public static void MoveFunding(string sID, Boolean bIsFlag)  
        {  
            Funding.MoveFunding(Convert.ToInt32(sID), bIsFlag);  
        }  
 

Now the first thing I tried to fix it was to define the radcontextmenu items in the aspx page, but that netted the same results.

Any ideas?
Brian
Top achievements
Rank 1
 answered on 09 Mar 2009
1 answer
151 views

Hi,

I'm trying to integrate RADGrid control in a ASP.NET Dynamic Data Entities Website and I'm getting the following JAVASCRIPT error when I enable column filtering. The filtering does not work after this error is encountered. I have used sample applications that you provided at http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-and-dynamicdata-entity-web-site.aspx

Error:
"AutoGenerateWhereClause Cannot be true if Where is defined. "

Can you please provide me some pointers on how to enable filtering for the RADGrid in a Dynamic Data Entities WebSite?

 

Thanks

Mahipal

Nikolay Rusev
Telerik team
 answered on 09 Mar 2009
1 answer
100 views
Hello all,


I have a rad grid control which contain a view link to open a popup window using javascript.
But i can't set a opacity to rad menu control which is in user control to dim a background window when opening a popup window.
Please give me solution urgentally.

Regards,
Apeksha
Paul
Telerik team
 answered on 09 Mar 2009
1 answer
99 views
Hi All,
I'm using Asp.net Ajax grid but i'm facing problem to apply style sheet to the grid. Can any body help me to apply style sheet to the grid so that entire datagrid style same!!
I have template columns in the grid in which I added Textbox in Item Template . Is style sheet  applied to Text box also?

Thanks & Regards,
Sandeep.
Daniel
Telerik team
 answered on 09 Mar 2009
4 answers
116 views
Found a bug involving image alignment. There are issues with both FireFox and IE, but they happen slightly differently.

In FireFox:
  1. Go here: http://demos.telerik.com/ASPNET/Prometheus/Editor/Examples/SaveInExternalFile/DefaultCS.aspx
  2. Add an image
  3. Go into image properties and set it to align left
  4. Click "save" (or just switch to source view and back)
  5. Alignment is lost

In IE:
  1. Go here: http://demos.telerik.com/ASPNET/Prometheus/Editor/Examples/SaveInExternalFile/DefaultCS.aspx
  2. Add an image
  3. Go into image properties and set it to align left
  4. Click "save"
  5. The alignment is saved as expected
  6. Go back into image properties and the alignment state is set to "none"
  7. This causes problems because the end user does not expect to have to re-set the alignment every time that update and image's properties.

Thanks,
John
Pyron Technologies
vandenbroele
Top achievements
Rank 1
 answered on 09 Mar 2009
2 answers
97 views
Hi Team,
    How to get the second tree view control while dropping a node from the 1st tree view control . I am using  the following method

function

onNodeDropping(sender, args)

I can able to get the 1st tree view control name as : 

 

var

draggedTree = sender._uniqueId;

I need to this to restrict user to drop nodes from second tree view control into the 1st tree view control .

Regards
Manoj

 

Manoj
Top achievements
Rank 1
 answered on 09 Mar 2009
3 answers
162 views
Hi,
I need to set the path of where the file is saved from a dropdownlist but I can't figure out where to set it.
<table> 
        <tr> 
            <td>Spara i mapp:</td> 
            <td><asp:DropDownList ID="dropDownListUploadFolder" runat="server"></asp:DropDownList></td
        </tr> 
        <tr> 
            <td>Hämta fil:</td> 
            <td><telerik:RadUpload ID="RadUpload1" runat="server" ControlObjectsVisibility="None" Width="300px" Localization-Select="Hämta" Skin="Vista"></telerik:RadUpload> </td> 
        </tr> 
        <tr> 
            <td></td
            <td><asp:Button ID="Button1" runat="server" Text="Ladda upp" OnClick="Button1_Click" /></td
        </tr> 
    </table> 

I have tried to set the RadUpload.TargetFolder in the Button1_Click event and also on Page_Load but it still not saves it there!

Help please! :)

Genady Sergeev
Telerik team
 answered on 09 Mar 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?