Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
130 views
When attaching a remote CSS file to RadEditor (so it populates the Apply Styles dropdown and styles the content window) an error appears in Firefox.

The content window gets styled fine, but the dropdown list doesn't get populated and raises the following error when you click to open it:

Error: [Exception... "Security error"  code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)"  location: "......./ScriptResource.axd?d=istbqLAKAKLE7MGyk4QnBSrjUlOysgIJA5wDbtqJvcTScOvohrIs9h6a2TybRNxJf7Nn8kodjh9xLdIIRBFrEg2&t=633493986000000000 Line: ....."]

This is probably due to some client-side security restriction of Firefox that is not present in Internet Explorer.

Is there a workaround or is this in line to be patched?
Rumen
Telerik team
 answered on 16 Jul 2008
1 answer
89 views
The toolbar and grid have a "created" event but the treeview does not, is there a way of detecting when the tree view is "ready"?

I populate the tree on the client from a json data struction and need to know when the tree is ready.

The created event is a much better and cleaner way of getting the client instance, than using $find and the client id.  how come its implementation seems to be very patchy?
Atanas Korchev
Telerik team
 answered on 16 Jul 2008
1 answer
198 views
Hi, I added an attribute into each node of a radtreeview (server side) : node.Attributes.Add("nodeType", "image");

Next, in javascript (client side), I tried to get the value of the attibute, but the attribute 'nodeType' of the node clicked is undefined.

Is it normal ? How may I to resolve it ?

function
RadTreeViewAfterClientClick(node,afterClientClickFct){
if(node != null){
var atts = node.get_attributes();
var nodeType = atts.getAttribute('nodeType'); /*(Undefined)*/
}
}

Thanks in advance,
Atanas Korchev
Telerik team
 answered on 16 Jul 2008
1 answer
133 views
Hi

   I have been using the Radgrid version which was using the RadGrid.Net2 assembly.Now i am upgrading it to the AJAX enabled grid using telerik.Web.UI Assembly.

I am having problems in accessing the client side properties and methods for the AJAX enabled grid which i was able to access with the previous version.

After upgrading the grid properies like grid.MasterTableView.SelectRow , grid.GetColumnByUniqueName and  grid.MasterTableView.Rows are showing as undefined.Although grid.MasterTableView is showing as Object.
I have checked the documentation to see that these properties are same for the older as well as current version.

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>


function

GridCreated(sender, eventArgs)

{

grid = sender;

alert(grid.MasterTableView);

alert(grid.MasterTableView.SelectRow);

grid.MasterTableView.SelectRow(grid.MasterTableView.Rows[document.form1.defaultrow.value].Control,

true);

}

<

telerik:radgrid id="RadGrid2" runat="server" Width="100%" gridlines="Horizontal" Skin="Outlook" AllowSorting="True" ShowFooter="True" ShowGroupPanel="True" ShowStatusBar="True" SkinsPath="../../RadControls/Grid/Skins" PageSize="30">

<

ClientSettings ReorderColumnsOnClient="True" AllowColumnsReorder="True" ClientEvents-OnGridCreated="GridCreated" ClientEvents-OnRowSelected="RowSelected"

 

AllowDragToGroup="True">

 

<selecting allowrowselect="True">

 

</selecting>

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True"></Scrolling>

 

</ClientSettings>

<

MasterTableView>

<

ExpandCollapseColumn Visible="False" CollapseImageUrl="../../RadControls/Grid/Skins/Outlook/SingleMinus.gif" ExpandImageUrl="../../RadControls/Grid/Skins/Outlook/SinglePlus.gif" FilterImageUrl="../../RadControls/Grid/Skins/Outlook/Filter.gif" SortAscImageUrl="../../RadControls/Grid/Skins/Outlook/SortAsc.gif" SortDescImageUrl="../../RadControls/Grid/Skins/Outlook/SortDesc.gif">

<

HeaderStyle Width="19px"></HeaderStyle>

</

ExpandCollapseColumn>

<

RowIndicatorColumn Visible="False" FilterImageUrl="../../RadControls/Grid/Skins/Outlook/Filter.gif" SortAscImageUrl="../../RadControls/Grid/Skins/Outlook/SortAsc.gif" SortDescImageUrl="../../RadControls/Grid/Skins/Outlook/SortDesc.gif">

<

HeaderStyle Width="20px"></HeaderStyle>

</

RowIndicatorColumn>

 

<CommandItemSettings AddNewRecordImageUrl="../../RadControls/Grid/Skins/Office2007/AddRecord.gif"

 

RefreshImageUrl="../../RadControls/Grid/Skins/Office2007/Refresh.gif" />

 

<EditFormSettings>

 

<EditColumn CancelImageUrl="../../RadControls/Grid/Skins/Office2007/Cancel.gif" EditImageUrl="../../RadControls/Grid/Skins/Office2007/Edit.gif"

 

FilterImageUrl="../../RadControls/Grid/Skins/Office2007/Filter.gif" InsertImageUrl="../../RadControls/Grid/Skins/Office2007/Insert.gif"

 

SortAscImageUrl="../../RadControls/Grid/Skins/Office2007/SortAsc.gif" SortDescImageUrl="../../RadControls/Grid/Skins/Office2007/SortDesc.gif"

 

UpdateImageUrl="../../RadControls/Grid/Skins/Office2007/Update.gif">

 

</EditColumn>

 

</EditFormSettings>

</

MasterTableView>

 

<GroupPanel Text="Drag colums here to group.">

 

</GroupPanel>

 

</

telerik:radgrid>



Is there Any Help document for this issue .

Thanks
Baqi

Shinu
Top achievements
Rank 2
 answered on 16 Jul 2008
2 answers
96 views
can i add new button to the rad scheduler or can i use the sub menu in the rad scheduler wile right clicking in the rad schedler please help me about the these issues
unni
Top achievements
Rank 1
 answered on 16 Jul 2008
3 answers
220 views
I am unable to set the selectedvalue of a combobox with a templatecolumn edititemtemplate of a grid.

The values of the combobox are set in the onitemcreated event. The combo box has the  SelectedValue='<%# Eval("insurer") %>' statement... however this prevents the grid from going into edit mode.

here is the code:

 <telerik:RadGrid
            ID="RadGrid1"
            runat="server"
            AutoGenerateColumns="False"
            AutoGenerateDeleteColumn="True"
            AllowSorting="True"
            AutoGenerateEditColumn="True"
            ondeletecommand="RadGrid1_DeleteCommand"
            oninsertcommand="RadGrid1_InsertCommand"
            onupdatecommand="RadGrid1_UpdateCommand"
            onneeddatasource="RadGrid1_NeedDataSource"
            GridLines="None"
            OnItemCreated="RadGrid1_ItemCreated"  >
            <MasterTableView
                CommandItemDisplay="Top"
                CommandItemSettings-AddNewRecordImageUrl="../Images/AddRecord.gif"
                CommandItemSettings-RefreshImageUrl="../Images/Refresh.gif"
                EditMode="InPlace"
                DataKeyNames="contractor_id,insurer,tstamp">
                <CommandItemSettings
                    AddNewRecordImageUrl="../Images/AddRecord.gif"
                    RefreshImageUrl="../Images/Refresh.gif">
                </CommandItemSettings>
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                   
                    <telerik:GridTemplateColumn UniqueName="TemplateColumn1">
                     <HeaderTemplate>Insurer</HeaderTemplate>
                     <ItemTemplate>
                         <%# Eval("insurer") %>
                     </ItemTemplate>
                     <EditItemTemplate>
                        <qese:QeseComboBox
                            ID="comboRadGrid1Insurer"
                            runat="server"
                            SelectedValue='<%# Eval("insurer") %>'>
                         </qese:QeseComboBox>
                     </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn
                        DataField="employer_id"
                        HeaderText="Employer ID"
                        UniqueName="column1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn
                        DataField="no_of_members"
                        HeaderText="No. of members"
                        UniqueName="column2">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                Font-Size="XX-Small" Font-Strikeout="False" Font-Underline="False"
                Wrap="True" />
        </telerik:RadGrid>

    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem)
        {
            QeseComboBox combo = (e.Item as GridEditableItem)["TemplateColumn1"].FindControl("comboRadGrid1Insurer") as QeseComboBox;
            if (combo != null)
            {
                combo.DataSource = Tbl_contractor_personal_accident_insurance.SelectDistinctInsurer();
                combo.DataTextField = "Value";
                combo.DataValueField = "Key";
                combo.DataBind();

            }
        }
    }

Any input would be appreciated?


Yavor
Telerik team
 answered on 16 Jul 2008
5 answers
258 views
I'm having a problem since upgrading from 2008.1.415 to 2008.1.619 with a ComboBox not firing the SelectedIndexChanged event.

I traced it back to the ClientID of the combobox having changed since the new version - where previously it was the full control hierarchy eg mainPlaceHolder$cplTopPaneContent$frmSalaryHistory$gradeSelector$dropDown it is now being rendered as just gradeSelector$dropDown.

Having spent a while debugging the new version, i think the problem lies with the new CreateHeader and CreateFooter methods:

        private void CreateFooter() 
        { 
            if (_footer == null) 
            { 
                this._footer = new RadComboBoxHeaderFooterControl(); 
                this.Controls.Add(Footer); 
                Footer.ID = this.ClientID + "_Footer"; 
                Footer.CssClass = RadComboBox.FooterCssClass; 
            } 
        } 
 
        private void CreateHeader() 
        { 
            if (_header == null) 
            { 
                this._header = new RadComboBoxHeaderFooterControl(); 
                this.Controls.Add(Header); 
                Header.ID = this.ClientID + "_Header"; 
                Header.CssClass = RadComboBox.HeaderCssClass; 
            } 
        } 

These methods make a reference to this.ClientID, and as they are being called while the control hierarchy is not yet finalised they can cause problems with caching of UniqueIDPrefixes for the controls.

This results in the controls being rendered with the wrong clientIDs and the events not firing.  This is discussed on pages such as http://dotnetslackers.com/DataGrid/re-49612_Accessing_ClientID_or_UniqueID_too_early_can_cause_issues.aspx

It's not easy to reproduce this in a small project, as I think the control has to be in a nested hierarchy before it starts breaking, but if you just want the header to have the same ClientID as the combobox, but with "_Header" suffixed to it, is it not possible to change the above code to

 
 
        private void CreateFooter() 
        { 
            if (_footer == null) 
            { 
                this._footer = new RadComboBoxHeaderFooterControl(); 
                this.Controls.Add(Footer); 
                Footer.ID = "_Footer"; 
                Footer.CssClass = RadComboBox.FooterCssClass; 
            } 
        } 
 
        private void CreateHeader() 
        { 
            if (_header == null) 
            { 
                this._header = new RadComboBoxHeaderFooterControl(); 
                this.Controls.Add(Header); 
                Header.ID = "_Header"; 
                Header.CssClass = RadComboBox.HeaderCssClass; 
            } 
        } 

and ASP.NET will take care of prefixing with the combobox's ID (as the header is a child control of the combobox)?

Thanks,

Stephen
Rosi
Telerik team
 answered on 16 Jul 2008
1 answer
124 views
How can I print the current text of the editor, when in preview mode or when editor enabled set to false.

Thanks,
Jim
Rumen
Telerik team
 answered on 16 Jul 2008
1 answer
101 views
Hello, I am running I am having trouble with refreshing the data inside of my grid after the data changes.  I made a separate refresh button that when clicked queries my database and returns the new set of data to the grid.  The problem is when I hit the refresh button it does not remember the filters/sorts of the original data it just returns the new data in unsorted order.  I want the sorts/filters to be maintained after I refresh the radgrid.  What is the best way to do this?  Thanks

Right now I have this


    protected void imgRefresh_Click(object sender, ImageClickEventArgs e)
   
    {



    

        // Queries the database to get any changes
        EntitySearchResult = _helper.RepopulateSearchEntityResults(UserID,                 FacilityId, Request.Cookies,                     UIConfig.GlobalConfiguration.MaxRecordsToReturn);
       
          // Renders Data to appear in rad grid
            DisplayResults();


       
       

       
        ramGrid.ResponseScripts.Add("top.HideLoading();");
       
    }

How can I keep the sorting/filtering of my original data when ir un this function?


Shinu
Top achievements
Rank 2
 answered on 16 Jul 2008
1 answer
98 views
can i add new button to the rad scheduler or can i use the sub menu in the rad scheduler wile right clicking in the rad schedler please help me about the these issues
T. Tsonev
Telerik team
 answered on 16 Jul 2008
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?