Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
79 views
hi
The
sudden
Editor is locked
No changes have not in the code editor
When I click a button in the editor
Goes to top page!
Please help
Rumen
Telerik team
 answered on 12 Jun 2012
2 answers
74 views
There were a few things i was trying to do.
First off, i have the following 1 line of code:

_bleh

.MemoEditor memoEditor = new _bleh.MemoEditor(__stuff__);  //modified for privacy of company.

                       
which calls the RadEditor.

I was looking through the code to see 1) where i can assign the class in the server side code as well as 2) Where do I, from the codebehind, set enabled = false? 

I was looking for some sort of attribute setter and getter for the constructed html, but i didnt see anything from my first glance.

 

 

William
Top achievements
Rank 1
 answered on 12 Jun 2012
2 answers
111 views
I added a custom drop down to my editor. I created the OnClientCommandExecuting function to handle what happens when someone selects an item in the drop down.

The problem is the event fires when I press enter inside the editor, which is causing the following code to throw an error:

function OnClientCommandExecuting(editor, args) {
 
        var name = args.get_commandName();
        var val = args.get_value();
 
        var info = val.split("::");
 
    }

Error:

val is undefined
(?)(editor=Object { __msdisposeindex=3, _element=div#RadEditor1.RadEditor, _clientStateFieldID="RadEditor1_ClientState", more...}, args=Object { _cancel=false, _commandName="EnterNewLine", _name="EnterNewLine"})TelerikAjax.aspx (line 23)
createCallback(c=Object { __msdisposeindex=3, _element=div#RadEditor1.RadEditor, _clientStateFieldID="RadEditor1_ClientState", more...}, d=Object { _cancel=false, _commandName="EnterNewLine", _name="EnterNewLine"})Teleri...90a9d4e (line 6)
raiseEvent(b="commandExecuting", c=Object { _cancel=false, _commandName="EnterNewLine", _name="EnterNewLine"})Core.js (line 766)
createCallback(a=Object { __msdisposeindex=3, _element=div#RadEditor1.RadEditor, _clientStateFieldID="RadEditor1_ClientState", more...}, d="raiseEvent", b=["commandExecuting", Object { _cancel=false, _commandName="EnterNewLine", _name="EnterNewLine"}])Teleri...90a9d4e (line 6)
_responseReceived(c="commandExecuting", d=Object { _cancel=false, _commandName="EnterNewLine", _name="EnterNewLine"})RadEditor.js (line 6416)
_executeCommandEvent(s="commandExecuting", u="EnterNewLine", j=Object { _cancel=false, _commandName="EnterNewLine", _name="EnterNewLine"})RadEditor.js (line 7382)
fire(m="EnterNewLine", j=undefined)RadEditor.js (line 7363)
_onKeyDown(t=keydown charCode=0, keyCode=13)RadEditor.js (line 7814)
(?)(h=keydown charCode=0, keyCode=13)RadEditor.js (line 7739)
[Break On This Error]  
 
Reload the page to get source for: http://localhost:56444/TelerikAjax.aspx
 
TelerikAjax.aspx (line 23)

Rumen
Telerik team
 answered on 12 Jun 2012
10 answers
260 views
First of all congratulation on the new 2011 Q2 release and introduction on new ImageEditor control. I understand this is just the beginning and I would like to know what is the roadmap for this control? Do we see new features such as image annotation coming soon?

Does this control support custom toolbar, as seen in RadEditor?
Rumen
Telerik team
 answered on 12 Jun 2012
3 answers
139 views
Hello All,

I am recently working on a problem where i need to create an area for customer to entering employees information, to start off there will be no information contained within the table. Then using the setup down below and some back end C# i want to populate the GridEditForm that also doesn't want to popup. I have been looking for some information on how to program in the back end or possibly java script, though i don't see this as a client side issue. this as i wish i could use an sql data source but to limit access and security we use web services where i get information in a data set which i want to manipulate then send it only once it has been completed.

There's pretty much no C# back end as of now, just a garbled mess of failed tests

ASP
<telerik:RadGrid ID="grdEmployee" GridLines="Horizontal" runat="server" AllowAutomaticDeletes="True"
                        AllowAutomaticInserts="True" PageSize="25" AllowAutomaticUpdates="True" AllowPaging="True"
                        AutoGenerateColumns="False" OnItemUpdated="grdEmployee_ItemUpdated" OnItemDeleted="grdEmployee_ItemDeleted"
                        OnItemInserted="grdEmployee_ItemInserted" OnItemCreated="grdEmployee_ItemCreated"
                        OnEditCommand="grdEmployee_OnEdit" OnNeedDataSource="grdEmployee_OnNeedDataSource">
                      
                        <PagerStyle Mode="NextPrevAndNumeric" />
                         
                        <MasterTableView Width="100%" CommandItemDisplay="Top" AutoGenerateColumns="False"
                            ShowHeadersWhenNoRecords="true">
                            <Columns>
                                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="editColumn">
                                    <ItemStyle CssClass="btnEdit" />
                                </telerik:GridEditCommandColumn>
                                <telerik:GridDropDownColumn DataField="Employee" HeaderText="Employee" ListTextField="listEmployeeName"
                                    ListValueField="EmployeeName" UniqueName="EmployeeName" ColumnEditorID="grdEmployeeDDLEditor">
                                </telerik:GridDropDownColumn>
                                <telerik:GridMaskedColumn HeaderText="Last 4 SSN" Mask="####" AllowSorting="false"
                                    UniqueName="DetailSSN" ColumnEditorID="">
                                </telerik:GridMaskedColumn>
                                <telerik:GridDropDownColumn DataField="CraftDescription" HeaderText="Craft" ListTextField="listEmployeeCraft"
                                    ListValueField="EmployeeCraft" UniqueName="EmployeeCraft" ColumnEditorID="grdEmployeeDDLEditor">
                                </telerik:GridDropDownColumn>
                                <telerik:GridDropDownColumn DataField="JobClassDescription" HeaderText="Job Level"
                                    ListTextField="listEmployeeLevel" ListValueField="EmployeeLevel" UniqueName="EmployeeLevel"
                                    ColumnEditorID="grdEmployeeDDLEditor" EditFormColumnIndex="1">
                                </telerik:GridDropDownColumn>
                                <telerik:GridNumericColumn DataField="HoursWorked" HeaderText="Hours Worked" UniqueName="EmployeeHoursWorked"
                                    NumericType="Number" AllowRounding="false" DecimalDigits="2" ColumnEditorID="grdEmployeeNumericColoumnEditor"
                                    EditFormColumnIndex="1">
                                </telerik:GridNumericColumn>
                                <telerik:GridNumericColumn DataField="RateOfPay" HeaderText="Rate of Pay with Benefits"
                                    UniqueName="EmployeeRateOfPay" NumericType="Currency" AllowRounding="false" DecimalDigits="2"
                                    ColumnEditorID="grdEmployeeNumericColoumnEditor" EditFormColumnIndex="1">
                                </telerik:GridNumericColumn>
                                <telerik:GridButtonColumn ConfirmText="Delete this Payroll Entry?" ConfirmDialogType="RadWindow"
                                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                                    UniqueName="DeleteColumn">
                                    <ItemStyle HorizontalAlign="Center" CssClass="btnEdit" />
                                </telerik:GridButtonColumn>
                            </Columns>
                            <CommandItemSettings ShowRefreshButton="false"  />
                            <EditFormSettings ColumnNumber="2" CaptionDataField="EmployeeName" CaptionFormatString="Edit Payroll Entry for {0}"
                                InsertCaption="New Payroll Entry">
                                <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                                <FormCaptionStyle CssClass="grdEditForm"></FormCaptionStyle>
                                <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White"
                                    Width="100%" />
                                <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" />
                                <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                                <EditColumn ButtonType="ImageButton" InsertText="Add Entry" UpdateText="Update Entry"
                                    UniqueName="EditCommandColumn1" CancelText="Cancel Edit">
                                </EditColumn>
                                <FormTableButtonRowStyle HorizontalAlign="Right"></FormTableButtonRowStyle>
                            </EditFormSettings>
                        </MasterTableView>
                        <ClientSettings>
                            <ClientEvents OnRowDblClick="grdEmployee_RowDblClick" />
                        </ClientSettings>
                    </telerik:RadGrid>
                    <telerik:GridDropDownListColumnEditor ID="grdEmployeeDDLEditor" runat="server" DropDownStyle-Width="110px" />
                    <telerik:GridNumericColumnEditor ID="grdEmployeeNumericColoumnEditor" runat="server"
                        NumericTextBox-Width="125px" />
                    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
                    </telerik:RadWindowManager>

And for posterity a brief snippet of C# of my data set

C#
protected void createDummyRow()
    {
        employeeDummyRow = new DataSet();
        DataTable dummyTable = employeeDummyRow.Tables.Add();
 
        dummyTable.Columns.Add("Employee", typeof(String));
        dummyTable.Columns.Add("CraftDescription", typeof(String));
        dummyTable.Columns.Add("JobClassDescription", typeof(String));
        dummyTable.Columns.Add("HoursWorked", typeof(Decimal));
        dummyTable.Columns.Add("RateOfPay", typeof(Decimal));
 
        dummyTable.Rows.Add("","","",1,1);
    }
 
    protected void Page_UnLoad(object sender, EventArgs e)
    {
        if (dsEmployees == null)
        {
            Session["dsEmployees"] = grdEmployee.DataSource;
        }
        else
        {
            Session["dsEmployees"] = dsLEAPEmployees;
        }
 
    }
 
    public void grdEmployee_OnNeedDataSource(Object sender, EventArgs e)
    {
        if (grdEmployee.DataSourceIsAssigned == true)
        {
            grdEmployee.DataSource = grdEmployee.DataSource;
        }
        else
        {
            grdEmployee.DataSource = employeeDummyRow.Tables[0].DefaultView;
        }
         
    }

I hope someone can suggest possibly a mind blowingly easy way to merge data set and caching of the data with the current structure!

Thanks!

David
Daniel
Telerik team
 answered on 12 Jun 2012
1 answer
116 views
hi
i am completely stuck at a point while scheduling an appointment b/w doctor and a patient.
i want to know what does timeslotcreated eventArgs e mean in timeslot created event .
I have written my code as follows :

if (DateTime.Compare(e.TimeSlot.Start, Convert.ToDateTime("2012-06-06 08:30:00.000")) == 0 && DateTime.Compare(e.TimeSlot.End, Convert.ToDateTime("2012-06-06 08:45:00.000")) == 0)
{
e.TimeSlot.CssClass = "rsCategoryGreen";
}
if (DateTime.Compare(e.TimeSlot.Start, Convert.ToDateTime("2012-06-06 08:45:00.000")) == 0 && DateTime.Compare(e.TimeSlot.End, Convert.ToDateTime("2012-06-06 09:00:00.000")) == 0)
{
e.TimeSlot.CssClass = "rsCategoryGreen";
}

The whole slot of 08:30 - 09:00 is getting green. and when i remove upper IF then nothing happens in output.
please solve it or give an alternate solution to do this?





Still i am waiting for someone's reply. I want to clear my problem now..
I have an appointment of 2 hours and i want to customize it in different timespan like one of half an hour and second of one and half hour with different custom. So which event schould i use?
Reply soon
Ivana
Telerik team
 answered on 12 Jun 2012
3 answers
110 views
I have a chart with line series. It happens that the series starting with the same values​​, or close to, the labels are mixed not giving to differentiate from one another. How do I space the value labels of the series?
Paulo
Top achievements
Rank 1
 answered on 12 Jun 2012
3 answers
184 views
Hello,

I've looked in the forums, but I could not find the answer for my particular problem.

I am in the process of creating two TreeViews on my page.  The first one is a directory listing of ASPX pages within my website which I've gotten working already.  When the user clicks on the name of an ASPX page a second tree view will be populated containing the IDs of the controls contained within that page.  I put those IDs in a collection (ArrayList).  The second treeview's datasource is then set to the collection I've created which then gets displayed on the screen.  Up to this point I've gotten things to work.

Here's my issue:  I'm trying to dynamically create context menus for each node within the second treeview depending on what kind of control is selected (i.e. button, textbox, listbox, etc...).

I would really appreciate it if anyone can show me an example of how this can be done.
Shawn
Top achievements
Rank 1
 answered on 12 Jun 2012
0 answers
96 views
javascript:

    
function RadGrid1_Command(sender, args)
 {
           args.set_cancel(
true);
            debugger;
            
var currentPageIndex = sender.get_masterTableView().get_currentPageIndex();
            
var pageSize = sender.get_masterTableView().get_pageSize();
....................................................................
............................................................
......................................................................
..............................................................
}
function updateGrid(result) {
 
var tableView = $find(document.getElementById("hdnradgridclientid").value).get_masterTableView();
            tableView.set_dataSource(result);
            tableView.dataBind();
        }
       
function updateVirtualItemCount(result)
{
          
var tableView = $find(document.getElementById("hdnradgridclientid").value).get_masterTableView();
          tableView.set_virtualItemCount(result);
        }       
 

<
telerik:RadGrid ID="RadGridAssessment" EnableViewState="false" Width="100%" runat="server" 
        AllowSorting="True" Height="430px" AllowMultiRowSelection="true" AllowPaging="true"
     GridLines="None" BorderWidth="0" AutoGenerateColumns="true" PagerStyle-AlwaysVisible="false"
     Skin="Vista" OnNeedDataSource="RadGrid1_NeedDataSource">
                <PagerStyle Visible="false" />
               <MasterTableView Width="99%">
                  </MasterTableView>
                <ClientSettings EnableRowHoverStyle="true">
               <ClientEvents OnCommand="RadGrid1_Command" />
               <Selecting AllowRowSelect="True"></Selecting>
              <Scrolling AllowScroll="true" EnableVirtualScrollPaging="true" UseStaticHeaders="true"
                 ScrollHeight="275px" SaveScrollPosition="True"></Scrolling>
                     </ClientSettings>
 </telerik:RadGrid>
the above codings are using in my code....and in my pageload i set  
RadGridAssessment.PageSize = 5;
the problem is.if the grid contains 6 to 9 rows means...i am unable to view second page..but if above ten means its working fine...
and i set RadGridAssessment.PageSize = 10; ..at the time if grid contains 11 to 20 records..i am unable to view second page...
please help me 
Prab
Top achievements
Rank 1
 asked on 12 Jun 2012
3 answers
103 views
Hi,

I have an application that uses a Treeview control.
I have now added a RadCombo to the page using the following html:
<div style="position: absolute; top: 230px; left: 300px; width: 100px; height: 30px">
  <telerik:RadComboBox ID="PalletList" runat="server" Width="100px"
    Enabled="False" EnableEmbeddedSkins="False" EnableTextSelection="False"
    Skin="XLogixBlue" SkinID="XLogixBlue" ZIndex="8000">
  </telerik:RadComboBox>
</div>

This block of code appears before the treeview in the page.
When this code is inserted in the page, the formatting in the treeview is completely messed up, and it no longer works.
e.g. initially the treeview displays only the top level node(s). When the combo is in the page, the pus sign to the left of the node does not display, but instead shows a little circle, and the node can not be expanded.
Please see attached images.

I am using Combos in several other pages, but so far this is the only one with a treeview.

I am using RadControls version 2012_1_215

Any suggestion appreciated.

Thank you

Paul
Paul
Top achievements
Rank 1
 answered on 12 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?