Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
488 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
156 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
107 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
105 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
101 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
2 answers
145 views
Hello,

      I have several input text on a form . All of them I can use inside a
      javascript thru the $find function.  Unfortunately, controls that
      I have inside a usercontrol are not accessible .

      How can I access this user control inserted on my form ?

      Here is what I have.

      <%@ Register src="../item.ascx" tagname="item" tagprefix="user" %>

      <user:item id="useritem" runat=server  />

      <telerik:radtextbox id="phone" runat="server" />

      <script type="text/javascript">
          var phone = $find("%= phone.ClientID");  //..... this one works
          var user   =  $find("%= user.ClientID");  // ... does not work user is inside the useritem control.

     </script>

      I am using version 2009.2.831  (the last update)

      Thanks
Joao, 
Joao Araujo
Top achievements
Rank 1
 answered on 10 Sep 2009
2 answers
97 views
When my radgrid loads I want my GridClientSelectColumn already selected. I need to have all rows selected from the start. How do I do that in VB.Net?
Mark
Top achievements
Rank 1
 answered on 10 Sep 2009
8 answers
1.4K+ views
Hello,

I get this after an exception in an ajax callback (using RadAjaxManager) when I try to redirect to an error page using
Ajax redirect.
My code
            if ( IsInAsyncPostBack && ( AjaxManager != null ) )  
            {  
                if ( url.StartsWith("~/") )  
                    url     =   ResolveClientUrl(url);  
                AjaxManager.Redirect(url);  
            }  
            else  
                Response.Redirect(url,endResponse);  
 

May be ajaxmanager should not get Page.Response but HttpContext.Current.Response ?

May be the idea of redirecting using ajax during a call back is bad ?
In this case how to incorporate ajax in my general errors manager which redirects to a standard error page.


Thanks for help
CS
Mira
Telerik team
 answered on 10 Sep 2009
1 answer
55 views
hi
i upgraded my telerik version from 2008 to 2009.2 sp1

but my datagrid office2007 skin and anothers skins has some changes

colors, sizes , borders , grouping panel color ...

plz visit this picture:

http://img14.imageshack.us/i/theme2l.jpg/

Dimo
Telerik team
 answered on 10 Sep 2009
1 answer
183 views
Hi All,

Dynamically,I created RadDock and added an html table of 2 cells with 50% width for each.In the first cell i addel an asp.net label and asp.net textbox in the second one with100% width for each control.
In the default masterpage of sharepoint,it works fine while in another masterpage(inside sharepoint like BlueBand.master or customized one) the textbox right border becomes outside the raddock.It seems that it adds the default padding and border-width to its width because if i remove the padding and put the border width 0px then i see that the textbox becomes in the RadDock Content.
But I need the borders and the padding,also i can't put the textbox width 99% or 98%.

Is this behavior of textbox inside the RadDock an normal behavior ?

Any Help is really appreciated. 

Regards,
Ahmad
Pero
Telerik team
 answered on 10 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?