Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
208 views
If I have a RADGrid, such as:

        <telerik:RadGrid runat="server" ID="radGrid" PageSize="25" 
            AllowPaging="true"  
            AllowSorting="true"  
            AutoGenerateColumns="false" > 
            <PagerStyle Mode="NextPrevNumericAndAdvanced" /> 
            <MasterTableView> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="ItemNumber" HeaderText="Item number" AllowSorting="true"  /> 
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Name" /> 
                    <telerik:GridBoundColumn DataField="ShortDescription" HeaderText="Description" /> 
                    <telerik:GridBoundColumn DataField="Price" HeaderText="Price" /> 
                </Columns> 
            </MasterTableView> 
        </telerik:RadGrid> 

What is the preferred way to localize the HeaderText values ? (Say, if the page is being shown in the Danish culture, I would like to display the danish names as column headers, instead of english ones).

I possible, I would like to do this in the markup. I already have a helper method such as:
HeaderText="<%= Translate.Text("ItemNumber") %>" 

But if I try to do this on a Column, I get a parser error: "Literal content ('<telerik:GridBoundColumn DataField="ItemNumber" HeaderText="') is not allowed within a 'Telerik.Web.UI.GridColumnCollection'."
Shinu
Top achievements
Rank 2
 answered on 05 Nov 2009
4 answers
221 views
How to scroll to top of editor programatically?
I have several long documents. 
After scroll to bottom of first document, I load the second document, the editor position remain at the bottom.
How do I bring it back up to the top?

Thanks. 
Rumen
Telerik team
 answered on 05 Nov 2009
1 answer
115 views
q2 2009

hiya,

I can't see any reason why you wouldn't explicitly disable viewstate for every control in a radGrid's editTemplate in the demos.
Let me know if there is a good reason, otherwise, disable  it in your demos, the performance will benefit.

If this helps,  you know who to credit the points to....

yogi




Mira
Telerik team
 answered on 05 Nov 2009
1 answer
97 views
Hi,
     Please could you tell me if the fitlering buttons are customizable (i.e. can you just show a subset of them and can you rename the options)

Thanx

Robert Smith

Shinu
Top achievements
Rank 2
 answered on 05 Nov 2009
3 answers
173 views
Hello!

I have an ASP.NET-Button shipped with VS. This button is responsible for saving the data the user enters in the form. When the Page is loaded, the button should be disabled. Then I have other controls (standard VS controls), where I have "linked" the client-side onpropertychange() event. When a user for example fills out a javascript-enabled textbox, the javascript-function will enable the Save-Button. Everything is fine.

When I now - for example - use RadTextBox and link the ClientEvents-OnValueChanged with the same javascript-function, the page loads and I can see, that the Save-Button is automatically enabled?!?

Is it possible, that RadControls do not fire javascript-events on Page_Load? Are there any workarounds?

Bye

Michael
Nikolay Rusev
Telerik team
 answered on 05 Nov 2009
1 answer
141 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
135 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
431 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
127 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
122 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
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?