Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
98 views

I tried the example provided at:

http://www.telerik.com/community/code-library/aspnet-ajax/grid/setting-100-height-and-resize-on-container-resize-for-grid-with-scrolling-and-static-headers.aspx

And it resizes properly in FF and IE. The included Dll version is 2008.1

If I replace the Dll with version 2009.1 then the resize fails on IE 7. If I expand the window, it resizes properly, but if I reduce the window size, it does not resize properly. The grid remains bigger than the window area.


Both versions work properly on FF.

Thanks.

Teodorico
Top achievements
Rank 1
 answered on 27 Mar 2009
4 answers
291 views
Hi folks
I am trying to update a label I have in a NestedViewTemplate on the client side in the RowDataBound event. Does anyone know how I can do this? Here is what I have tried but it doesn't work. FindControl doesn't find the control:
        function RadGrid1_RowDataBound(sender, args)
            {
                var label1 = args.get_item().findControl("lblReferenceValue"); // find control
                label1.set_value(args.get_dataItem()["ReportSourceId"]);
            }
Here is my markup:
            <NestedViewTemplate>
                <asp:Table ID="tblDetails" runat="server">
                    <asp:TableRow ID="trReference">
                        <asp:TableCell>
                            <asp:Label ID="lblReferenceValue" runat="server" Text="Reference:" />

William
Top achievements
Rank 1
 answered on 26 Mar 2009
1 answer
90 views
Hi,
I have 3 tabs and 3 grids in each tab with pagination (in the pageviews)

when i click on any pagination link in any of the grid it is taking 1 minute to load the data 

 i want to show a loading icon to the user so that they will not click any other controls on the screen till its loaded

thanks
-krishna



Todd
Telerik team
 answered on 26 Mar 2009
1 answer
76 views
I need to create dynamically  a Grid strutucture with 3 level hyerarchy

how can I set the SessionParameters in C#

my code is looking like:

private void DefineGridStructure(string VQuery1,string VDataKey1,string VQuery2,string VDataKey2) 
    { 
 
        string connString = ConfigurationManager.ConnectionStrings["coelbaConnectionString"].ConnectionString; 
                 
        SqlDataSource DataSource1 = new SqlDataSource(connString, VQuery1.ToString()); 
        DataSource1.ID = "SqlDataSource1"
        this.PlaceHolder1.Controls.Add(DataSource1); 
         
        RadGrid RadGrid1 = new RadGrid(); 
 
        RadGrid1.ID = "RadGrid1"
        RadGrid1.DataSourceID = "SqlDataSource1"
 
        RadGrid1.MasterTableView.DataKeyNames = new string[] { VDataKey1 }; 
        RadGrid1.Width = Unit.Percentage(98); 
        RadGrid1.PageSize = 40; 
        RadGrid1.AllowPaging = true
        RadGrid1.AllowSorting = true
        RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric; 
        RadGrid1.PagerStyle.Position = GridPagerPosition.TopAndBottom; 
        RadGrid1.PagerStyle.NextPagesToolTip = "Próximas páginas"
        RadGrid1.PagerStyle.PrevPagesToolTip = "Páginas anteriores"
        RadGrid1.PagerStyle.NextPageText = "Próxima página"
        RadGrid1.PagerStyle.PrevPageToolTip = "Página Anterior"
        RadGrid1.AutoGenerateColumns = true
        RadGrid1.ShowStatusBar = true
        RadGrid1.ShowFooter = true
        RadGrid1.Skin = "Sunset"
         
        RadGrid1.MasterTableView.PageSize = 40; 
        RadGrid1.MasterTableView.AllowMultiColumnSorting = true
 
        if (VQuery2 != ""
        { 
 
            SqlDataSource DataSource2 = new SqlDataSource(connString, VQuery2); 
            DataSource2.ID = "SqlDataSource2"
            SessionParameter nummes = new SessionParameter("@nummes", System.Data.DbType.Int32,"nummes"); 
            DataSource2.SelectParameters.Add(nummes); 
            this.PlaceHolder1.Controls.Add(DataSource2); 
 
 
            //Detail table - Orders (II in hierarchy level) 
            GridTableView tableViewOrders = new GridTableView(RadGrid1); 
            tableViewOrders.DataSourceID = "SqlDataSource2"
            tableViewOrders.Width = Unit.Percentage(100); 
 
            tableViewOrders.DataKeyNames = new string[] { VDataKey2 }; 
            tableViewOrders.AutoGenerateColumns = true
 
            GridRelationFields relationFields = new GridRelationFields(); 
            relationFields.MasterKeyField = VDataKey1; 
            relationFields.DetailKeyField = VDataKey1; 
            tableViewOrders.ParentTableRelation.Add(relationFields); 
 
            RadGrid1.MasterTableView.DetailTables.Add(tableViewOrders); 
 
            
        } 
 
 
        this.PlaceHolder1.Controls.Add(RadGrid1); 
    } 


And I´m Calling with:

DefineGridStructure("exec sp_totalAnoMes""nummes""exec sp_relPorData""datakey"); 
But the parameters are not being supplied.






Todd
Telerik team
 answered on 26 Mar 2009
2 answers
75 views
Hi Telerik,
what to do to avoid this error in picture manager?

Thanks for answering,
Andreas
Andreas Kaech
Top achievements
Rank 1
 answered on 26 Mar 2009
2 answers
152 views
I have a grid with popup editing turned on. Everything works well with the default settings. I wanted to replace the built-in commanditemstyle with a commanditemtemplate that has a toolbar. I added four toolbarbuttons, add,edit,delete and refresh. Add and refresh work as they did before, but delete and edit do not seem to work. I do not get any errors either. The grid just refreshes with no changes to it.

I think the issue is that the (e.Item.IsInEditMode) is always false no matter what, if I fire the edit command from the toolbarbutton. If I use the default edit link, isineditmode is true when needed.

Here is the code for it. Please let me know how I can get the edit and delete buttons on the toolbar to work instead of the default links.

<telerik:RadGrid ID="grdParameters" runat="server"
                                            GridLines="None" SkinID="StaticColumns"
                                            OnItemCommand="grdParameters_ItemCommand"
                                            OnItemDataBound="grdParameters_ItemDataBound"
                                            OnItemDeleted="grdParameters_ItemDeleted"
                                            OnItemInserted="grdParameters_ItemInserted"
                                            OnItemUpdated="grdParameters_ItemUpdated"
                                            OnNeedDataSource="grdParameters_NeedDataSource"
                                            OnPreRender="grdParameters_PreRender" ShowStatusBar="true" Height="300px"
                                            Width="650px" >                                            
                                            <MasterTableView AutoGenerateColumns="False" ClientDataKeyNames="Keyword"
                                                CommandItemDisplay="Top" EditMode="PopUp">
                                                <CommandItemTemplate>
                                                <telerik:RadToolBar runat="server" AutoPostBack="true">
                                                <Items>
                                                <telerik:RadToolBarButton Text="Add" CommandName="InitInsert" Value="Add" ImageUrl="~/Images/Add16.gif"></telerik:RadToolBarButton>
                                                <telerik:RadToolBarButton Text="Remove" CommandName="Delete" Value="Remove" ImageUrl="~/Images/Remove16.gif"></telerik:RadToolBarButton>
                                                <telerik:RadToolBarButton Text="Properties" CommandName="Edit" Value="Properties" ImageUrl="~/Images/edit_properties16.gif"></telerik:RadToolBarButton>
                                                <telerik:RadToolBarButton IsSeparator="true"></telerik:RadToolBarButton>
                                                <telerik:RadToolBarButton Text="Refresh" CommandName="RebindGrid" Value="Refresh" ImageUrl="~/Images/Refresh16.gif"></telerik:RadToolBarButton>
                                                </Items>
                                                </telerik:RadToolBar>
                                                </CommandItemTemplate>
                                                <RowIndicatorColumn>
                                                    <HeaderStyle Width="20px" />
                                                </RowIndicatorColumn>
                                                <ExpandCollapseColumn>
                                                    <HeaderStyle Width="20px" />
                                                </ExpandCollapseColumn>
                                                <Columns>                                                    
                                                    <telerik:GridBoundColumn DataField="Keyword" HeaderText="Parameter Name"
                                                        UniqueName="Keyword">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="KeyValue" HeaderText="Parameter Value"
                                                        UniqueName="KeyValue">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridEditCommandColumn ButtonType="LinkButton" EditText="Edit"
                                                        HeaderStyle-Width="40px" ItemStyle-Font-Underline="true"   
                                                        ItemStyle-ForeColor="Blue">
                                                        <HeaderStyle Width="40px" />
                                                        <ItemStyle Font-Underline="True" ForeColor="Blue" />
                                                    </telerik:GridEditCommandColumn>
                                                    <telerik:GridButtonColumn ButtonType="LinkButton" CommandName="Delete"
                                                        HeaderStyle-Width="60px" ItemStyle-Font-Underline="true"  
                                                        ItemStyle-ForeColor="Blue" Text="Delete" UniqueName="column">
                                                        <HeaderStyle Width="60px" />
                                                        <ItemStyle Font-Underline="True" ForeColor="Blue" />
                                                    </telerik:GridButtonColumn>
                                                </Columns>
                                                <EditFormSettings EditFormType="Template" CaptionFormatString="Parameter Details">
                                                <PopUpSettings Width="500px" ScrollBars="Vertical" />
                                                    <EditColumn UniqueName="EditCommandColumn1">
                                                    </EditColumn>
                                                    <FormTemplate>
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    <asp:Label ID="lblParmName" runat="server" Width="100px" Text="Parameter Name: *"></asp:Label>
                                                                </td>
                                                                <td>
                                                                    <telerik:RadTextBox ID="txtParmName" Runat="server"
                                                                        Text='<%# Bind( "Keyword") %>' Width="300px">
                                                                    </telerik:RadTextBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    &nbsp;</td>
                                                                <td>
                                                                    <asp:RequiredFieldValidator ID="valParmName" runat="server"
                                                                        ControlToValidate="txtParmName" Display="Dynamic"
                                                                        ErrorMessage="Parameter name is a required field."
                                                                        EnableClientScript="False"></asp:RequiredFieldValidator>
                                                                        <asp:CustomValidator ID="valUniqueParmName" runat="server" Display="Dynamic"
                                                                        ErrorMessage="Parameter name must be unique."                                                                          
                                                                        ControlToValidate="txtParmName"
                                                                        OnServerValidate="valUniqueParmName_ServerValidate"
                                                                        EnableClientScript="False"></asp:CustomValidator>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <asp:Label ID="lblParmValue" runat="server" Width="100px" Text="Parameter Value: *"></asp:Label>
                                                                </td>
                                                                <td>
                                                                    <telerik:RadTextBox ID="txtParmValue" Runat="server"
                                                                        Text='<%# Bind( "KeyValue") %>' Width="300px" oncontextmenu="return ShowMenu(this, 'Parameter');"  
                                                                        Height="64px" TextMode="MultiLine">
                                                                    </telerik:RadTextBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    &nbsp;</td>
                                                                <td>
                                                                    <asp:RequiredFieldValidator ID="valParmValue" runat="server"
                                                                        ControlToValidate="txtParmValue" Display="Dynamic" EnableClientScript="False"
                                                                        ErrorMessage="Parameter value is a required field."></asp:RequiredFieldValidator>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    &nbsp;</td>
                                                                <td>
                                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                    <asp:Button ID="btnUpdate" runat="server"
                                                                        CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                                                        Text='<%# (Container is GridEditFormInsertItem) ? "Apply" : "Apply" %>' />
                                                                    &nbsp;<asp:Button ID="btnCancel" runat="server" CommandName="Cancel"
                                                                        Text="Cancel"/>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                </td>
                                                                <td>
                                                                    &nbsp;</td>
                                                            </tr>
                                                        </table>
                                                    </FormTemplate>
                                                </EditFormSettings>
                                            </MasterTableView>  
                                            <ClientSettings>
                                            <Scrolling AllowScroll="true" />
                                            </ClientSettings>
                                          <ValidationSettings CommandsToValidate="PerformInsert,Update" />
                                            <FilterMenu EnableTheming="True">
                                                <CollapseAnimation Duration="200" Type="OutQuint" />
                                            </FilterMenu>
                                        </telerik:RadGrid>

protected void grdParameters_ItemCommand(object source, GridCommandEventArgs e)
        {
            GridEditCommandColumn editColumn = (GridEditCommandColumn)grdParameters.MasterTableView.GetColumn("EditCommandColumn");
            GridEditableItem editItem;
            switch (e.CommandName)
            {
                case (RadGrid.InitInsertCommandName): //"Add new" button clicked.            
                    editColumn.Visible = false;
                    break;
                case (RadGrid.RebindGridCommandName):   // Refresh button clicked.    
                    if (e.Item.OwnerTableView.IsItemInserted)
                    {
                        e.Canceled = true;
                    }
                    break;
                case (RadGrid.PerformInsertCommandName):   //Insert button clicked.         
                    editColumn.Visible = true;
                    editItem = e.Item as GridEditableItem;
                    ExecuteInsertParm(editItem);
                    break;
                case (RadGrid.EditCommandName):         //Edit button clicked.
                    if (grdParameters.SelectedItems.Count == 0)
                    {
                       ShowAlert("Please select an item.");
                    }
                    else
                    {
                        editColumn.Visible = false;
                    }
                    break;
                case (RadGrid.UpdateCommandName):     //Update button clicked.
                    editColumn.Visible = true;
                    editItem = e.Item as GridEditableItem;
                    //editItem = grdParameters.SelectedItems[0] as GridEditableItem;
                    ExecuteUpdateParm(editItem);
                    break;
                case (RadGrid.DeleteCommandName):    //delete button clicked.  
                    if (grdParameters.SelectedItems.Count == 0)
                    {
                        ShowAlert("Please select an item.");
                    }
                    else
                    {
                        editItem = e.Item as GridEditableItem;
                        //editItem = grdParameters.SelectedItems[0] as GridEditableItem;
                        DeleteRecord(editItem);
                    }
                    break;
                default:
                    if (!editColumn.Visible) { editColumn.Visible = true; }
                    break;
            }
        }

/// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void grdParameters_ItemDataBound(object sender, GridItemEventArgs e)
        {
            //if ((e.Item is GridEditableItem) && (e.Item.IsInEditMode))
            if ((e.Item is GridEditFormItem) && (e.Item.IsInEditMode))
            {
                GridEditableItem editItem = (GridEditableItem)e.Item;
                RadTextBox rdBox1 = (RadTextBox)editItem.FindControl("txtParmName");
                RadTextBox rdBox2 = (RadTextBox)editItem.FindControl("txtParmValue");
                if (rdBox2 != null)
                {
                    //grdParameters.Controls.Add(new LiteralControl("<script type='text/javascript'> window['radTextID'] = '" + rdBox.ClientID + "';</script>"));
                    radTextID.Value = rdBox2.ClientID;
                }
                EventSubscriptionInfo eventInfo = new EventSubscriptionInfo();
                rdBox1.MaxLength = ValidationHelper.GetMaxLength(eventInfo, "Keyword");
                rdBox2.MaxLength = ValidationHelper.GetMaxLength(eventInfo, "KeyValue");
            }
        }




Vithiya
Top achievements
Rank 1
 answered on 26 Mar 2009
0 answers
143 views

*CANCEL THIS POST FOUND ANOTHER EXISTING POST WITH ANSWER*




I have <add key="Telerik.FormDecorator.EnableEmbeddedSkins" value="false"/> in my webconfig
and have copied the FormDecorator.Telerik.css (and it's images) to my solution as Button.Telerik.css and have registered this file in my page. I am able to make the font Bold, and also change color.

I am not able to make my button font become 
    font-family: 'Segoe UI' , 'Arial' , 'Helvetica' , 'sans-serif' !important;
    font-size: 8pt !important;

or 

    font: 'Segoe UI' !important;
    font-size: 8pt !important;

Can font and size be changed on buttons?

This is what I have for buttons in FormDecorator.Telerik.css:

/* START OF BUTTON SETTINGS */  
a.radfd_Telerik, a.radfd_Telerik span  
{  
    background-image: url(Button/ButtonSprites.gif);  
    color: #000000;  
    font: 'Segoe UI';  
    font-size: 16pt;  
    /*font-family: 'Segoe UI' , 'Arial' , 'Helvetica' , 'sans-serif' !important;*/  
    /*font-size: 8pt !important;*/  
}  
 
a.radfd_Telerik.radfdInputDisabled:hover span  
{  
    color: #7d7d7d !important;  
    font-weight: normal !important;  
}  
 
a.radfd_Telerik  
{  
    padding-left: 4px;  
}  
 
a.radfd_Telerik:hover span  
{  
    color: #000000;  
    font-weight: bold !important;  
    /*font-family: 'Segoe UI' , 'Arial' , 'Helvetica' , 'sans-serif' !important;*/  
    /*font-size: 8pt !important;*/  
}  
 
a.radfd_Telerik .radfdInnerSpan  
{  
    margin-right: 4px;  
    background-position: 0 -21px;  
}  
 
/* clicked button styles */  
a.radfd_Telerik.radfd_Clicked  
{  
    background-image: url(Button/ButtonSprites.gif);  
    background-position: 0 -42px;  
    background-repeat: no-repeat;  
}  
 
a.radfd_Telerik.radfd_Clicked span,  
a.radfd_Telerik.radfd_Clicked:hover span  
{  
    background-image: url(Button/ButtonSprites.gif);  
    color: #000000;  
    /*font-family: 'Segoe UI' , 'Arial' , 'Helvetica' , 'sans-serif' !important;*/  
    /*font-size: 8pt !important;*/  
    font-weight: bold !important;  
}  
 
a.radfd_Telerik.radfd_Clicked .radfdInnerSpan  
{  
    background-position: 0 -63px;  
    background-repeat: repeat-x;  
}  
 
a.radfd_Telerik.radfd_Clicked .radfdOuterSpan  
{  
    background-position: right -42px;  
    background-repeat: no-repeat;  
}  
/* end of clicked button styles */  
 
/* do NOT change these settings, otherwise the skinned buttons will be broken when used within a decoration zone */  
a.radfdSkinnedFormButton.radfd_Telerik  
{  
    -moz-user-select: none !important;  
    outline: none !important;  
    text-decoration: none !important;  
    cursor: default !important;  
    text-align: center !important;  
    background-color: transparent !important;  
    border: 0 !important;  
    display: inline-block !important;  
    /*width: auto !important;*/  
 
}  
 
/* END OF BUTTON SETTINGS */  
 

Kellie
Top achievements
Rank 1
 asked on 26 Mar 2009
1 answer
70 views
In the existing dialog for inserting flash animations the size is set to 150x150 per default, this is a bit frustrating when you try to add large flash movies and the proportions are important to keep quality and aspect ratio.

Is there Any way to have a simple checkbox "keep orig. size" or "keep proportions", is this something that could be added in the Q2 release?
Rumen
Telerik team
 answered on 26 Mar 2009
1 answer
58 views
Hi,
I have cleaned my clipboard, but when i open the editor, the button Paste plain text is enabled even though this option at the context menu is disabled.
Is it a known issue and is there something to do about that.
Thanks in advanced
Rumen
Telerik team
 answered on 26 Mar 2009
1 answer
112 views
Is it possible to show/hide the RadEditorStatistics, RadEditorXhtmlValidator modules from code-behind? I am dynamically adding the editor buttons in the code-behind, but have not found a way to do this with the modules. I tried to add them dynamically, but the constructor requires a script parameter, and I am not sure what script to use.

Rumen
Telerik team
 answered on 26 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?