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

When i paste the following text 

<p class="MsoBodyText">
<h3>Sample Text</h3>
</p>

in the "HTML" view of the telerik rad editor, switch the view to "Design" and back to "HTML" again, the text is changed to :

<p class="MsoBodyText">&nbsp;</p>
<h3>Sample Text</h3>
<p>&nbsp;</p>

Is there a property that i can set, which will stop telerik editor (RadControls for ASPNET AJAX Q1 2009) from changing my original text?

Regards
Kiran...
Rumen
Telerik team
 answered on 11 Sep 2009
1 answer
127 views
Hi,

In my scenario, I've a remove btn which on clicking should remove the rows.(I cannot rebind the grid). I manually have to
clear the controls.

So, I do the foll:

foreach(GridDataItem obItem in Radgrid1.SelectedItems)
{
 obItem.Controls.Clear();
}

But the problem with this approach is , though it clears the rows . the grid has an empty row. I don't need the row at all.

When user selects a row and clicks remove btn, he should not see the contents as well as grid lines. pls help me with code.

Note: pls I cannot rebind. so , give me a diff approach.

Shinu
Top achievements
Rank 2
 answered on 11 Sep 2009
1 answer
73 views
I have some code to highlight text, bold text and convert text to hyperlink based on some condition in the RadGrid1_ItemDataBound event. However, when I click on expand/collapse of the grid, all the changes made disappears. How do I retain the changes I've made in the ItemDataBound?
Many Thanks in advance.


Code:

 

<GroupByExpressions>

 

 

<telerik:GridGroupByExpression>

 

 

<SelectFields>

 

 

<telerik:GridGroupByField FieldAlias="searchfield" FieldName="searchfield" HeaderText="Search Field"></telerik:GridGroupByField>

 

 

</SelectFields>

 

 

<GroupByFields>

 

 

<telerik:GridGroupByField FieldName="searchfield"></telerik:GridGroupByField>

 

 

</GroupByFields>

 

 

</telerik:GridGroupByExpression>

 

 

</GroupByExpressions>

 

 

<RowIndicatorColumn>

 

 

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

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

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

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

.
.
.

</

 

Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

Code behind:

protected

 

void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)

 

{

 

if (e.Item is GridDataItem)

 

{

 

GridDataItem item = (GridDataItem)e.Item;

 

 

if (item["uemail"].Text.ToLower().Contains(TextBox1.Text.ToLower()))

 

{

 

string text = item["uemail"].Text;

 

 

string substring = "<b>" + text.Substring(text.IndexOf(TextBox1.Text, System.StringComparison.CurrentCultureIgnoreCase), TextBox1.Text.Length) + "</b>";

 

item[

"uemail"].Text = Regex.Replace(text, TextBox1.Text, substring, RegexOptions.IgnoreCase);

 

}


}

}

Saritha B
Top achievements
Rank 1
 answered on 11 Sep 2009
3 answers
154 views

I'm using 2009 Q2 SP1 and have a RadEditor in a FormView, bound to a datasource using declarative databinding:

<telerik:RadEditor ID="RadEditor1" runat="server"   
     Content='<%# Bind("Content") %>'>  
 

I also have a regular texbox in the same FormView EditTemplate. When updating, the underlying table is updated to the value in the regular textbox but not the value from the RadEditor.

I then tried a simplified scenario (coyping the Codeless Save in Database example in a standard WebForm, no update panels, no code-behind, no frills) and got the same results. Is this a bug or am I missing something embarassingly obvious?

I'm about to implement a bunch of RadEditors and so far what seems like it should be a simple task has taken half a day and counting -- so any help is appreciated. :)

NOTE: This behavior is consistent between IE 7, IE 8, and FireFox 3.5.
KDL
Top achievements
Rank 1
 answered on 11 Sep 2009
3 answers
202 views
I watn functionality like this

i hv one form contain one button on that button click the radwindow open ,,,,In that window it contains some link button , i need to open the that page in to Parent window screen not in Inside the radwindow ........when it open the page it will minimize the radwindow on minimize zone



Is this possible ? how to open the new form in parent window screen on clicking of radwindow(child window) button click .   

Urgent reply please

thanks
regards
rahul
Casey
Top achievements
Rank 1
 answered on 10 Sep 2009
8 answers
479 views
Hi!

I have a doubt. In my page I use RadAjaxManager when I have an action in my RadGrid and, independent or not of exception, I would like to show a message in a label. The code you can see below:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="rgVeiculos" LoadingPanelID="RadAjaxLoadingPanel1" />
        </UpdatedControls>
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="rcbVeiculo" LoadingPanelID="RadAjaxLoadingPanel1" />
        </UpdatedControls>
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="rcbClassificacao" LoadingPanelID="RadAjaxLoadingPanel1" />
        </UpdatedControls>
    </telerik:AjaxSetting>      
    
    <telerik:AjaxSetting AjaxControlID="rgVeiculos">
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="rgVeiculos" LoadingPanelID="RadAjaxLoadingPanel1" />
        </UpdatedControls>
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="trMensagem" LoadingPanelID="RadAjaxLoadingPanel1" />
        </UpdatedControls>
    </telerik:AjaxSetting>  
    
    <telerik:AjaxSetting AjaxControlID="btnBuscarVeiculos">
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="rcbVeiculo" LoadingPanelID="RadAjaxLoadingPanel1" />
        </UpdatedControls>
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="rcbClassificacao" LoadingPanelID="RadAjaxLoadingPanel1" />
        </UpdatedControls>
    </telerik:AjaxSetting>                                                           
    
    <telerik:AjaxSetting AjaxControlID="btnBuscarClassif">
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="rcbClassificacao" LoadingPanelID="RadAjaxLoadingPanel1" />
        </UpdatedControls>
    </telerik:AjaxSetting>                                                           
    
</AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Telerik" >
</telerik:RadAjaxLoadingPanel>


I will put the code of RadGrid:
                        <telerik:RadGrid ID="rgVeiculos" Width="100%" Skin="Telerik"
                            runat="server" AllowPaging="true" AllowSorting="true"
                            GridLines="None"  AutoGenerateColumns="false" PageSize="20"
                            OnItemCreated="rgVeiculos_ItemCreated"
                            OnNeedDataSource="rgVeiculos_NeedDataSource"
                            OnDeleteCommand="rgVeiculos_DeleteCommand">
                            <MasterTableView GridLines="None" DataKeyNames="IdFrotaModelo" Name="TableViewVeiculos">
                                <Columns>
                                    <telerik:GridBoundColumn UniqueName="Fabricante" HeaderText="Fabricante" DataField="Fabricante" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="Veiculo" HeaderText="Veículo" DataField="Veiculo" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="Classificacao" HeaderText="Classificação" DataField="Classificacao" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="Categoria" HeaderText="Categorias Habilitação" DataField="Categorias" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    
                                    <telerik:GridTemplateColumn UniqueName="TemplateEditColumn">
                                        <ItemTemplate>
                                            <asp:HyperLink ID="EditLink" runat="server" Text="Editar"></asp:HyperLink>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Remove" CommandName="Delete" ConfirmTitle="Exclusão" ConfirmText="Deseja realmente excluir este veículo?" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="60px"></telerik:GridButtonColumn>
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>


I will put the code I use for label:
                <tr id="trMensagem" runat="server" visible="false">
                    <td valign="middle">
                        <asp:Panel ID="pnlMsg" runat="server" BackColor="#FFFFAA" Height="25px">
                            &nbsp;&nbsp;<asp:Label ID="lblResultado" runat="server" Text="" Font-Names="Verdana" Font-Size="9"></asp:Label>
                        </asp:Panel>
                    </td>
                </tr>

So, If I try to remove some item of my grid, I would like to show a message for the user, but nothing occur in a page. In a code behind, I try something like this:

trMensagem.Visible = true;
lblResultado.Text = "Message for user";


Someone know how I can overcome this problem?
Carlos Eduardo Nogueira
Top achievements
Rank 1
 answered on 10 Sep 2009
4 answers
152 views
Hello everyone,

Here is my situation.

1.  Using a RadGrid.
2.  Using a EditForm template.
3.  In the edit form template i have a RadCalendar and a Listbox.
4.  In the list box i have a series of dates that i want to use to select dates in the RadCalendar.
5.  I want to use the RadCalendar to select dates.. and have it put into the listbox.
6.  I can see the RadCalendar in Javascript.. i can add/remove elements etc but I am having a hell of a time getting the javascript to see the listbox (so that i can update it).

Here is the code so far (work in progress)

 

function getElements(calendarInstance, args) {

 

 

1 var grid = $get('<%= grdElectives.ClientID %>');

 

2 alert(

'gridElectives found: ' + grid);

 

 

3 var dates = calendarInstance.get_selectedDates();

 

 

4 var i = 0;

 

 

5 for (i = 0; i < dates.length; i++) {

 

6 alert(dates[i]);

7 }

 

8 var todaysDate = new Date();

 

 

9 var todayTriplet = [todaysDate.getFullYear(), todaysDate.getMonth() + 1, todaysDate.getDate()];

 

 

10 var tomorrowTriplet = [todaysDate.getFullYear(), todaysDate.getMonth() + 1, todaysDate.getDate() + 1];

 

 

11 var selectedDates = [todayTriplet, tomorrowTriplet];

 

12 calendarInstance.selectDates(selectedDates,

true);

 

}

Line 1 gets the grid instance correctly (as line 2 is showing Grid Electives found: OBJECT in the alert box)
But i need to find the listbox control that is within that grid (the name of the listbox is lstDates)
I know that once i have an instance of the listbox i can read/write to it.... which is what i need to do despirately

Cannot for the life of me get this to work.

Any help is appreciated.

Jacob Button
Top achievements
Rank 1
 answered on 10 Sep 2009
1 answer
103 views
Hello,

At what point in the process does the RadSpell control actually write the updated content to the textbox?  I'm trying to, when the spell check has finished, post back to the server with the updated content.  The postback works, but the content is not correct...  so at what point is the content written back to the control that was spell checked?

And is there a property on the spell check control that stores the updated text?

Thanks.
Brian Mains
Top achievements
Rank 1
 answered on 10 Sep 2009
1 answer
98 views
I'm looking at using Rad Window for "tell a friend" on our site. There would be a link on every page that would open a Rad Window that contains a form that will email the current page Title and URL to the recipient.

My question is that I'm not sure how to pass the current page information to the form in the Rad Window.

if anyone can point me in the right direction, I'd appreciate it.
Elizabeth
Top achievements
Rank 1
 answered on 10 Sep 2009
3 answers
99 views

I have client grouping on and am not able to group by the gridButtonColumn.  Here is the line am am using.  I have Groupable set to true.  Am I missing something here?

<

 

telerik:GridButtonColumn Groupable="true" HeaderText="View Letter" DataTextField="LetterID" GroupByExpression="LetterID" UniqueName="vLetter" ButtonType="LinkButton">

 

 

</telerik:GridButtonColumn>

 

Pavlina
Telerik team
 answered on 10 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?