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

Hi
I am unable to apply any Skin on my Radgrid. The version I am using is 2008.3.1125.35  . I tried with version 2009.3.1103.20 too but other than the default "Vista" looking appearance which renders even if I did not give a value to the SKin property nothing works as far as skin is concerned.
This radgrid is inside a user control and which in turn is hosted in a page with master page.
Here is my radgrid :
Thanks
Scott 


-------------------------------------------------------------------------------------------------------------
<%

@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucAdminCompanyConfig.ascx.cs" Inherits="UConnect.wsadm.uc.ucAdminCompanyConfig" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<%

@ Register src="../../uc/general/InfoText/InfoText.ascx" tagname="InformationLabel" tagprefix="uc1" %>

 

<

 

div id="divSearch"

 

 

style="overflow: visible; height: 525px; padding-left: 3%;">

 

 

<asp:Panel ID="pnlListUsers" runat="server" >

 

 

 

<div style="overflow:auto">

 

 

<telerik:RadGrid ID="RadGridCompanyConfig" runat="server"

 

 

AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True"

 

 

AutoGenerateColumns="False"

 

 

EnableLinqExpressions="False" GridLines="None"

 

 

GroupingSettings-CaseSensitive="false" Height="505px"

 

 

OnPageIndexChanged="RadGridCompanyConfig_PageIndexChanged"

 

 

PageSize="8" Skin="Black" PagerStyle-AlwaysVisible ="true"

 

 

style="margin-right: 315px; margin-bottom: 0px;" AllowAutomaticUpdates="True"

 

 

AllowAutomaticDeletes="True" AllowAutomaticInserts ="True"

 

 

oninit="RadGridCompanyConfig_Init1"

 

 

onneeddatasource="RadGridCompanyConfig_NeedDataSource"

 

 

ondeletecommand="RadGridCompanyConfig_DeleteCommand"

 

 

oninsertcommand="RadGridCompanyConfig_InsertCommand"

 

 

onupdatecommand="RadGridCompanyConfig_UpdateCommand"

 

 

onitemdatabound="RadGridCompanyConfig_ItemDataBound"

 

 

onprerender="RadGridCompanyConfig_PreRender" >

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="True" />

 

 

<Scrolling AllowScroll="false" EnableVirtualScrollPaging="true" UseStaticHeaders="True" SaveScrollPosition="true" FrozenColumnsCount="2">

 

 

</Scrolling>

 

 

</ClientSettings>

 

 

<HeaderContextMenu EnableTheming="True">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</HeaderContextMenu>

 

 

<PagerStyle AlwaysVisible="True" />

 

 

<MasterTableView AllowNaturalSort="false" CommandItemDisplay="Top" Width="1120px"

 

 

DataKeyNames="ConfigId" DataMember="Config" TableLayout="Fixed" >

 

 

<NoRecordsTemplate>

 

No Configurations Found.

 

</NoRecordsTemplate>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

 

<Columns >

 

 

<telerik:GridBoundColumn DataField="ConfigId" Display="false" ReadOnly="true"

 

 

FilterControlWidth="50px"

 

 

FilterImageUrl="../../images/Telerik/Vista/Grid/Filter.gif"

 

 

HeaderText="Config ID" UniqueName="ConfigId" Visible="false">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn ColumnEditorID="GridTextBoxColumnEditor1"

 

 

DataField="ConfigName" FilterControlWidth="110px" Resizable="true"

 

 

FilterImageUrl="../../images/Telerik/Vista/Grid/Filter.gif"

 

 

HeaderText="Config Name" UniqueName="ConfigName">

 

 

<HeaderStyle Width="150px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn ColumnEditorID="GridTextBoxColumnEditor2" Resizable="true"

 

 

DataField="ConfigValue" FilterControlWidth="400px"

 

 

FilterImageUrl="../../images/Telerik/Vista/Grid/Filter.gif"

 

 

HeaderText="Config Value" UniqueName="ConfigValue" ItemStyle-Wrap="true">

 

 

<HeaderStyle Width="600px" Wrap="true" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="ChangeDate" ReadOnly="true"

 

 

FilterControlWidth="100px"

 

 

FilterImageUrl="../../images/Telerik/Vista/Grid/Filter.gif"

 

 

HeaderText="Change Date" UniqueName="ChangeDate">

 

 

<HeaderStyle Width="150px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn FilterControlWidth="100px" DataField="CompanyId" UniqueName="Company" FilterImageUrl="../../images/Telerik/Vista/Grid/Filter.gif" >

 

 

<HeaderTemplate >

 

 

<asp:Label ID="Label1" CssClass="" Text="Company" runat="server"></asp:Label>

 

 

</HeaderTemplate>

 

 

<ItemTemplate>

 

 

<asp:Label CssClass="" ID="lblCompany" runat="server" Text='<%# GetNameFromId(Eval("CompanyId")) %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<asp:Label ID="lblCompanyEdit" runat="server" Text="Company:" ></asp:Label>

 

 

<asp:DropDownList runat="server" ID="ddlCompany"></asp:DropDownList>

 

 

 

</EditItemTemplate>

 

 

<HeaderStyle Width ="150px" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridEditCommandColumn >

 

 

<HeaderStyle Width="40px" />

 

 

 

</telerik:GridEditCommandColumn>

 

 

 

<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"

 

 

ConfirmDialogType="RadWindow" ConfirmText="Delete this product?"

 

 

ConfirmTitle="Delete" Text="Delete" UniqueName="DeleteColumn">

 

 

<ItemStyle CssClass="" HorizontalAlign="Center" />

 

 

<HeaderStyle Width="40px" />

 

 

</telerik:GridButtonColumn>

 

 

</Columns>

 

 

<EditFormSettings CaptionDataField="configId"

 

 

CaptionFormatString="Edit Config {0}" ColumnNumber="3" >

 

 

<FormTableItemStyle Wrap="False" />

 

 

<FormCaptionStyle CssClass="" />

 

 

<FormMainTableStyle BackColor="White" CellPadding="3" CellSpacing="0"

 

 

GridLines="None" Width="100%" />

 

 

<FormTableStyle BackColor="White" CellPadding="2" CellSpacing="0"

 

 

Height="110px" />

 

 

<FormTableAlternatingItemStyle Wrap="False" />

 

 

 

<EditColumn ButtonType="ImageButton" CancelText="Cancel edit"

 

 

InsertText="Insert Order" UniqueName="ConfigId" UpdateText="Update record">

 

 

</EditColumn>

 

 

<FormTableButtonRowStyle HorizontalAlign="Right" />

 

 

</EditFormSettings>

 

 

</MasterTableView>

 

 

<GroupingSettings CaseSensitive="False" />

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 

 

<FilterMenu EnableTheming="True">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</FilterMenu>

 

 

</telerik:RadGrid>

 

 

<telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="250px" />

 

 

<telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor2" runat="server" TextBoxStyle-Width="1000px" />

 

 

<telerik:GridDropDownListColumnEditor ID="GridDropDownColumnEditor1" runat="server" DropDownStyle-Width="150px" />

 

 

<div style="height:34px; overflow:hidden;" runat="server" id="infoDiv" visible="false">

 

 

<uc1:InformationLabel id="infoResults" runat="server" visible="False" />

 

 

</div>

 

 

</div>

 

 

 

</asp:Panel>

 

</

 

div>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-------------------

Scott
Top achievements
Rank 1
 answered on 30 Jun 2010
2 answers
124 views
I have a bit of a mystery on my hands.  I have a radgrid that is getting data from a dataset (passed threw the business object from the data access object, comming from ORM), that works perfectly.  The data shows up properly, and can sort and filter properly in the grid.  I have a custom export to Excel function that exports filtered data.  In this export process, I retrieve the information from the same method mentioned before, and apply the radgrid's filter to the data by accessing RadGridSomeGrid.MasterTableView.FilterExpression.  The issue that I am having is that when I access the filter here, it shows that it is trying to filter it as a string.  This doesn't work against the DateTime data coming in from the DataSet.

The filter as it comes from FilterExpression: "(([Accident Date] >= '1/1/10') AND ([Accident Date] <= '6/1/10'))"
The filter works if I manipulate it like so: "(([Accident Date] >= CAST('1/1/10' AS DateTime)) AND ([Accident Date] <= CAST('6/1/10' AS DateTime)))"

How can I accomplish this without tons of logic to seperate my individual filters, determine if it's supposed to be a date, locate the parameter, and wrap it?

Thanks,
Nathan
Nathan
Top achievements
Rank 1
 answered on 30 Jun 2010
1 answer
101 views
Hi all,
I am using the radgrid with data that must be accessed using SQL stored procedures.
I have created the SQLDataSource and assigned all the required sp's and their parameters.

My select statement *does* select a unique PK for the dataset

However, when I bind the radgrid to the SDS there are no options to select in the "Data key name(s)" field in the grid property builder.
Is there a trick to getting them to show up here?

I have loosely followed the guide here:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/update-insert-delete-with-stored-procedures-and-sqldatasource-control.aspx

But still I get no options for datakeys

Is there a silver bullet here? Some setting I may have incorrectly applied?

Thanks



Matthew
Top achievements
Rank 1
 answered on 30 Jun 2010
1 answer
86 views
this my html code
<telerik:RadSplitter id="RadSplitter1" runat="server" height="200"> 
 <telerik:RadPane id="InternalContentPane" runat="server" width="120"> 
 <Telerik:RadMenu ID="mBar0" Runat="server" Skin="Office2007" Width="100%"> 
       <CollapseAnimation Duration="200" Type="OutQuint" /> 
       <Items> 
           <Telerik:RadMenuItem runat="server" Text="Root RadMenuItem1"> 
           </Telerik:RadMenuItem> 
           <Telerik:RadMenuItem runat="server" Text="Root RadMenuItem2"> 
               <Items> 
                   <Telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1"> 
                       <Items> 
                           <Telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1"> 
                           </Telerik:RadMenuItem> 
                       </Items> 
                   </Telerik:RadMenuItem> 
                   <Telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2"> 
                   </Telerik:RadMenuItem> 
               </Items> 
           </Telerik:RadMenuItem> 
           <Telerik:RadMenuItem runat="server" Text="Root RadMenuItem3"> 
           </Telerik:RadMenuItem> 
           <Telerik:RadMenuItem runat="server" Text="Root RadMenuItem4"> 
           </Telerik:RadMenuItem> 
           <Telerik:RadMenuItem runat="server" Text="Root RadMenuItem5"> 
           </Telerik:RadMenuItem> 
           <Telerik:RadMenuItem runat="server" Text="Root RadMenuItem6"> 
           </Telerik:RadMenuItem> 
       </Items> 
       </Telerik:RadMenu> 
   <p> 
    
       Founded in 2002, Telerik Corporation is a leading vendor of User Interface (UI)  
       components for ASP.NET and Windows Forms. Building on our expertise in interface  
       development and Microsoft technologies, Telerik helps customers build  
       applications with unparalleled richness, responsiveness and interactivity.  
       Created with passion, Telerik products help thousands of developers every day to  
       be more productive and deliver reliable applications under budget and on time. 
       <p> 
       </p> 
   </p> 
 </telerik:RadPane> 
 <telerik:RadSplitBar id="RadSplitbar1" runat="server"/> 
 <telerik:RadPane id="ExternalContentPane" runat="server" width="300" 
    ContentUrl="http://www.yahoo.com.tw" /> 
</telerik:RadSplitter> 
<a href="javascript:PrintPane('<%= InternalContentPane.ClientID %>');"> 
 Print the content of 'Internal Content Pane'</a><br /> 
<a href="javascript:PrintPane('<%= ExternalContentPane.ClientID %>');"> 
 Print the content of 'External Content Pane'</a> 
<script type="text/javascript"> 
function PrintPane (paneID) 
{ 
 var splitter = $find('<%= RadSplitter1.ClientID%>'); 
 var pane = splitter.GetPaneById(paneID); 
 if (!pane) return; 
 var cssFileAbsPath = 'http://localhost/printStyles.css'; 
 var arrExtStylsheetFiles = [ cssFileAbsPath ]; 
 pane.Print(arrExtStylsheetFiles); 
} 
</script> 

when I print 'Internal Content Pane'
the RadMenu Style will lose
I use ver 2008.02.0826.35 to develop project, and this project scope is very large
I try to upgrade ver 2010, but have some error
How to fix this print problem?
Dobromir
Telerik team
 answered on 30 Jun 2010
1 answer
128 views
When I try to use the RadGrid buildin edit form , I found when I click the 'Add new record' or 'Edit' ,that will cause the full grid be re-flash . If the web site is in local network ,the performance seems ok.  But if access the web site from internet and the grid records number is very big. The performance will be very low. User will take a long time to wait the edit form appear.
Please see the grid online demo "Grid / PopUp Edit Form" page. That is a very well sample to point this issue.
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/popupeditform/defaultcs.aspx

In this sample, there're two grid on this page. One is more records, another is less. When I click the 'Add new record' command item,  the performance will be very obvious differences. The first grid will take 4 sec. to show the edit form but the second grid just take 1 sec. . I think if the first grid has more and more records that will take more and more times to show the edit form.


So how to improve the performance when use build-in edit form.
Pavlina
Telerik team
 answered on 30 Jun 2010
19 answers
380 views
Hi,
I have use RadMenu and RadTabStrip in default.master page,it works well with other pages except settings.aspx of sharepoint i.e sitesettings link from sharepoint all Telerik controls fails when this page open.
please kindly let me know I will be thankful to you.

if we place telerik control in application.master page and try to open _layouts/settings.aspx telerik control fails to work where it works well with other pages.

Thanks in advance
Hector
Top achievements
Rank 1
 answered on 30 Jun 2010
1 answer
124 views
Hi ,

Kindly look into the pictures .Here are the issuse i faced. Customer1.png is Parent Page with spilter control , the picture shows the bottom RadPane contents . This contains tow ListBox section named as  " Customer  Sales Rep " and "Customer Acc Rep"

On click of the " Select " button pop is shown using RadWindow as shown in " Customer Pop .png "
In the pop window i select some customer and click " save " , the RadListBox in the Parent Page has to filled , happening if the Page is reload we dont want to reload , we need to update only the RadListBox  using AJAX.


Kindly help us 
Can i have any sample application with requirement  with out parent page refresh

Genady Sergeev
Telerik team
 answered on 30 Jun 2010
1 answer
119 views
I've tried to copy everything from the online demo and try to make it work, but I cannot make it work.

I found the online demo description's script is different to the script in local demo file.


e.g. local file InsertSpecialLink

        Telerik.Web.UI.Editor.CommandList["InsertSpecialLink"] = function(commandName, editor, args) 
        { 
            var elem = editor.getSelectedElement(); //returns the selected element. 
 
            if (elem.tagName == "A") 
            { 
                editor.selectElement(elem); 
                argument = elem.cloneNode(true); 
            } 
            else 
            { 
                var content = editor.getSelectionHtml(); 
                var link = editor.get_document().createElement("A"); 
                link.innerHTML = content; 
                argument = link; 
            } 
 
            var myCallbackFunction = function(sender, args) 
            { 
                editor.pasteHyperLink(args, "Insert Link"); 
            } 
 
            editor.showExternalDialog( 
            "InsertLink.aspx", 
            argument, 
            270, 
            300, 
            myCallbackFunction, 
            null, 
            "Insert Link", 
            true, 
            Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, 
            false, 
            true); 
        }; 

Online demo description's script

    <script type="text/javascript"> 
    Telerik.Web.UI.Editor.CommandList["InsertSpecialLink"] = function(commandName, editor, args) 
    { 
       var elem = editor.getSelectedElement(); //returns the selected element. 
               
       if (elem.tagName == "A") 
       { 
            editor.selectElement(elem); 
            argument = elem; 
       } 
       else 
       { 
            //remove links if present from the current selection - because of JS error thrown in IE 
            editor.fire("Unlink"); 
                 
            //remove Unlink command from the undo/redo list 
            var commandsManager = editor.get_commandsManager(); 
            var commandIndex = commandsManager.getCommandsToUndo().length - 1; 
            commandsManager.removeCommandAt(commandIndex); 
 
            var content = editor.getSelectionHtml(); 
 
            var link = editor.get_document().createElement("A"); 
 
            link.innerHTML = content; 
            argument = link;         
        } 
        
       var myCallbackFunction = function(sender, args) 
       { 
           editor.pasteHtml(String.format("<a href={0} target='{1}' class='{2}'>{3}</a> ", args.href, args.target, args.className, args.name)) 
       } 
        
       editor.showExternalDialog( 
            'InsertLink.aspx', 
            argument, 
            270, 
            300, 
            myCallbackFunction, 
            null, 
            'Insert Link', 
            true, 
            Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, 
            false, 
            false); 
    }; 
    </script> 
 

When I tried different script, it never worked, the error I received error message "linkUrl.value is null", can you give a working version?



Dobromir
Telerik team
 answered on 30 Jun 2010
1 answer
186 views

On saving the contents of the editor to a database, I run a javascript function to make some changes to the Html in the editor content area.

I add inputs of type hidden using the code:

 

var jHidden = jDocument.createElement(

'input');

 

jHidden.type =

'hidden';

 

jHidden.id =

'PagePart';

 

jHidden.name =

'PagePart';

 

jHidden.value = pPagePartId;

jInputElements[jSubmit].parentNode.appendChild(jHidden);

In Internet Explorer 8, the Html created is:

<input type="hidden" id="label3" submitname="label3" value="Email:" />

In Firefox, it is:

<input type="hidden" id="label3" name="label3" value="Email:" />

Why does Internet Explorer insert the attribute submitname="label3" which does not appear in the Request.Form when the page is refreshed on Submit?

Your help would be much appreciated.

Thanking you in anticipation.

Roger

Dobromir
Telerik team
 answered on 30 Jun 2010
8 answers
504 views

Hi everybody

We are having a funny trouble when passing strings with apostrophe to our Telerik RadGrid's Filters. Here goes the scenario:

We have a Grid with a column called "RoomName" that shows a RadComboBox with different rooms (binded from the DB)

We want toset our telerik grids FilterExpression programmatically (on PAGE_LOAD time) with the following code. 

RadGrid1.AllowFilteringByColumn= true;

RadGrid1.MasterTableView.FilterExpression = string.Format("([RoomName]= '{0}')", VALUE);


This code works fineexcept when the VALUE contains an apostrophe. i.e: “Mikel’s Room”

In this case, the filter won't work and the grid will load all the Campaigns (without filtering)

Is thereany documented bug on this?

Pavlina
Telerik team
 answered on 30 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?