Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
55 views
The spell check button isn't highly used in my application, but we've had a few people notice that when they use the spell checker, and click to replace a word with one of the spell checker's suggestions that the entire HTML content in the editor is duplicated.  I really am not sure where to even begin to track this down.  We are using version 2012.2.619.40.

Thanks!
-Mark
Rumen
Telerik team
 answered on 24 Dec 2012
1 answer
49 views
Aspx page code:
 <telerik:RadEditor ID="RadEditor1" runat="server" EnableResize="false" Height="300px" Width="550px">
  </telerik:RadEditor>
code behind:
RadEditor1.Enabled = true;
RadEditor1.EditModes = Telerik.Web.UI.EditModes.Design ^ Telerik.Web.UI.EditModes.Preview;
RadEditor1.ToolsFile =
"FullSetOfTools.xml";
RadEditor1.Width = Unit.Pixel(550);
In chrome and firefox working fine...but in IE its not working the rad editor getting truncated ...i attached images about this issue.please help to solve this issue
Rumen
Telerik team
 answered on 24 Dec 2012
5 answers
204 views
How to find rad button in RadGrid1_PreRender

                     
<telerik:GridTemplateColumn SortExpression="workordno1" HeaderText="Completion"
                          HeaderStyle-Width="50px" DataField="workordno1" FilterControlWidth="60px" UniqueName="workordno1" DataType="System.Single">
                          <ItemTemplate>
                              <telerik:RadButton ID="Work" CommandName="Redirect" Text='<%# Eval("workordno") %>'
                                  runat="server" OnClientClicking="StandardConfirm" Width="90px" />
                          </ItemTemplate>
                      </telerik:GridTemplateColumn>

Thanks Advance,
Mohamed.
Eyup
Telerik team
 answered on 24 Dec 2012
5 answers
56 views
I have found that, when you have only 2 items in the returned list, it will always select the second item. This happens both in text and token modes.
Kalina
Telerik team
 answered on 24 Dec 2012
1 answer
1.0K+ views
We're using RadGrid(with paging enabled) in a SharePoint site.
Our problem is that Grid takes too much time to load in the browser(7-8 seconds). I verified, that data fetching part is able to provide data to Grid within 1-2 seconds.

Here, We are not using the default template columns provided in RadGrid. 
We've created custom item templates(implementing the ITemplate interface) to create columns. e.g. to create a hyperlink column, We're using below template:
public class HyperlinkItemTemplate<TProperty, T> : ITemplate
    {
        public string PropertyName { get; set; }
        public string PropertyKey { get; set; }
        public string NavigateUrl { get; set; }
 
        public HyperlinkItemTemplate(string propertyName, string propertyKey, string navigateUrl)
        {
            PropertyName = propertyName;
            PropertyKey = propertyKey;
            NavigateUrl = navigateUrl;
        }
 
        public void InstantiateIn(Control c)
        {
            HyperLink hyperLink = new HyperLink();
            hyperLink.DataBinding += OnDisplayDataBinding;
            c.Controls.Add(hyperLink);
        }
 
        private void OnDisplayDataBinding(object sender, EventArgs e)
        {
            HyperLink hyperLink = (HyperLink) sender;
            hyperLink.Text = TemplateHelper.GetValue<String, T>((GridDataItem) hyperLink.NamingContainer, PropertyName);
            hyperLink.NavigateUrl = String.Format(NavigateUrl, TemplateHelper.GetValue<TProperty, T>((GridDataItem)hyperLink.NamingContainer, PropertyKey));
        }
    }
When we tried a RadGrid(with AutoGenerateColumns property set to true) with same amount of data set, it was much faster(almost 50% fast).
Is there any performance issue with RadGrid when using custom item templates?
Any suggestions, to improve the performance.

Thanks in advance.
Pavlina
Telerik team
 answered on 24 Dec 2012
1 answer
47 views
When I use the grid plainly without a NestedView, my ImageButtons (from a GridButtonColumn) clicks are processed perfectly without any problems. The instant I add a NestedViewTemplate, ONLY the first row's ImageButtons work, the others do not kick off the ItemCommand event.

Any ideas?

-Ben
Eyup
Telerik team
 answered on 24 Dec 2012
1 answer
83 views
I have a RadGrid with single row edit capability, and a button that acts as a "Submit" button.  I'm handling the grid's UpdateCommand event on the server, doing some processing, and trying to change the submit button's OnClientClick event.  Basically, depending on what happens when the server processes the update, I want the submit button to hit one of a few different js functions.  I'm having trouble reliably updating the button's event.  It seems as though it needs a full page postback to take effect.  What is the recommended approach for this?
Eyup
Telerik team
 answered on 24 Dec 2012
3 answers
145 views
I have problem in radgrid when biding data by List (not EntitiesDataSource or LinqDataSource or SqlDatasource).

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True"
        CellSpacing="0" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
        ShowStatusBar="True" OnDeleteCommand="RadGrid1_DeleteCommand" OnInsertCommand="RadGrid1_InsertCommand"
        OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand"
        GridLines="None" Skin="Metro" OnItemDataBound="RadGrid1_ItemDataBound">
        <ExportSettings ExportOnlyData="True" IgnorePaging="True" OpenInNewWindow="True">
            <Excel Format="Biff" />
        </ExportSettings>
        <MasterTableView CommandItemDisplay="Top" EditMode="InPlace" InsertItemPageIndexAction="ShowItemOnCurrentPage"
            AutoGenerateColumns="False" DataKeyNames="ID" GridLines="Both">
            <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="Thêm má»›i"
                ExportToExcelText="Xuất Excel" RefreshText="Làm má»›i" ShowExportToExcelButton="True">
            </CommandItemSettings>
            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridDropDownColumn DataField="ProviderId" DataType="System.Int64" FilterControlAltText="Filter ProviderId column"
                    HeaderText="Nhà cung cấp" SortExpression="ProviderId" ListTextField="ProviderName"
                    ListValueField="ProviderId" UniqueName="ProviderId" ColumnEditorID="GridDropDownColumnEditor1"
                    DropDownControlType="RadComboBox" runat="server">
                </telerik:GridDropDownColumn>
           <%--     <telerik:GridTemplateColumn HeaderText="Nhà cung cấp" UniqueName="ProviderID">
                     <ItemTemplate>
                         <asp:DropDownList ID="ddlProvider" runat="server"/>
                     </ItemTemplate>
                 </telerik:GridTemplateColumn>--%>
                <telerik:GridBoundColumn DataField="Buys" DataType="System.Decimal" FilterControlAltText="Filter Buys column"
                    HeaderText="Buys" SortExpression="Buys" UniqueName="Buys">
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn DataField="Date" DataType="System.DateTime" FilterControlAltText="Filter Date column"
                    HeaderText="Date" SortExpression="Date" UniqueName="Date">
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="Commen" FilterControlAltText="Filter Commen column"
                    HeaderText="Commen" SortExpression="Commen" UniqueName="Commen">
                </telerik:GridBoundColumn>
                <telerik:GridButtonColumn ConfirmText="Bạn muốn xóa hóa đơn này ?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                    <ItemStyle CssClass="MyImageButton" Width="30px"></ItemStyle>
                </telerik:GridEditCommandColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
    </telerik:RadGrid>

And here is code behind


protected void Page_Load(object sender, EventArgs e)
{
    
}
 
protected void RadGrid1_DeleteCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
    Int64 purchaseId = Convert.ToInt64((e.Item as GridDataItem).GetDataKeyValue("ID"));
    INPUTITEMDAO.Delete(purchaseId);
    RadGrid1.Rebind();
    //Reresh grid
    RadGrid1.MasterTableView.ClearEditItems();
}
 
protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)
{
    GridEditableItem item = e.Item as GridEditableItem;
    Hashtable values = new Hashtable();
    item.ExtractValues(values);
    INPUTITEM objInputItem=new INPUTITEM();
    item.UpdateValues(objInputItem);
 
    INPUTITEMDAO.InsertAndUpdate(objInputItem);
    RadGrid1.Rebind();
    RadGrid1.MasterTableView.ClearEditItems();
}
 
protected void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e)
{
    GridEditableItem item = e.Item as GridEditableItem;
    Int64 purchaseId =Convert.ToInt64(item.GetDataKeyValue("ID").ToString());
    INPUTITEM objInputItem = DataOut.GetAllINPUTITEMList().Where(i => i.ID == purchaseId).FirstOrDefault();
    item.UpdateValues(objInputItem);
    INPUTITEMDAO.InsertAndUpdate(objInputItem);
    RadGrid1.Rebind();
    RadGrid1.MasterTableView.ClearEditItems();
}
 
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    RadGrid1.DataSource = DataOut.GetAllINPUTITEMList();
}
 
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    GridEditableItem editedItem = e.Item as GridEditableItem;
    GridDataItem dataItem = e.Item as GridDataItem;
    if (e.Item is GridEditableItem&& (e.Item as GridEditableItem).IsInEditMode)
    {
        GridEditManager editMan = editedItem.EditManager;
        GridDropDownListColumnEditor editor = editMan.GetColumnEditor("ProviderId") as GridDropDownListColumnEditor;
        //in case you have RadComboBox editor for the GridDropDownColumn (this is the default editor),  
        //you will need to use ComboBoxControl below instead of DropDownListControl
        //Then you can modify the list control as per your custom conventions
        if (editor != null)
        {
            editor.DataSource = PROVIDERDAO.GetAllPROVIDERList();
            editor.DataBind();
        }
    }
}
i don't know what problem that i run project not show ProviderId column but when i click edit it is show
I Want grid show ProviderId column with ListTextField = "ProviderName" when page loading because eidt i had done ok.
Please help me ?
Daniel
Telerik team
 answered on 24 Dec 2012
1 answer
56 views

Hi,

I want to add a RadListBoxItem into a RadListBox from javascript.
 
Can anybody help me to achieve this scenario ASAP?


Thanks in advance

Princy
Top achievements
Rank 2
 answered on 24 Dec 2012
3 answers
839 views

Hi,
How do a RadGrid be in View mode or non editable mode?

Scenario:
Based on the user role, RadGrid should be in Disable mode(no Add/Update/Remove functionalities ) or Enable mode. This should happen dynamically.

Thanks,
Chaitanya
Eyup
Telerik team
 answered on 24 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?