Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
351 views
Here's where I am at,

the following is for a  GridTemplateColumn:

statusCheckBox = item["checkBoxColumn"].FindControl("cbWidgetStatus") as CheckBox

This returns the control,   
all cool, when we get here:

item.GetDataKeyValue

It returns Null.  Has anyone seen this?
Thanks!
Dave Gilden

 

 

protected void rgSetUp_ItemDataBound(object sender, GridItemEventArgs e)

 

{

 

if (e.Item is GridDataItem)

 

{

 

GridDataItem item = e.Item as GridDataItem;

 

 


// Set CheckBoxes

 

 

 

CheckBox statusCheckBox = item["checkBoxColumn"].FindControl("cbWidgetStatus") as CheckBox;

 

 

if (statusCheckBox != null)

 

{

System.Diagnostics.

Debug.WriteLine( "statusCheckBox: " + item.GetDataKeyValue("widgetStatus"));

 

statusCheckBox.Checked = (

Boolean)item.GetDataKeyValue("widgetStatus");

 

}

 


// Set Dropdown Menus

 

 

 

DropDownList ddl = item["widgetPostionColumn"].FindControl("ddlWidgetPostion") as DropDownList;

 

 

if ( ddl != null )

 

{

System.Diagnostics.

Debug.WriteLine("widgetPostion:" + item.GetDataKeyValue("widgetPostion"));

 

ddl.SelectedIndex = (

int)item.GetDataKeyValue("widgetPostion");

 

}

}

}

Daniel
Telerik team
 answered on 30 Jun 2010
2 answers
105 views
I am using VS 2010 and Telerik.Web.UI version 2010.1.415.35.  I have the following code to access multiple resource values and am getting the following error:

foreach statement cannot operate on variables of type 'Telerik.Web.UI.Resource' because 'Telerik.Web.UI.Resource' does not contain a public definition for 'GetEnumerator'

foreach (Resource service in e.Appointment.Resources.GetResourcesByType("Service")){

}

Any help would be appreciated.

Thanks
Suzanne
Top achievements
Rank 1
 answered on 30 Jun 2010
1 answer
83 views
Hi,

I need to keep all the items in the first RadListBox after dropping it to a node on a RadTreeView, but after the dropping the item is remove from the RadListBox.

How do I keep the original items in the first RadListBox?

Thank,

Irene
Irene Ortiz
Top achievements
Rank 1
 answered on 30 Jun 2010
2 answers
56 views
Hi all,
i want to make some slot as disable and some as available using my own data base.
so , how can i do this ?

--Jagdish Prajapati
Jagdish
Top achievements
Rank 1
 answered on 30 Jun 2010
1 answer
143 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
115 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
89 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
79 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> 
<href="javascript:PrintPane('<%= InternalContentPane.ClientID %>');"
 Print the content of 'Internal Content Pane'</a><br /> 
<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
127 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
366 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?