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

       I am using Telerikt  version 2009.1.402.20 product
       Now  iam using normal java script alert . i save some value to to  DB after that i show Like Record added succfully in alert
      using following coding

        

 

virtual protected void GenerateScriptToRedirectHomePage(string errorMessage, bool isRedirect)

 

{

 

StringBuilder RedirectPage = new StringBuilder("");

 

RedirectPage.Append(

"<script language=\"javascript\">\n window.onload = RedirectPage;\n function RedirectPage() {");

 

RedirectPage.Append(

"alert(\"" + errorMessage + "\");");

 

 

if (isRedirect)

 

{

RedirectPage.Append(

"location.href = \"" + _Referer + "\";");

 

 

 

}

 

RedirectPage.Append(

"} </script>");

 

Page.ClientScript.RegisterClientScriptBlock(GetPageType(),

"RedirectPage", RedirectPage.ToString());

 

}


once i submit the data to db after that i will call GenerateScriptToRedirectHomePage("Record submitted",true)  function
What i want is instead of normal alert i need rad alert so how to i change my code

Regards,
azees
Shinu
Top achievements
Rank 2
 answered on 05 Nov 2009
2 answers
131 views
Hi,

Using the ajaxManager.ajaxRequest method within javascript, is there any way to pass to the server details of the current GridEditFormItem that is the container for the control triggering the postback? 

For example one of the sequences of logic requires that if a date in a RadDateTimePicker changes, a routine will pass that date, another date from a further datetimepicker, a reference to an image control and a reference to a combo box to the server.  On the server the information from the two dates and the combo box will then determine what image is displayed in the image control.

Now the simplest way of managing this is to grab the GridEditFormItem and get the server to act on that, then I can easily reference it's controls using the FindControl methods.

Been on this page all day and have made great progress but am hitting a brick wall now I'm on the final stage :(

Any help would be greatly appreciated.

Best Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 05 Nov 2009
2 answers
421 views

When i use filter grid or grouping i have the problem in the subject.

I see also this post:

http://www.telerik.com/community/forums/aspnet-ajax/grid/unable-to-cast-object-of-type-telerik-web-ui-radgrid-to-type-telerik-web-ui-gridtableview.aspx

i add the httpHandlers but not work.

Thank Luca Martini

My error page is this:

Errore server nell'applicazione '/REMONIO2008'.  
--------------------------------------------------------------------------------  
 
Impossibile eseguire il cast di oggetti di tipo 'Telerik.Web.UI.RadGrid' sul tipo 'Telerik.Web.UI.GridTableView'.   
Descrizione: Eccezione non gestita durante l'esecuzione della richiesta Web corrente. Per ulteriori informazioni sull'errore e sul suo punto di origine nel codice, vedere l'analisi dello stack.   
 
Dettagli eccezione: System.InvalidCastException: Impossibile eseguire il cast di oggetti di tipo 'Telerik.Web.UI.RadGrid' sul tipo 'Telerik.Web.UI.GridTableView'.  
 
Errore nel codice sorgente:   
 
Durante l'esecuzione della richiesta Web corrente Ã¨ stata generata un'eccezione non gestita. Per informazioni sull'origine e la posizione dell'eccezione, vedere l'analisi dello stack dell'eccezione riportata di seguito.    
 
Analisi dello stack:   
 
 
[InvalidCastException: Impossibile eseguire il cast di oggetti di tipo 'Telerik.Web.UI.RadGrid' sul tipo 'Telerik.Web.UI.GridTableView'.]  
   Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +2771  
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13  
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175  
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565  
 
   
 
 
--------------------------------------------------------------------------------  
Informazioni di versione: Versione di Microsoft .NET Framework:2.0.50727.3082; Versione di ASP.NET:2.0.50727.3082  

My asp code is this:

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>  
                                                                <telerik:RadGrid id="RadGrid1" runat="server" AllowFilteringByColumn="True"   
                                                                    AllowPaging="True" AllowSorting="True" GridLines="None" ShowGroupPanel="True"  >  
                                                                   <MasterTableView AutoGenerateColumns="False">  
                                                                    <Columns>  
                                                                         <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Unita Economiche">    
                                                                            <ItemTemplate>  
                                                                                <asp:linkbutton id=LinkUe runat="server" CssClass="LinkElencoPortafogli" Text='<%# DataBinder.Eval(Container.DataItem, "IdUe")  %>' CommandName='<%# DataBinder.Eval(Container.DataItem, "IdUe") %>' CommandArgument='<%# DataBinder.Eval(Container.DataItem, "TipologiaUe") %>' ToolTip="Premi per visualizzare i dati dell'Unità Economica">  
                                                                                </asp:linkbutton>  
                                                                            </ItemTemplate>  
                                                                         </telerik:GridTemplateColumn>  
                                                                        
                                                                         <telerik:GridBoundColumn HeaderText="Denominazione" DataField="Denominazione"  
                                                                          UniqueName"Denominazione"></telerik:GridBoundColumn>  
                                                                          <telerik:GridBoundColumn HeaderText="Regione" DataField="Regione"  
                                                                          UniqueName"Regione"></telerik:GridBoundColumn>  
                                                                           <telerik:GridBoundColumn HeaderText="provincia" DataField="provincia"  
                                                                          UniqueName"provincia"></telerik:GridBoundColumn>   
                                                                          <telerik:GridBoundColumn HeaderText="Comune" DataField="Comune"  
                                                                          UniqueName"Comune"></telerik:GridBoundColumn>     
                                                                           <telerik:GridBoundColumn HeaderText="Indirizzo" DataField="Indirizzo"  
                                                                          UniqueName"Indirizzo"></telerik:GridBoundColumn>     
                                                                          <telerik:GridTemplateColumn UniqueName="TemplateColumn1" HeaderText="Planimetria">    
                                                                            <ItemStyle Width="110px" VerticalAlign="Top"></ItemStyle>  
                                                                            <ItemTemplate>  
                                                                                <asp:linkbutton id="linkGS" runat="server" CssClass="LinkElencoPortafogli" Text='planimetrie' CommandName='<%# DataBinder.Eval(Container.DataItem, "IdUe") %>' CommandArgument='<%# DataBinder.Eval(Container.DataItem, "TipologiaUe") %>' ToolTip="Premi per visualizzare i dati nella gestione spazi">  
                                                                                </asp:linkbutton>  
                                                                            </ItemTemplate>  
                                                                        </telerik:GridTemplateColumn>  
                                                                    </Columns>  
                                                                   </MasterTableView>  
                                                                     <ClientSettings AllowDragToGroup="True">  
                                                                         <Scrolling AllowScroll="True" UseStaticHeaders="True" />  
                                                                     </ClientSettings>  
                                                                </telerik:RadGrid> 

My c# code is this:

private void EstrazioneRicerca()  
        {             
            DataTable MiaDataTableRicerca = new DataTable();  
            ConnessioneDb.Open();  
            try  
            {  
                SqlCommand cmd = Funzioni.CreaSqlCommand("StpRicercaUe", ConnessioneDb, null);  
                cmd.Parameters.Add(new SqlParameter("@ClausolaWhere", SqlDbType.NVarChar, 1000)).Value = ClausolaWhere();  
                SqlDataAdapter MioAdapterRicerca = new SqlDataAdapter(cmd);  
                MioAdapterRicerca.Fill(MiaDataTableRicerca);  
            }  
            finally  
            {  
                ConnessioneDb.Close();  
            }  
 
            if(MiaDataTableRicerca.Rows.Count == 0)  
            {  
                Label24.Text = "Non sono state trovate Unità Economiche con i parametri di ricerca digitati.";   
                Label24.Visible = true;  
                Datagrid1.CurrentPageIndex = 0;  
                Table18.Visible = false;  
                Label2.Visible = false;  
                Datagrid1.Visible = false;  
                NextBackPager1.Visible = false;  
                PageNumbersPager1.Visible = false;  
                NextBackPager2.Visible = false;  
            }  
            else  
            {  
                Label24.Visible = false;   
 
                RadGrid1.DataSource = MiaDataTableRicerca;  
                RadGrid1.DataBind();  
            }  
        } 

Lasly
Top achievements
Rank 1
 answered on 05 Nov 2009
1 answer
122 views
Hi Telerik-Team,

I have two RadWindow add to an RadWindoManager.

First I open a window to show some stuff. On this window you can open another window
thats partly overlayed on the first. THis window shows a java applet (grafic / MAP24TP Routing).

On IE there isn't a probelm. But on Firefox 3.x the content of the second window
will only shown if you move the window out of overlaying the first window. Then the content
is shown correctly or partly.

I habe added a jpg that shows the problem.
Whats the solution for that?

Thanks alot
CHrisitan
Georgi Tunev
Telerik team
 answered on 05 Nov 2009
1 answer
111 views
hi,

Why the calendar not hiding on clicking outside of that? is that the normal behaviour? anyone know how to hide that?

thanks.
Shinu
Top achievements
Rank 2
 answered on 05 Nov 2009
3 answers
107 views
Hi

I am trying to change the paging configuration size for the number of items displayed in the Image/Flash/Media/Document manager dialogs but cannot see where I would set this value.

I have followed the instructions in the "Customising Built In Dialogs" page and have been looking at the source of the "/EditorDialogs/FileBrowse.acsx" control :

            <telerik:RadFileExplorer ID="RadFileExplorer1" Height="410px" Width="400px" TreePaneWidth="150px" 
                runat="Server" EnableOpenFile="false" AllowPaging="true"
 


...but cannot see how I would change the paging configuration to limit results to say 10 per page.

Thanks

Steve
Lini
Telerik team
 answered on 05 Nov 2009
1 answer
111 views
Hi,

I want to bing nested grid inside the ItemDataBound event of parent grid but don't know how to get reference of Nested grid.
e.item.findControl is not working here.

Please help me out if you have any solution and idea releted to nested grid binding.

Thanks in advance

Regards
Devanand Jha

Tsvetoslav
Telerik team
 answered on 05 Nov 2009
9 answers
224 views
Im trying to do some custom bindings on a combo box when its on a EditForm in a Grid.  I can make the combox work when its outside the grid but when I move it into the grid it says it cant find the refrence to the combobox???


This works perfectly when the combobox is outside of the grid, how do I make it work when its inside the grid editform template?
    Protected Sub RadComboBox1_ItemsRequested(ByVal o As ObjectByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles RadComboBox1.ItemsRequested  
        CustDropDownSQL.SelectCommand = "SELECT [CCUST], [CNME] FROM [RCM] WHERE [CMID] = 'CM' and [CNME] Like '" + e.Text + "%'  ORDER BY [CNME] ASC" 
        RadComboBox1.DataSource = CustDropDownSQL  
        RadComboBox1.DataTextField = "CNME" 
        RadComboBox1.DataValueField = "CCUST" 
        RadComboBox1.DataBind()  
    End Sub 
Vesko
Top achievements
Rank 2
 answered on 05 Nov 2009
8 answers
191 views

Hi

i'm new with telerik controls i have some questions about the radGrid

1- i have bound the grid to a sqldatasourse and set the data source insert query set allowautomaticdelete, allowautomaticedit,allowautomaticinsert all to true

now i have edit and delete buttons where is the insert button it is not shown

2- i made a normal link button insted of the insert button and but onclick event for that button 

RadGrid1.MasterTableView.InsertItem()

that show an insert form with text box for every column except the primary key it not shown of course the insert fails without the primary key

3- how can i customize the insert form (use checkbox and dropdown insted of textbox)

thanks for the help

Maher Khalil
Top achievements
Rank 1
 answered on 05 Nov 2009
7 answers
163 views
Hi,

I would like to know if there is user documentation for the Rad Editor.

I mean, the user that will use the editor is not used to work with it (they are not developpers).
I know, your editor is almost like Micorsoft Word or others, but the users ask me some documentation.
I can't give them the official Rad Editor documentation because it is for developpers.
The MOSS help button is not good enough because there are differences between the RAD Editor and the MOSS Editor.
The Rad Help button is too basic. It only describes the function of each button. I would like a real documentation with exemples, hints...

Do you have some documentation that will satisfy my users?

Thx a lot

Sylvain


Stanimir
Telerik team
 answered on 05 Nov 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?