Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
163 views
Our Framework has gotten to a point where we need to handle AsyncPostBackErrors in different ways on the same page.  Here is an example of my problem in short.  We want to display ErrorTextA using an "alert();" if an error is thrown in systemA... which is simple enough.  But on the same page we want ErrorTextB to be displayed on a label if an error is thrown in systemB.  Is there a way to Differentiate between the two or have two AsyncPostBackError handlers on the same page?  Basicly I need to know if the error came from SystemA or SystemB.
Iana Tsolova
Telerik team
 answered on 26 Nov 2009
0 answers
119 views
Hi Telerik,

          I am using the rad grid user control edit form. Inside the user control i have a list box which populates the data dynamically.
I have a selectedindexchanged fn trigered whn i click on the items in the list box that works fine. I have 10 items in the listbox after randomly clicking few items when i click the update or cancel button, the selectedindexchanged fn gets fired first and then the
control goes to the update in the aspx.cs page, This also happens once in a while.The grid is placed in the Ajax panel. Do you people have any idea about this. Please let me know your ideas on this.

Thanks
Arun.M
Arun
Top achievements
Rank 1
 asked on 26 Nov 2009
1 answer
302 views
Hi,

How do you change the files of type available upon clicking the Browse button in the FileUploader.ascx dialog? I only want to limit it with the file extensions allowed to be uploaded. I hope you can help me out here.

Thanks
Dobromir
Telerik team
 answered on 26 Nov 2009
0 answers
94 views
Hi,
I am trying to build a  tree view and it works fine with just a normal datatable bound to it and shows everything. But I want to be able to pass a value such as '3' to the parent value and then for the treeview to show me all the child records under 3 and also all there  grandchildren.


ID        ParentID
1            Null
2             1
3             1
4             3
5             3
6             4
7             6  
8             5

I hope that makes sense


Thanks

Simon
Simon Allport
Top achievements
Rank 2
 asked on 26 Nov 2009
4 answers
168 views
Hi,

When the grid loads or is paged or sorted - I need to have the first row selected and to be able to pass the ID of that row to a seperate details section on the same page. (The ID is taken by a data reader which populates some labels) - Is this possible please?

For selecting the row, I tried converting the SelectFirstGridRow from the WebMail demo but in VB 'OfType' was not available.

private void SelectFirstGridRow()  
    {  
        GridDataItem firstDataItem = RadGrid1.Items.OfType<GridDataItem>().FirstOrDefault();  
        if (firstDataItem != null)  
            firstDataItem.Selected = true;  
    }  
 
 
Private Sub SelectFirstGridRow()  
    Dim firstDataItem As GridDataItem = RadGrid1.Items.OfType(Of GridDataItem)().FirstOrDefault()  
    If firstDataItem <> Nothing Then  
        firstDataItem.Selected = True 
    End If  
End Sub  
 
 

Cheers, Jon


John Davis
Top achievements
Rank 2
 answered on 26 Nov 2009
1 answer
93 views
Hello,
I've a grid on a webpage and I need to refresh it every 30 seconds to get new data from the database. How can I do that? Do I have to use the Rebind method or there's another way?
Princy
Top achievements
Rank 2
 answered on 26 Nov 2009
2 answers
134 views
Hi,

I'm trying to display a Grid in a Popup Panel. The problem is when the popup is first diplayed the columns are not frozen. Only after I click on a column's header for sorting, will the "column freezing" work.
Any idea why is that so? Or how to fix this and make the "column freezing" work on display?

Thanx.

Dax

        <asp:ScriptManager ID="ScriptManager1" runat="server"
        </asp:ScriptManager> 
         
    <asp:Button runat="server" ID="cmdPopupTarget" Style="display: none" />     
    <cc1:ModalPopupExtender ID="popupExt" runat="server" TargetControlID ="cmdPopupTarget"  
    PopupControlID ="panPopup" DropShadow="True" BackgroundCssClass ="ISPopupBackground"  
    OkControlID="panPopup$cmdPopupOk" BehaviorID="programmaticModalPopupBehavior" RepositionMode="RepositionOnWindowScroll"</cc1:ModalPopupExtender>    
 
        <asp:Panel runat="server" ID="panPopup" Style="display: none; padding: 10px" CssClass ="ISPopup">                 
        <div> 
        <asp:Panel runat="server" ID="popContent" > 
        <div> 
            <asp:UpdatePanel ID="upaPopup" runat="server" UpdateMode="Conditional" > 
            <ContentTemplate>   
 
                <telerik:RadGrid ID="RadGrid1" AllowSorting="true" GridLines="Both" width="500px" runat="server"
                    <ClientSettings>  
                        <Scrolling AllowScroll="true" FrozenColumnsCount="2" UseStaticHeaders="true" />  
                    </ClientSettings>  
                    <HeaderStyle Width="200px"/> 
                </telerik:RadGrid> 
 
            </ContentTemplate>  
            </asp:UpdatePanel>  
        </div> 
        <asp:Button ID="cmdPopupOk" runat="server" Text="Ok"/> 
        </asp:Panel> 
        </div> 
        </asp:Panel> 
 
        <asp:Button ID="Button1" runat="server" Text="Button" /> 

    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
 
    End Sub 
 
    Protected Sub Button1_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles Button1.Click 
        Dim DS As DataSet 
        Dim CN As SqlConnection 
        Dim DA As SqlDataAdapter 
 
        DS = New DataSet() 
        CN = New SqlConnection("Server=xxx;Database=xxx;User ID=xxx;Password=xxx;Trusted_Connection=False;"
        DA = New SqlDataAdapter("Select top 10 * From time_hist", CN) 
        DA.Fill(DS, "time_hist"
 
        RadGrid1.DataSource = DS.Tables("time_hist"
        RadGrid1.DataBind() 
 
        upaPopup.Update() 
        popupExt.Show() 
 
    End Sub 
Pavlina
Telerik team
 answered on 26 Nov 2009
13 answers
341 views
Hi you all,

I got this error whe i filter on my rad grid. Before the opening of this thread i read all the other threads that talk about this error but nothing helps me to resolve the problem.

This is my grid:

'<telerik:RadGrid  AllowPaging="True" ID="dgLista" runat="server" Skin="Office2007" OnNeedDataSource="dgLista_NeedDataSource"
                         Font-Size="X-Small" AllowFilteringByColumn="True" AllowSorting="True" PageSize="18" PagerStyle-Mode="NextPrevAndNumeric" 
                         AutoGenerateColumns="False"
                         GridLines="None" OnItemCreated="dgLista_ItemCreated" 
                            >                           
                            <MasterTableView DataKeyNames="ID">
                               
                            </MasterTableView>
                            
                            <ItemStyle Font-Size="X-Small"  BackColor="AliceBlue" />
                            <PagerStyle Font-Size="Smaller" />
                            <HeaderStyle Font-Size="Smaller" />
                            <AlternatingItemStyle Font-Size="X-Small" BackColor="Lavender" BorderColor="Transparent" />
                            <FilterMenu EnableTheming="True">
                                <CollapseAnimation Type="OutQuint" Duration="200">
                                </CollapseAnimation>
                            </FilterMenu>
                        </telerik:RadGrid>'
and this is the function the populate the rid columns:

'private void CreaColonne(Hashtable TabellaConRicerca)
        {

            // BoundField ColonnaConteggio;
            Metodi.StrutturaRicerca Record = new Metodi.StrutturaRicerca();
            GridBoundColumn myColumn;

            string sCampiSelect = string.Empty;


            #region Sezione per il pulsante visualizza


            GridButtonColumn imgCol = new GridButtonColumn();
            //dgLista.MasterTableView.Columns.Add(imgCol);
            dgLista.Columns.Add(imgCol);
            imgCol.HeaderText = "VIEW";
            imgCol.ImageUrl = "~/Images/WebView.gif";
            imgCol.UniqueName = "View";
            imgCol.Resizable = false;
            imgCol.Reorderable = false;
            imgCol.ButtonType = GridButtonColumnType.ImageButton;
            
            
            
            #endregion

            #region Sezione per colonne IMG,SPO,FAS

            //Controllo se nelle impostazioni sono attivi 
            if (Metodi.RicavaValoreDiDefault(Cost_Impostazioni.VEDINDOC, _iIdUtente, int.Parse(Metodi.Decripta(Session[Cost_Sessioni.DATABASE_ID].ToString())), Metodi.Decripta(Session[Cost_Sessioni.CONNESSIONE_DA_MASTER].ToString())) == Cost_Impostazioni.IMPOSTAZIONE_ATTIVA)
            {
                //ILIB_Aggiunto controllo Telerik
                myColumn = new GridBoundColumn();
                //dgLista.MasterTableView.Columns.Add(myColumn);
                dgLista.Columns.Add(myColumn);
                myColumn.DataField = "IMG";
                myColumn.SortExpression = "IMG_NUMBER";
                myColumn.HeaderText = "IMG";
                myColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
                myColumn.ItemStyle.Width = Unit.Pixel(40);
                myColumn.AllowFiltering = false;
                myColumn.Reorderable = true;


            }

            if (Metodi.RicavaValoreDiDefault(Cost_Impostazioni.VEDINSPOOL, _iIdUtente, int.Parse(Metodi.Decripta(Session[Cost_Sessioni.DATABASE_ID].ToString())), Metodi.Decripta(Session[Cost_Sessioni.CONNESSIONE_DA_MASTER].ToString())) == Cost_Impostazioni.IMPOSTAZIONE_ATTIVA)
            {
                //ILIB_ Aggiunto controllo Telerik
                myColumn = new GridBoundColumn();
                //dgLista.MasterTableView.Columns.Add(myColumn);
                dgLista.Columns.Add(myColumn);
                myColumn.DataField = "SPO";
                myColumn.SortExpression = "SPO_NUMBER";
                myColumn.HeaderText = "SPO";
                myColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
                myColumn.ItemStyle.Width = Unit.Pixel(40);
                myColumn.AllowFiltering = false;
                myColumn.Reorderable = true;


            }

            if (Metodi.RicavaValoreDiDefault(Cost_Impostazioni.VEDINFASCICOLO, _iIdUtente, int.Parse(Metodi.Decripta(Session[Cost_Sessioni.DATABASE_ID].ToString())), Metodi.Decripta(Session[Cost_Sessioni.CONNESSIONE_DA_MASTER].ToString())) == Cost_Impostazioni.IMPOSTAZIONE_ATTIVA)
            {

                //ILIB_Aggiunto controllo Telerik
                myColumn = new GridBoundColumn();
                //dgLista.MasterTableView.Columns.Add(myColumn);
                dgLista.Columns.Add(myColumn);
                myColumn.DataField = "FAS";
                myColumn.SortExpression = "FAS_NUMBER";
                myColumn.HeaderText = "FAS";
                myColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
                myColumn.ItemStyle.Width = Unit.Pixel(40);
                myColumn.AllowFiltering = false;
                myColumn.Reorderable = true;

            }

            #endregion

            //int iColonne = Convert.ToInt32(Request.QueryString.Get("NCampi"));

            for (int i = 0; i <= _iColonna; i++)
            {
                foreach (DictionaryEntry Elemento in TabellaConRicerca)
                {
                    Record = (Metodi.StrutturaRicerca)Elemento.Value;
                    Record.TabellaLookup = Record.TabellaLookup + string.Empty;
                    if (Record.Ordinamento == i)
                    {
                        switch (Record.Tipo)
                        {
                            case Cost_Common.TIPO_LCK_TESTO:
                            case Cost_Common.TIPO_LCK_NUMERICO:

                                #region Colonne di Lookup

                                //BoundField ColonnaLookup;
                                GridBoundColumn LookUpCol;
                                //Estraggo il codice del lookup soltanto se è attiva la voce nella tabella impostazioni
                                if (Metodi.RicavaValoreDiDefault(Cost_Impostazioni.VEDICODELOOKUP, _iIdUtente, int.Parse(Metodi.Decripta(Session[Cost_Sessioni.DATABASE_ID].ToString())), Metodi.Decripta(Session[Cost_Sessioni.CONNESSIONE_DA_MASTER].ToString())) == Cost_Impostazioni.IMPOSTAZIONE_ATTIVA)
                                {
                                    
                                    LookUpCol = new GridBoundColumn();
                                    //dgLista.MasterTableView.Columns.Add(LookUpCol);
                                    dgLista.Columns.Add(LookUpCol);
                                    LookUpCol.DataField = Record.NomeCampo;
                                    LookUpCol.SortExpression = Record.NomeCampo;
                                    LookUpCol.HeaderText = Record.NomeCampo;
                                    LookUpCol.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
                                    LookUpCol.ItemStyle.Width = Unit.Pixel(100);
                                    LookUpCol.Resizable = true;
                                    LookUpCol.AllowFiltering = true;
                                    LookUpCol.Reorderable = true;


                                }


                                //ILIB_Aggiunto Controllo Telerik
                                LookUpCol = new GridBoundColumn();
                                //dgLista.MasterTableView.Columns.Add(LookUpCol);
                                dgLista.Columns.Add(LookUpCol);
                                LookUpCol.DataField = Record.DescrLookup;
                                LookUpCol.SortExpression = Record.DescrLookup;
                                LookUpCol.HeaderText = Record.DescrLookup;
                                LookUpCol.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
                                LookUpCol.ItemStyle.Width = Unit.Pixel(100);
                                LookUpCol.Resizable = true;
                                LookUpCol.AllowFiltering = true;
                                LookUpCol.Reorderable = true;


                                break;

                                #endregion

                            case Cost_Common.TIPO_DATA:

                                #region Colonne di Tipo Data

                                GridBoundColumn DataCol = new GridBoundColumn();
                                //dgLista.MasterTableView.Columns.Add(DataCol);
                                dgLista.Columns.Add(DataCol);
                                DataCol.DataField = "DV_" + Record.NomeCampo;
                                DataCol.SortExpression = "DO_" + Record.NomeCampo;
                                DataCol.HeaderText = Record.NomeCampo;
                                DataCol.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
                                DataCol.ItemStyle.Width = Unit.Pixel(100);
                                DataCol.Resizable = true;
                                DataCol.AllowFiltering = true;
                                DataCol.Reorderable = true;
                                


                                break;

                                #endregion

                            default:

                                #region Colonna Generica

                                GridBoundColumn GenericCol = new GridBoundColumn();
                                //dgLista.MasterTableView.Columns.Add(GenericCol);
                                dgLista.Columns.Add(GenericCol);
                                GenericCol.DataField = Record.NomeCampo;
                                GenericCol.SortExpression = Record.NomeCampo;
                                GenericCol.HeaderText = Record.NomeCampo;
                                GenericCol.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
                                GenericCol.ItemStyle.Width = Unit.Pixel(100);
                                GenericCol.Resizable = true;
                                GenericCol.AllowFiltering = true;
                                GenericCol.ShowFilterIcon = true;
                                GenericCol.ShowSortIcon = true;
                                GenericCol.Reorderable = true;



                                break;

                                #endregion
                        }

                        //Forzo l'uscita appena trovo l'ordinamento corretto 
                        break;
                    }
                }
            }

        }'

i have the xhtmlConformance mode set to Transitional. 

Can you halp me please?

Thanks in advance,

Ilber
Ilber
Top achievements
Rank 1
 answered on 26 Nov 2009
1 answer
118 views

The defaultLabelValue is not working for me..
Here is my code:

              
chartControl.ChartTitle.TextBlock.Text = "My RadChart";  
            ChartSeries chartSeries = new ChartSeries("Sales",ChartSeriesType.Bar);  
 
            for(int i=0;i<10;i++)  
            {  
                chartSeries.AddItem(i+10,"hello"+i);  
            }  
            chartSeries.DefaultLabelValue = "#Y";  
            chartControl.AddChartSeries(chartSeries); 
 chartControl is my radChart..
I want the labels to be the integer values instead of the string displayed..
Thks for your help.
Ves
Telerik team
 answered on 26 Nov 2009
1 answer
112 views
Hi,

I have a master page which has RadAjaxManager in it , and web user control that has a simple form & simple controls on it with a submit linkbutton. On my user control I have a Radcombobox which is ajaxified by RadAjaxManagerProxy and I set the UpdatedControls prior to it. These are some labels, some textboxes and 1 submit linkbutton.

As I expected the Radcombobox does ajax post back and updates the controls needed. But when I click to the linkbutton which submits the form of web user control, it does nothing. Then I figured out that it does what it is expected, but doing postback in ajax . I mean the page is not normal postbacking. The button also ajaxifed. But I set the button only UpdatedControls setting of Radajaxmanagerproxy.  When I remove the button from updated controls it postbacks normally which I wanted to be. I am ajaxifiying it because according to the combobox 's value  i am enabling or disabling the linkbutton. So I need to add linkbutton to updatedcontrols collection. But I donot want its postback feature being ajaxified.

Here is my Radajaxmanagerproxy definitions

<

 

telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="ddl">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="lbl1" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

<telerik:AjaxUpdatedControl ControlID="lbl2" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

<telerik:AjaxUpdatedControl ControlID="lbl3" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

<telerik:AjaxUpdatedControl ControlID="lbl4" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

<telerik:AjaxUpdatedControl ControlID="lbl5" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

<telerik:AjaxUpdatedControl ControlID="txt" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

<telerik:AjaxUpdatedControl ControlID="rbl" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

<telerik:AjaxUpdatedControl ControlID="btn" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

<telerik:AjaxSetting AjaxControlID="uc1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="uc1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

 

</AjaxSettings>

 

</

 

telerik:RadAjaxManagerProxy>

 

Johny
Top achievements
Rank 1
 answered on 26 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
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
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?