Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
156 views
Hello,

I'm new to this forum.  I see the Drag-and-Drop Row demo, I really like it.  I have a similar scenario where my first radgrid (doctorRadgrid) displays all the doctor names (using Linq binds from code behind), and the second radgrid (scheduleRadgrid) contains only doctor names that dragged from the first radgrid.  However, when a user drags a doctor name from doctorRadgrid to scheduleRadgrid, I don't want that doctor name deleted from the doctorRadgrid.  I just want it copy to the scheduleRadgrid.  Is that possible?  Can you please provide sample code, I really aprreciated your help.

Thanks in advance!
Maria Ilieva
Telerik team
 answered on 06 Apr 2011
1 answer
41 views
Hi, as per http://demos.telerik.com/aspnet-ajax/editor/examples/filemanagers/defaultcs.aspx, I have added the line to the web.config file and the entry for Document Manager to the Default.aspx file.

When I click the Document Manager button in the text editor, I always get nothing to choose, i.e., 'Page 1 of 0. Items 1 to 0 of 0'.

The RadEditor Default.aspx file is at e.g. F:/x/xx/xxx/xxxx/RadEditor.Net/Default.aspx and the documents folder is e.g. F:/Assets/Documents - what should I be entering in the line below?

Many thanks

<DocumentManager ViewPaths="~/Assets/Documents" UploadPaths="~/Assets/Documents" DeletePaths="Assets/Documents" />
Dobromir
Telerik team
 answered on 06 Apr 2011
1 answer
116 views

My structure is this... 
    MasterPage  >> Content Page which includes a RadGrid >> In the RadGrid, I am using a UserControl (ascx) for the insert item.

Masterpage has ScriptManager and RadAjaxManager
Contentpage has RadAjaxProxy
UserControl has RadAjaxProxy

The UserControl is basically a table with labels, Radtextboxes and Radcomboboxes.
My usercontrol has this declaration:
----------------------------------------------------------------------------

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server" >
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="uxDirectory">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="uxProjectName" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>

</telerik:RadAjaxManagerProxy>
-------------------------------------------------------------------------------
uxDirectory and uxProjectName are both RadComboBoxes

The problem I am facing is when a value is changed in the uxDirectory combobox all the  "Load" events based on other controls are being fired.  It is my understanding that since I have autopostback="true" on the uxDirectory, and based upon the declaration above, that only the uxProjectName control will Load.   However, all my controls are reloading.  This is wiping out the values saved, etc.  How can I perform a Ajax postback for a specific control within a ASCX Usercontrol?

-DB

Maria Ilieva
Telerik team
 answered on 06 Apr 2011
3 answers
249 views
All,

I am trying to do an insert/update of a numeric value. I have identical code in another control working just fine. All attempts to insert or update result in OriginalAmount being null. I have tried using a bound column and a numeric column with the same failure.

Any and all help is greatly appreciated. I cannot understand how this was working before and now does not, and another control with identical grid and code is fine.

Thanks,
Bruce

<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
    AllowSorting="True" AutoGenerateColumns="False" GridLines="None" OnInsertCommand="RadGrid1_InsertCommand"
    OnItemCommand="RadGrid1_ItemCommand" OnNeedDataSource="RadGrid1_NeedDataSource"
    OnUpdateCommand="RadGrid1_UpdateCommand" OnItemDataBound="RadGrid1_ItemDataBound"
    OnItemCreated="RadGrid1_ItemCreated" Width="100%">
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
    </HeaderContextMenu>
    <MasterTableView AllowMultiColumnSorting="True" CommandItemDisplay="Top" DataKeyNames="ID,OriginalAmount"
        CommandItemSettings-AddNewRecordText="Add new payment or credit"
        ClientDataKeyNames="ID" Font-Size="Smaller">
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
        <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column"
                ButtonType="PushButton">
                <ItemStyle Font-Size="Smaller" Width="10%" />
            </telerik:GridEditCommandColumn>
            <telerik:GridButtonColumn CommandName="Rollback" ConfirmText="Are you sure you want to roll back the application of this payment/credit?"
                ConfirmTitle="Rollback?" FilterControlAltText="Filter Rollback column" Text="Rollback"
                UniqueName="Rollback" ButtonType="PushButton">
            </telerik:GridButtonColumn>
            <telerik:GridButtonColumn CommandName="Apply"
                FilterControlAltText="Filter Apply column" Text="Apply"
                UniqueName="Apply" ButtonType="PushButton">
            </telerik:GridButtonColumn>
            <telerik:GridButtonColumn CommandName="ViewApplication"
                FilterControlAltText="Filter View Application column" Text="View"
                UniqueName="ViewApplication" ButtonType="PushButton">
            </telerik:GridButtonColumn>
            <telerik:GridButtonColumn CommandName="NSF"
                FilterControlAltText="Filter NSF column" Text="NSF"
                UniqueName="NSF" ButtonType="PushButton">
            </telerik:GridButtonColumn>
            <telerik:GridDateTimeColumn DataField="CreditDate" DataType="System.DateTime" FilterControlAltText="Filter CreditDate column"
                HeaderText="Credit Date" UniqueName="CreditDate" DataFormatString="{0:MM/dd/yyyy}">
            </telerik:GridDateTimeColumn>
            <telerik:GridTemplateColumn DataField="ActivityTypeID" FilterControlAltText="Filter ActivityType column"
                HeaderText="Type" UniqueName="ActivityType">
                <EditItemTemplate>
                    <telerik:RadComboBox ID="rcbActivityType" runat="server">
                    </telerik:RadComboBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblActivityType" runat="server" Text='<%# Eval("ActivityTypeID") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="CreditIdentifier" FilterControlAltText="Filter Check Number column"
                HeaderText="Check Number" MaxLength="500" UniqueName="CreditIdentifier">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="OriginalAmount"
                FilterControlAltText="Filter OriginalAmount column"
                HeaderText="Original Amt." UniqueName="OriginalAmount"
                DataFormatString="{0:C2}">
            </telerik:GridBoundColumn>
 
            <telerik:GridNumericColumn DataField="RemainingAmount" DataType="System.Decimal"
                DecimalDigits="2" FilterControlAltText="Filter RemainingAmount column" HeaderText="Remaining Amt."
                NumericType="Currency" ReadOnly="True" UniqueName="RemainingAmount">
            </telerik:GridNumericColumn>
            <telerik:GridBoundColumn DataField="Notes" FilterControlAltText="Filter Notes column" ColumnEditorID="GridTextBoxColumnEditor1"
                HeaderText="Notes" MaxLength="500" UniqueName="Notes">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CreatedBy" FilterControlAltText="Filter CreatedBy column"
                HeaderText="Created By" MaxLength="50" ReadOnly="True"
                UniqueName="CreatedBy" Display="False">
            </telerik:GridBoundColumn>
 
 
        </Columns>
        <EditFormSettings>
            <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn column" ButtonType="PushButton">
            </EditColumn>
        </EditFormSettings>
        <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>

protected void RadGrid1_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
    LaundryLogicDAL.ARCredits oARC = new LaundryLogicDAL.ARCredits();
 
    try
    {
        oARC.es.Connection.Name = "NAS";
        oARC.es.Connection.SqlAccessType = esSqlAccessType.DynamicSQL;
 
        GridEditableItem editedItem = e.Item as GridEditableItem;
        GridEditManager editMan = editedItem.EditManager;
 
        int iID = (int)editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["ID"];
 
        DateTime dteCreditDate = DateTime.Parse((editMan.GetColumnEditor("CreditDate") as GridDateTimeColumnEditor).Text);
        int iActivityTypeID = Convert.ToInt16((editedItem["ActivityType"].FindControl("rcbActivityType") as RadComboBox).SelectedValue);
        decimal dOriginalAmount = CurrencyToDecimal((editMan.GetColumnEditor("OriginalAmount") as GridTextBoxColumnEditor).Text);
        string sNotes = (editMan.GetColumnEditor("Notes") as GridTextBoxColumnEditor).Text;
        string sCreditIdentifier = (editMan.GetColumnEditor("CreditIdentifier") as GridTextBoxColumnEditor).Text;
 
        if (oARC.LoadByPrimaryKey(iID))
        {
            oARC.CreditDate = dteCreditDate;
            oARC.ActivityTypeID = iActivityTypeID;
            oARC.CreditIdentifier = sCreditIdentifier;
            oARC.OriginalAmount = dOriginalAmount;
            oARC.Notes = sNotes;
            oARC.Save();
        }
    }
    catch (Exception ex)
    {
        DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException(this, ex);
    }
    finally
    {
        oARC = null;
    }

Martin
Telerik team
 answered on 06 Apr 2011
2 answers
114 views
Hi guys

I've been customising the ToolsFIle.xml file successfully to reorder tools and toolbars.

When I try to use the ribbon feature by entering <tools name="MainToolbar" IsRibbon="true">, it makes no difference (despite the help at http://www.telerik.com/help/aspnet/editor/editoroffice2007ribbonbar.html).

Is this feature unavailable in the AJAX version of the text editor?

Neil
HWNeil
Top achievements
Rank 1
 answered on 06 Apr 2011
3 answers
151 views
How can I set imageurl for image column programatically?

Thanks, Patrick
Tsvetina
Telerik team
 answered on 06 Apr 2011
5 answers
409 views
Hi!

How can i activate the HoverStyle?, no matter what i do simple will not work
Anyone have a clue?

Thanks
JL

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
                <!-- content start -->
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="grdMain">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="grdMain" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                    </AjaxSettings>
                </telerik:RadAjaxManager>
                <telerik:RadGrid ID="grdMain" OnSortCommand="grdMain_SortCommand" OnPageIndexChanged="grdMain_PageIndexChanged"
                    Width="100%" OnPageSizeChanged="grdMain_PageSizeChanged" AllowSorting="True"
                    PageSize="20" AllowPaging="True" AllowMultiRowSelection="True" runat="server"
                    GridLines="None" Skin="Windows7" AutoGenerateColumns="true">
                    <MasterTableView Width="100%" Summary="RadGrid table"  />
                    <PagerStyle Mode="NextPrevAndNumeric" />                    
                    <ClientSettings AllowKeyboardNavigation="true" EnableRowHoverStyle="true">
                        <Selecting AllowRowSelect="true" />                        
                    </ClientSettings>
                </telerik:RadGrid>
                <!-- content end -->
Maria Ilieva
Telerik team
 answered on 06 Apr 2011
5 answers
71 views
Hello Telerik team,

I would like to ask if I can make this following scenario:

1. I have a textbox that's accepting sets of string (a Search box)
2. I have a button (Search button) that will be linked to the RadSpell. (Can this be done? If possible, please give me an assistance)
3. After clicking the Search box, the Radspell window should not be opened. (Is this possible, if yes, kindly teach me how)
4. Instead, the Radspell will get the nearest correct suggestion and display it on a page...

Example is attached for better understanding of my inquiry...

Thank You and Regards,

Anthony

 
Rumen
Telerik team
 answered on 06 Apr 2011
4 answers
114 views
First let me specify my environment, am using the ASP.net AJAX Q1 2011 35 controls in VS2010 with VB.net.

I am trying to bind a RadGrid to a dataset allowing it to autogenerate the columns, then set the format of the columns in code in the itemdatabound event.  I prefer this way because it allows me to just set header text and width without having to define every property of every column in code.  I also have a need to add a button to a column.  I am adding the button in the page_load event in the mastertableview and it shows up properly when the page loads, but when I click on the button the grid refreshes and the button disappears.  So first I need to be able to keep the button from disappearing, and second I'm not sure how I can put code in the button click event.

I would appreciate any help that anyone can provide.

Thanks.
Todd
Top achievements
Rank 1
Iron
 answered on 06 Apr 2011
4 answers
116 views

Hi,

I use pretty simple set of Editor. On IE8 and previous version of controls I could select text, make it italic, set background and foreground colors, after I upgrades to most recent one and installed IE9 something has changed. I can do all I could do before if I switch into IE7 compatibility mode, when I'm in IE8, IE8 and FF4 Editor doesn't let italic happen: no change in editor no button gets toggled.

There is a hierarchy of control that loaded dynamically and editor is one of them.

Also 2 related questions:
1)JS below has issue that was toggling very interesting flickering on IE8 with previous versions of controls, haven't tested yet with current version and IE9 if also happens

2)when a page that loads dynamic controls is loaded first time and inside some of those controls there is Editor or TreeList (haven't checked other controls) - the appearance of controls is broken, feels like they didn't have a chance to recalculate their layout using JS. When I navigate away and come back - view is ok. I have made a lot of css chnages to site, so if I will experience this behaviour I will attach screenshot

here is my Editor:

<telerik:RadEditor ID="radEditor" runat="server" EditModes="Design" Skin="Default"
          OnClientSubmit="OnClientSubmit" OnClientLoad="OnClientLoad" StripFormattingOnPaste="AllExceptNewLines"
          StripFormattingOptions="AllExceptNewLines" Style="position: relative; right: 1px;"
          Width="100%" Height="150px" AutoResizeHeight="false">
          <Tools>
              <telerik:EditorToolGroup Tag="MainToolbar">
                  <telerik:EditorTool Name="Cut"></telerik:EditorTool>
                  <telerik:EditorTool Name="Copy" ShortCut="CTRL+C"></telerik:EditorTool>
                  <telerik:EditorTool Name="Paste" ShortCut="CTRL+V"></telerik:EditorTool>
              </telerik:EditorToolGroup>
              <telerik:EditorToolGroup>
                  <telerik:EditorTool Name="Bold" ShortCut="CTRL+B"></telerik:EditorTool>
                  <telerik:EditorTool Name="Italic" ShortCut="CTRL+I"></telerik:EditorTool>
                  <telerik:EditorTool Name="Underline" ShortCut="CTRL+U"></telerik:EditorTool>
                  <telerik:EditorTool Name="StrikeThrough"></telerik:EditorTool>
                  <telerik:EditorSeparator />
              </telerik:EditorToolGroup>
              <telerik:EditorToolGroup>
                  <telerik:EditorSplitButton Name="ForeColor">
                  </telerik:EditorSplitButton>
                  <telerik:EditorSplitButton Name="BackColor">
                  </telerik:EditorSplitButton>
              </telerik:EditorToolGroup>
          </Tools>
          <Content>
          </Content>
      </telerik:RadEditor>

and JS:
function OnClientSubmit(editor) {
    // line below causes weird flickering effect on IE when rad editor is loaded first time and navigated away
    //editor.fire("FormatStripper", { value: "AllExceptNewLines" });
}
  
function OnClientLoad(editor, args) {
    var style = editor.get_contentArea().style;
    style.backgroundImage = "none";
    style.backgroundColor = "e1e2dc";
    style.color = "#000";
    style.fontFamily = "Verdana";
    style.fontSize = 11 + "px";
}
Rumen
Telerik team
 answered on 06 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
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
Bronze
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?