Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
167 views
Hi All,

I have a grid with column 'Status', when i click edit then in status edit column i want drop down with status values(Closed,Open) and it should select which is the status.

Please help me regarding this.
pradeep k
Top achievements
Rank 1
 answered on 26 Nov 2009
1 answer
67 views
Hi,

We as using Telerik Ajax ASP.NET control version 2009.1.402.35.
We have a requirement whether we need to show some numeric values and perform filtering on them with respect to Browser Language selected.
The first part that is fomatting of data displayed in Grid column is working file and we get the approapiate Group seperator and Decimal seperator.Below is the code which i have used

<

 

telerik:GridNumericColumn DataField="MyField" HeaderText="My Numeric Data" UniqueName="MyNumericData"

 

 

Resizable="true" HeaderTooltip="Sort by 'My Numeric Data'" DataType="System.Double" DataFormatString="{0:##,###0.00}" ItemStyle-HorizontalAlign="Right" FilterControlWidth="75%" HeaderStyle-Width="10%">

 

 

</telerik:GridNumericColumn>

This part is working fine and my data is formatted automatically when i change the Browser Language.
But filter on that data is leading to issue.
As this is numeric column while perfoming filtering i am only allowed to enter the numeric value with culture specific decimal seperator , which is great.But when i perform the search it does not work except for ENGLISH(EN-US).So if i select Germany the same filter operation is failing.
Is  this a bug in Telerik and is there any workaround for this.

Regards,
Aayam

 

Yavor
Telerik team
 answered on 26 Nov 2009
1 answer
166 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
123 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
307 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
96 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
182 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
94 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
144 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 Object, ByVal e As System.EventArgs) Handles Me.Load 
 
    End Sub 
 
    Protected Sub Button1_Click(ByVal sender As Object, ByVal 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
350 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
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?