Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
141 views
Hi,

I have a self-referencing grid.  I'm declaring it and configuring it all in the aspx declaration and binding it via the "rebind"-"needs-data" approach.   It works fantastic.

The grid is initialized with a large data set (using the HierarchyLoadMode="ServerOnDemand") mode, and I have some PreRender code that expands the first 2 levels of the hierarchy.

Now the user can filter data, we are not using the grids filter but re-querying the database and returning a new dataset and rebinding to the grid.  If that dataset contains less than 20 records, the user wants all the nodes expanded by default, otherwise only the first 2.

I've tried several approaches: 
1.) Expanding in pre-render.  Doesn't work, only 2 sub-layers have data.
2.) changing HierarchyLoadMode to "ServerBind" and expanding in Pre-Render using a recursive expand function (code listed below)   Seems to work until the 4th sub-level, after the 4th sublevel the item.ChildItem.NestedTableViews.count is 0, even though I know there are 6 levels in the data set.

My next step is to try it with HierarchyLoadMode = "client" and my last ditch effort to dynmically build the grid for every request.  any guidence would be appreciated.



protected void RadGrid1_PreRender(object sender, EventArgs e)
        {

            if (ExpandAll)
            {
                RadGridExpandHierarchy(RadGrid1.Items);

            }
}

        private void RadGridExpandHierarchy(GridDataItemCollection items)
        {
            foreach (GridDataItem item in items)
            {
                if (item.GetDataKeyValue("IsPolicyRow").ToString()=="0" && item.ChildItem != null && item.ChildItem.NestedTableViews != null && item.ChildItem.NestedTableViews.Count() > 0)
                {
                    GridTableView childtableView = (GridTableView)item.ChildItem.NestedTableViews[0];
                    RadGridExpandHierarchy(childtableView.Items);
                }
                if (item.CanExpand && item.GetDataKeyValue("IsPolicyRow").ToString() == "0")
                    item.Expanded = true;

            }

        }
Tsvetina
Telerik team
 answered on 02 Apr 2012
1 answer
134 views
Greetings,

I have an issue with the DateTimePicker in Google Chrome 17.0.963.83 m and Rad AJAX for ASP.NET 2011.1.315.35 and it's that the calendar popup is displaying far from the input field. Check the attached image.

Thanks in advance

<div id="P5appfield017" class="appfield01">
    <telerik:RadDatePicker
ID="P5textfield4" runat="server" Width="150px" Calendar-CssClass="input_date" DateInput-CssClass="input_date" CssClass="input_date" Culture="es-CO" MinDate="01/01/1900" MaxDate="12/31/2100" >

                           
<DateInput ID="DateInput1" runat="server" Width="150px" DateFormat="dd/MM/yyyy" DisplayDateFormat="dd/MM/yyyy" ToolTip="Seleccionar fecha en calendario"  ></DateInput>
                            <DatePopupButton ImageUrl="/Formulario/icons/calendar.png" HoverImageUrl="/Formulario/icons/calendar.png" />
                        </telerik:RadDatePicker>
                        <asp:Label ID="P5lblP5textfield4" class="input01e" runat="server" Text="Ingrese Fecha de expedición" ForeColor="Red" Visible="false"></asp:Label><br />
                        <br />
</
div>
Tsvetina
Telerik team
 answered on 02 Apr 2012
5 answers
161 views
I have a custom provider, and in the case where we are creating a new file, I would like to append the current search pattern if the current pattern looks like a file extension and the current file does not have a file extension.  To do this, I need to get the current search pattern from the RadFileExplorer in the code behind.
John
Top achievements
Rank 1
 answered on 02 Apr 2012
3 answers
99 views
Hello, I have come across an issue with wiring up a RadGrid to an OpenAccessDataSource in the 2012 Q1 release.

Basically, when I add an OpenAccessDataSource to a RadGrid, the grid will display all the columns returned by the data source (AutoGenerate Columns is on by default) but when I open the Editor, there are a number of problems.

- Initially, with the grid selected in the left hand pane, the right hand pane displays all the properties for the General tab, but if I select Paging, Style, Grouping or Client Settings, no properties at all are display in the right hand pane.
- If I select Master TableView from the left hand pane, all the info displays for the General tab but not for Paging, Styles, Grouping or Columns.
- Any changes i make to the properties displayed in either of the General tabs are NOT saved
- If I switch to Source View in VS 2010 and manually add properties to the code (eg add a DataKeyName), these properties are not displayed in the grid editor

I have tried connecting the same grid to an ObjectDataSource and the grid editor performs normally.

I use OpenAccessDataSources a lot for quickly creating admin pages to administer lookup tables in the database, so this is a real problem for me.

Everything was working fine in the previous release.

Please help!

Jegards,
Jonathan

Marin
Telerik team
 answered on 02 Apr 2012
1 answer
128 views
I have a radeditior on my page with a custom list of characters. I am having problems adding the & symbol to the symbols list. The space in the list where the & should show up appears blank. Please see the attached screenshot. The blank space (which appears gray because it is selected) after the percent sign should be where the & symbol appears. I have tried adding it by
editor.Symbols.Add("&")
 And by
editor.Symbols.Add("\u0026")

And receive the same results. Does anyone have any idea why this would happen?

Thanks!
Dobromir
Telerik team
 answered on 02 Apr 2012
6 answers
286 views
Hi - I'm struggling with something that I can't seem to figure out.  I want to be able to display a RadComboBox that can be used on each row.  I need this because setting up the data I'm using requires a selection be made for each row.  My grid markup is as follows:

 

<telerik:RadGrid ID="grdRules" runat="server" GridLines="None" AutoGenerateColumns="False" OnItemCreated="grdRules_ItemCreated"
HorizontalAlign="NotSet" OnNeedDataSource="grdRules_NeedDataSource" Width="99%" OnPreRender="grdRules_PreRender" PageSize="100">
    <MasterTableView DataKeyNames="ID" GridLines="None" Width="100%" EditMode="InPlace">
        <Columns>
            <telerik:GridCheckBoxColumn UniqueName="IncludeRuleColumn"/>
            <telerik:GridTemplateColumn UniqueName="RuleName" HeaderText="Name" DataField="Name" SortExpression="Name">
                <ItemTemplate>
                    <asp:Label ID="lblName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Name") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Message" UniqueName="ValidationMessage" DataField="MessageText" SortExpression="Message.MessageText">
                <ItemTemplate>
                    <telerik:RadComboBox runat="server" ID="cbMessage" OnDataBinding="cbMessages_DataBinding" DataTextField="MessageText" DataValueField="ID"></telerik:RadComboBox>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Outcome" UniqueName="OutcomeType" SortExpression="OutcomeType">
                <ItemTemplate>
                    <telerik:RadComboBox runat="server" ID="cbOutcomeTypes" OnDataBinding="cbOutcomeTypes_DataBinding"></telerik:RadComboBox>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

 

When the grid displays, they all look like the RadComboBox, but they're all disabled and cannot be 'dropped down' to select an item.  I've tried forcing all of the rows into edit mode with EditItemTemplate entries as well, and that doesn't work either.  Here is the server side code I've tried that with:

protected void grdRules_PreRender(object sender, EventArgs e)
{
    foreach (GridItem item in grdRules.MasterTableView.Items)
    {
        if (item is GridEditableItem)
        {
            GridEditableItem editableItem = item as GridDataItem;
            editableItem.Edit = true;
        }
    }
    for (int i = 0; i < grdRules.PageSize; i++)
    {
        grdRules.EditIndexes.Add(i);
    }
    grdRules.Rebind();
}
protected void grdRules_ItemCreated(object sender, GridItemEventArgs e)
{
    if(!Page.IsPostBack && e.Item is GridEditableItem)
    {
        e.Item.Edit = true;
    }
}

Is what I'm explaining possible with the RadGrid?  What am I missing here?  I feel like I've tried everything today to get this to work, and to no avail.  Ideas please?  Thanks!

Pavlina
Telerik team
 answered on 02 Apr 2012
6 answers
242 views
Hallo,

I have a RadComboBox with set "CheckBoxes = true". The header displayes always "X items checked". I want to display an other text. How can I affect the header text?

Thanks
Kalina
Telerik team
 answered on 02 Apr 2012
1 answer
135 views
I'm having trouble initializing the spell check on mulitiple mvc editor controls.
I was able to init the speller check on 1 editor control by following the example on
http://www.telerik.com/community/forums/aspnet-mvc/editor/mvc-editor-with-spellcheck.aspx

However, I would like to check all editors.
I'm following the example on:
http://www.telerik.com/help/aspnet-ajax/spell-how-to-mutliple-textareas.html

but I'm not sure how to set the source list with the mvc controls.
i tried:

 

 

var sources =

 

[

new Telerik.Web.UI.Spell.HtmlElementTextSource('PurposeIframe'),

new Telerik.Web.UI.Spell.HtmlElementTextSource('ActivitiesIframe'),

new Telerik.Web.UI.Spell.HtmlElementTextSource('ScopeIframe')

 

];


and also

new Telerik.Web.UI.Spell.HtmlElementTextSource($('#PurposeIframe')),

 

 

 When i call

var

 

 

spell = GetRadSpell('ctl00_ctl00_MainContent_spell1');

 

spell.set_textSource(

 

new MultipleTextSource(sources));

 

spell.startSpellCheck();

 

 

 


i keep getting : No value or innerHTML attribute. Cannot access text.

Thanks in advance,
Michael

Rumen
Telerik team
 answered on 02 Apr 2012
3 answers
108 views
Hello telerik,

I use his code on IIS 7

<telerik:RadEditor ToolsFile="~/Admin/FEHTools.xml" Height="355px" Width="433px"
                                                                                                                            ContentFilters="RemoveScripts" CssClass="EditorCss" EnableResize="false" ID="radEditorWpContent"
                                                                                                                            runat="server">
                                                                                                                            <imagemanager viewpaths="~/editor/Images/" uploadpaths="~/editor/Images/"
                                                                                                                                deletepaths="~/editor/Images/" maxuploadfilesize="100000000" searchpatterns="*.*"
                                                                                                                                enableimageeditor="true" />
                                                                                                                            <flashmanager viewpaths="~/editor/flash/" uploadpaths="~/editor/flash/"
                                                                                                                                deletepaths="~/editor/flash/" maxuploadfilesize="100000000" />
                                                                                                                            <mediamanager viewpaths="~/editor/media/" uploadpaths="~/editor/media/"
                                                                                                                                deletepaths="~/editor/media/" maxuploadfilesize="100000000" searchpatterns="*.*" />
                                                                                                                            <documentmanager viewpaths="~/editor/documents/" uploadpaths="~/editor/documents/"
                                                                                                                                deletepaths="~/editor/documents/" maxuploadfilesize="100000000" searchpatterns="*.*" />
                                                                                                                            <cssfiles>
                                                                                                                                <telerik:EditorCssFile Value="~/CSS/RadEditor2.css" />
                                                                                                                            </cssfiles>
                                                                                                                        </telerik:RadEditor>

in a aspx file under a folder with this webconfig

<system.web>
  <authorization>
    <allow roles="admin"></allow>
    <deny users="?"/>
  </authorization>
</system.web>
<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxUrl="8192" maxQueryString="4096" />
    </requestFiltering>
  </security>
</system.webServer>

Problem is: when i click on any of image/document/... manager to upload an image, then
it redirects the iframe containing the manager to the login page.
Before that it IIS complained that the request url is too big, which you can see i have increased.

WHY does it redirect?


Rumen
Telerik team
 answered on 02 Apr 2012
4 answers
276 views
I cannot reproduce this succesfully or consistently, but we are getting hundreds of reports that when users click on the radtextbox (which is in single line mode) field that they can't successfully put the cursor into the box. In some occasions, when this has happened to me, I've been able to succeed in putting the cursor into the box by clicking on the very top pixel or two of the box, but the rest of the box doesn't allow you to click into it.

Any ideas? I'm having to convert the entire site to asp:TextBox controls which suck.
Maria Ilieva
Telerik team
 answered on 02 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?