Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
59 views
Hi,
I'm searching for a solution to limit the editor input to 2000 words, instead of blocking of the input, add a red line after 2000 words and the input can be continued. Same when pasting a large text, after pasting a large text, a red line have to be added after 2000 words.

Can you please help me out with this?

Kind regards,
Jelle
Erick
Top achievements
Rank 2
 answered on 16 Jan 2014
1 answer
194 views
Hi,

I am using radtextbox in aspx page. I have a web service and it returns a string. I want to add these string to my textbox permanently. So when somebody click on my radtextbox they can't delete these string which already in textbox but they add characters on it. How can I do that?

thx.


Shinu
Top achievements
Rank 2
 answered on 16 Jan 2014
0 answers
66 views
I have a RadComboBox that gets its data set in the FrameWorkInitialize method like this:

 if (!IsPostBack)
            {
                string firstFilterName = adaptationFilters[0].FilterCategoryName;
                var firstFilterGroup = adaptationFilters[0].FilterCategoryChoices.Select(afc => new ComboBoxItem(firstFilterName, afc)).ToList();
                firstFilterGroup.Insert(0, new ComboBoxItem(firstFilterName, firstFilterName));
                _filterDropDown1.DataSource = firstFilterGroup;
                _filterDropDown1.DataBind();
                _filterDropDown1.SelectedIndex = 0;
}

(where ComboBoxItem is an internal class that has an object, value and a string, text)

Everything looks good until I pick a value. Well, the SelectedIndexChanged event also fires like it should, but after the postback, item 0 is selected again. This happen both with ViewStateMode enabled and without.

What am I doing wrong?
C
Top achievements
Rank 1
 asked on 16 Jan 2014
2 answers
475 views
Hi.

I would like to align my pdf when exported in such a manner that all string columns are aligned left and numeric columns aligned right.  I have tried many different ways with no such result.  Below is a code snippet of what I am currently using.

private void ApplyStylesToPDFExport(GridItem item)
{
    if (item is GridHeaderItem)
        foreach (TableCell cell in item.Cells)
        {
            cell.Style["font-family"] = "Verdana";
            cell.Style["text-align"] = "Left";
            cell.Style["font-size"] = "12pt";
        }
 
    if (item is GridDataItem)
    {
        item.Style["font-size"] = "12px";
        item.Style["background-color"] = item.ItemType == GridItemType.AlternatingItem ? "#DDDDDD" : "#AAAAAA";
        item.Style["horizontal-align"] = "Right";
    }
 
}

The method is then called in the item_created event.  This code is being used to try align headings to left and data to right with not much success.

Any help would be greatly appreciated.

Kind regards.
Leon Havenga
Leon
Top achievements
Rank 1
 answered on 16 Jan 2014
3 answers
242 views
Hi.

As stated in the title, when using the radgrid to export to PDF/Excel, it converts the data into hyperlinks.  It however does not do this when exporting to csv and word.

Any help would be greatly appreciated.

Regards.
Leon Havenga
Princy
Top achievements
Rank 2
 answered on 16 Jan 2014
3 answers
1.6K+ views
I'm trying to hide/show different columns on a nested rad grid based on a flag in the pre-render event but they are all displaying

These are my grid columns:
<telerik:GridBoundColumn UniqueName="LocalDeanery" ReadOnly="true" DataField="localdeanery" HeaderText="Local Deanery" SortExpression="localdeanery"
    HtmlEncode="false" >
</telerik:GridBoundColumn>               
 
<telerik:GridTemplateColumn UniqueName="Sector2013" HeaderText="Sector" SortExpression="hasBeenHeld desc,Sector" AllowFiltering="false" >
    <ItemTemplate>
        <asp:Label ID="Label2" runat="server" Text='<%# Eval("Sector").ToString() + " (" + Eval("PrefRank").ToString() + ") " + (Eval("conditional").ToString()==""?"":"Conditional")%>'
             Visible='<%#  Eval("OfferId").ToString()!="" %>' />
    </ItemTemplate>
</telerik:GridTemplateColumn>
 
<telerik:GridBoundColumn UniqueName="Region" ReadOnly="true" DataField="tRegion" HeaderText="Region" SortExpression="tRegion"
    HtmlEncode="false">
</telerik:GridBoundColumn>               
 
<telerik:GridBoundColumn UniqueName="Subregion" ReadOnly="true" DataField="tSubRegion" HeaderText="Sub-Region" SortExpression="tSubRegion"
    HtmlEncode="false" >
</telerik:GridBoundColumn>               
 
<telerik:GridBoundColumn UniqueName="Sector2014" ReadOnly="true" DataField="tSector" HeaderText="Sector" SortExpression="tSector"
    HtmlEncode="false" >
</telerik:GridBoundColumn>

and my code in the pre-render
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    RadGrid od = (RadGrid)RadGrid1.MasterTableView.Items[0].ChildItem.FindControl("OfferDataDetail");
    Label ry = (Label)RadGrid1.MasterTableView.Items[0].ChildItem.FindControl("LblRoundYear");
 
    int RoundYear = 2014;
    if (ry != null) RoundYear = int.Parse(ry.Text);
 
    //display for 2013
    od.Columns.FindByUniqueName("LocalDeanery").Visible = (RoundYear == 2013);
    od.Columns.FindByUniqueName("Sector2013").Visible = (RoundYear == 2013);
    //display for 2014
    od.Columns.FindByUniqueName("Region").Visible = (RoundYear == 2014);
    od.Columns.FindByUniqueName("Subregion").Visible = (RoundYear == 2014);
    od.Columns.FindByUniqueName("Sector2014").Visible = (RoundYear == 2014);
 
    od.Rebind();
}

The lines to hide/show the columns is being hit but they are still displaying, is there something else I should be doing?
thanks
Princy
Top achievements
Rank 2
 answered on 16 Jan 2014
2 answers
338 views
Is there any way alter the Column Header Text when auto-generating the columns in a RadGrid?

Thanks,
Mark
Mark
Top achievements
Rank 1
 answered on 16 Jan 2014
3 answers
101 views
hi, i have to get de DataFieldValue of a RadComboBox or RadList, but i can´t, i am using the Rad TabStrip Wizard Demo with ascx´s but i only can to get the Text property of a RadComboBox Selected Item like Demo, can you help me!

thanks
Princy
Top achievements
Rank 2
 answered on 16 Jan 2014
14 answers
1.3K+ views

I have a fairly complex page I have been working on but have been having some trouble of late adding some ajax to some of the page items.

The problem seems to be one of compatibility between the RadAjaxManager and the regular ASP.NET AJAX UpdatePanels.

Below I have put together a skeleton of how my page is constructed. I have stripped out all the guts of the various controls for the sake of brevity (and relevance). 

In this format the page does not work. For one, clicking a row on the parent grid should make the child grids update. That does not happen. I have been on this page all day and just can't seem to get all the bits working together.

Yesterday I had an UpdatePanel around pretty much the whole page. The child grids updates but other bits started to break.

Here it is

<masterpage> << Contains the ScriptManager
 
    <script>
        // Javascript in here
    </script>
 
    <asp:UpdatePanel>
        <telerik:RadWindowManager>
            <telerik:RadWindow>
                <asp:TabContainer>
                    <asp:TabPanel />
                    <asp:TabPanel />
                    <asp:TabPanel />
                </asp:TabContainer>
        </telerik:RadWindowManager>
    </asp:UpdatePanel>
 
    <asp:UpdatePanel>
        <table>
            [various standard form elements]
            <telerik:RadComboBox />
            <input type="Button"/>
        </table>
    </asp:UpdatePanel>
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
         <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="ParentGrid" />
                            <telerik:AjaxUpdatedControl ControlID="ChildGrid1" />
                            <telerik:AjaxUpdatedControl ControlID="ChildGrid2" />
                            <telerik:AjaxUpdatedControl ControlID="ChildGrid3" />
                           </UpdatedControls>
                    </telerik:AjaxSetting>
            </AjaxSettings>
    </telerik:RadAjaxManager>  
 
    <telerik:RadGrid ID="ParentGrid">
 
    </telerik:RadGrid>
 
    <asp:TabContainer ID="tc1" runat="server">
        <asp:TabPanel ID="tp1" runat="server">
            <telerik:RadGrid ID="ChildGrid1"/>
        </asp:TabPanel>
         
        <asp:TabPanel ID="tp2" runat="server">
            <telerik:RadGrid ID="ChildGrid2"/>
        </asp:TabPanel>
         
        <asp:TabPanel ID="tp3" runat="server">
            <telerik:RadGrid ID="ChildGrid3"/>
        </asp:TabPanel>
    </asp:TabContainer>
 
</masterpage>

One forum post I read somewhere suggested that I should not use the RadAjaxManager and instead just put UpdatePanels around all the things that need it. But that would not work for me as I have some popup forms that on closing call this bit of javascript to refresh the grids managed by the RadAjaxManager.

function refreshGrid(arg) {
    $find("<%# RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
}

So ditching the RadAjaxManager is not an option.

Could someone please suggest the correct way to set out a page like this with the RadAjaxManager?



Rishi
Top achievements
Rank 1
 answered on 15 Jan 2014
1 answer
169 views
Hello,

I'm using OLAP connection to pivot grid, I have noticed that when i use the paging also Pivot Grid queries for the whole data set and displays the current page, on every page shift it does the same without using the initially retrieved data set or requesting for the current dataset. Its a huge performance hit in my case. is it possible to avoid this?

Regards,
Yohan
Vasil
Telerik team
 answered on 15 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?