Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
117 views
I would like to have a GridButtonColumn that begins an Insert in the DetailsTable under the current row.  Is this possible?  Basically, I can do an insert in the DetailsTable by showing the command row, but that row doesn't fit well in my grid and I would like to have the Add button show up in the parent row instead.  I have a button and can catch the ItemCommand from the main grid, but can I initiate the Insert in the details table from there?

protected void g1_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == "AddPI")
    {
        // What goes here to init insert in detailstable[0]?
        //e.Item.OwnerTableView.DetailTables[0].???
    }
 
}
Sypher
Top achievements
Rank 1
 answered on 07 Jun 2011
5 answers
108 views
Hi
I've used RadInputManager to manage my input controls validating
Because I'm using User Controls , I need to set the ValidationGroups in code to a uniqe name that are based on the User Contro ID , to have the ability to use more than one of the same User Control in a page.
By a code like this :

           RadInputManager1.InputSettings[0].Validation.ValidationGroup = "xxcc"

I placed this line in Page_Load , Page_Init and even in InputSettingCreating event handler (by using the specila event argument)
But it seems that it's not working properly
Please help me , what's my problem ?
Thanks for your feedbacks.
Martin
Telerik team
 answered on 07 Jun 2011
7 answers
267 views
Hi all,

I have a RadGrid with has a custom template for inserting records. Once I insert the record, I try to close the insert template with the following code:

else if (e.CommandName == RadGrid.PerformInsertCommandName)
            {
                e.Canceled = true;
                e.Item.OwnerTableView.InsertItem();
 
                RadGrid_Visitor_RT.MasterTableView.IsItemInserted = false;
                RadGrid_Visitor_RT.Rebind();
 
            }

Calling the Rebind() method throws the following error:

Column 'Function_Key_Description' does not belong to table DefaultView.

The code for the RadGrid is below.

<telerik:RadGrid ID="RadGrid_Visitor_RT" runat="server" AutoGenerateColumns="false" Width="100%"
            AllowMultiRowSelection="false" AllowPaging="True" AllowCustomPaging="False" PageSize="10" AllowAutomaticInserts="False"
            GridLines="None" CellPadding="0" AllowSorting="false" Skin="Outlook" OnItemDataBound="Visitor_RT_ItemDataBound"
            ItemStyle-VerticalAlign="Top" OnNeedDataSource="RadGrid_Visitor_RT_NeedDataSource"
            OnItemCommand="RadGrid_Visitor_RT_ItemCommand">
 
                <PagerStyle Mode="NextPrevAndNumeric"/>
 
                <MasterTableView Width="100%" CommandItemDisplay="Top" GridLines="None" AllowAutomaticInserts="True">
 
                <CommandItemSettings ShowAddNewRecordButton="true" AddNewRecordText="Create Transaction" ShowRefreshButton="false" ShowExportToCsvButton="false"
                 ShowExportToExcelButton="false" ShowExportToPdfButton="false" ShowExportToWordButton="false"/>
                    <Columns>
                         
                         <telerik:GridBoundColumn UniqueName="User_Logs_Auto_ID" DataField="User_Logs_Auto_ID"
                         HeaderText="Log ID" Visible="false"/>
 
                         <telerik:GridBoundColumn UniqueName="User_Logs_DateTime" DataField="User_Logs_DateTime"
                         HeaderText="Time" HeaderStyle-Width="35%" Visible="true" ItemStyle-VerticalAlign="Top" />
 
                        <telerik:GridImageColumn DataType="System.String" AlternateText="F_Key"
                        DataAlternateTextField="Function_Key_Description" UniqueName="GridImageColumn_Function_Key"
                        ImageAlign="Middle" ImageHeight="16px" ImageWidth="23px" HeaderText=""
                        DataImageUrlFields="Function_Key_Description"
                        DataImageUrlFormatString="Images/OnTime_Fkeys/{0}.png" HeaderStyle-Width="10%"/>
 
                        <telerik:GridBoundColumn UniqueName="Terminal_Name" DataField="Terminal_Name"
                         HeaderText="Terminal Name" HeaderStyle-Width="25%" Visible="true" ItemStyle-VerticalAlign="Top"/>
 
                         <telerik:GridBoundColumn UniqueName="Terminal_Location" DataField="Terminal_Location"
                         HeaderText="Terminal Location" HeaderStyle-Width="30%" Visible="true" ItemStyle-VerticalAlign="Top"/>
 
 
                    </Columns>

Can anyone tell me why the Rebind method is throwing this error on the GridImageColumn?

Thanks,

Sunny
Sunil
Top achievements
Rank 1
 answered on 07 Jun 2011
2 answers
80 views
I dont want to refresh the master page, without refreshing the masterpage, I want only the content page to be refreshed for postback
Maria Ilieva
Telerik team
 answered on 07 Jun 2011
1 answer
242 views
Hi Guys,

I am not able to access one of the column value from RadGrid when user click the delete icon. I am able to retrieve the primary key associated with that deleting row. My grid data coming from 2 different tables and one of the grid column indicate which table it is.

Following code retrieve the PK value:

GridDataItem item = (GridDataItem)e.Item; 

int ControlId = Convert.ToInt32(item.OwnerTableView.DataKeyValues[item.ItemIndex]["ControlID"]);

RadGrid template:
 

<

 

 

telerik:RadGrid ID="radCntDets" runat="server" GridLines="None" Width="938px"

 

 

 

AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"

 

OnNeedDataSource="radCntDets_OnNeedDataSource"

 

 

AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates ="True"

 

 

HorizontalAlign ="NotSet"

 

Font-Size ="Small"  OnItemUpdated ="radCntDets_ItemUpdated"

 

OnUpdateCommand ="radCntDets_UpdateCommand"

 

OnInsertCommand ="radCntDets_InsertCommand"

 

OnDeleteCommand="radCntDets_DeleteCommand">

 

<ClientSettings EnableRowHoverStyle="True">
<Scrolling AllowScroll="True" UseStaticHeaders="True"/>

 

</ClientSettings>

 

<MasterTableView GridLines="None" CommandItemDisplay="Top" DataKeyNames="ControlID" EditMode ="InPlace">

<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

 

<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>

 

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>

 

<Columns>

 

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ItemStyle-Width="100px" HeaderStyle-Width="100px">  

<HeaderStyle Width="100px"></HeaderStyle>

 

<ItemStyle Width="100px"></ItemStyle >

</telerik:GridEditCommandColumn

<telerik:GridButtonColumn ConfirmText="Delete this control?" ButtonType ="ImageButton"

 

CommandName="Delete" Text="Delete" UniqueName ="DeleteColumn1">

 

<HeaderStyle Width="20px"/>

 

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

 

</telerik:GridButtonColumn>

 

<telerik:GridBoundColumn UniqueName="FirstName" HeaderText="First Name" DataField="FirstName" HeaderStyle-Width="100px" ItemStyle-Width="100px" 

<HeaderStyle Width="100px"></HeaderStyle>
<ItemStyle Width="100px"></ItemStyle>

 

</telerik:GridBoundColumn>

 

<telerik:GridBoundColumn UniqueName="LastName" HeaderText="Last Name" DataField="LastName" HeaderStyle-Width="100px" ItemStyle-Width="100px">

 

<HeaderStyle Width="100px"></HeaderStyle>

 

<ItemStyle Width="100px"></ItemStyle>

 

</telerik:GridBoundColumn>

 

<telerik:GridTemplateColumn UniqueName="ControlType" HeaderText="Control Type" ItemStyle-Width="100px" HeaderStyle-Width="100px">

 

<ItemTemplate>

 

<%

 

#DataBinder.Eval(Container.DataItem, "ControlType")%>

 

 

</ItemTemplate>

 

<InsertItemTemplate>

 

<telerik:RadComboBox runat="server" ID="radControlType" DataTextField="TypeName" Width="100px"

 

DataValueField="TypeName" SelectedValue='<%# Bind("ControlType") %> '  

DataSourceID="xmlContactType" Skin="Web20">

 

</telerik:RadComboBox>

 

</InsertItemTemplate>

 

<EditItemTemplate>

 

<asp:TextBox ID="txtControlType" runat="server" ReadOnly="true" CssClass="bodyText" Text='<%# Bind("ControlType") %>'></asp:TextBox>

 

</EditItemTemplate>

 

<ItemStyle Width="140px"></ItemStyle>

 

</telerik:GridTemplateColumn 
<telerik:GridTemplateColumn HeaderText="Email Address" UniqueName="EmailAddress" ItemStyle-Width="80px" HeaderStyle-Width

="80px">

 

<ItemTemplate>

 

<%

 

#DataBinder.Eval(Container.DataItem, "EmailAddress")%>  

</ItemTemplate>

 

<EditItemTemplate>

 

<asp:TextBox ID="txtEAddress" runat="server" Text='<%# Bind("EmailAddress") %>'></asp:TextBox>

 

</EditItemTemplate>

 

</telerik:GridTemplateColumn>

 

<telerik:GridBoundColumn UniqueName="PhoneNumber" HeaderText="Phone" DataField="PhoneNumber"

 

HeaderStyle-Width="90px" ItemStyle-Width="90px">

 

</telerik:GridBoundColumn 

<telerik:GridBoundColumn UniqueName="Role" HeaderText="Role" DataField="Role"

 

HeaderStyle-Width="70px" ItemStyle-Width="70px">

 

</telerik:GridBoundColumn 

<telerik:GridBoundColumn UniqueName="Notes" HeaderText="Notes" DataField="Notes"

 

HeaderStyle-Width="220px" ItemStyle-Width="220px">

 

<HeaderStyle Width="220px"></HeaderStyle 

<ItemStyle Width="220px"></ItemStyle 

</telerik:GridBoundColumn>

 

</Columns>

 

 

<EditFormSettings>

 

<EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn 

</EditFormSettings>

 

</MasterTableView>

 

<FilterMenu EnableImageSprites="False"></FilterMenu

<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu 

 

 

</telerik:RadGrid>
<asp:XmlDataSource ID="xmlContactType" runat="server" DataFile="~/XML/ControlTypes.xml"></asp:XmlDataSource>

Codebehind:

 

GridEditableItem

 

 

editedItem = e.Item as GridEditableItem ;

 

 

 

GridEditManager editMan = editedItem.EditManager;

 

 

string _cType = string.Empty;
foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)

 

 

{

 

 

 

if (column is IGridEditableColumn)

 

 

{

 

 

 

IGridEditableColumn editableCol = (column as IGridEditableColumn );

 

 

if (editableCol.IsEditable)

 

 

{

 

 

 

IGridColumnEditor

editor = editMan.GetColumnEditor(editableCol); -----> Error:Specified argument was out of the range of valid values.

 

if (editor is GridTemplateColumnEditor)

 

 

{

 

 

 

if (column.UniqueName.Equals("ControlType" ))

 

 

_cType = ((

 

 

 

TextBox)(((Telerik.Web.UI.GridColumnEditorBase)((editor as GridTemplateColumnEditor

))).ContainerControl).Controls[1]).Text;

}

 

}

 

}

 

}

Please advise me how to access the value of a template controlType in bold.

Thanks
Indra

 

 

 

 

 

Marin
Telerik team
 answered on 07 Jun 2011
2 answers
796 views
hi,
i have a  java script method for showing the alert message. its work fine.
 function openAlert(type, msg, method, width, height)
    {                
                    switch (type) {
                        case "Info":
                            var oWnd = radalert(msg, width, height, ' ');
                            var popupElement = oWnd.get_popupElement();
                            popupElement.className = popupElement.className + " infoIcon";
                            break;               
                    }
                }
but when i called this way with some special characters
openalert('Info','Please enter proper delimiters i.e(' '   ','  ' | '  '-' ) with start and end characters, ' ', 400,300);
(' '   ','  ' | '  '-' ) space,coma, | and - characters i am trying to pass this function but not working.
please tell how can the special characters be passed to the java script method so that they can be shown in message.
bharat veer
Top achievements
Rank 1
 answered on 07 Jun 2011
1 answer
32 views
I do not know , why my 1st item not load in radpanelbar's first item,
it show as second item, anyone can help??
Kate
Telerik team
 answered on 07 Jun 2011
1 answer
46 views
Our company has been working on a new project site that will be mostly used via Ipad and we want to use the TreeView control, has anyone done something with this control targeting mobile devices? We will be using the TreeView to navigate thought screens that will allow input and also some color changes to the control.


Thank you
Simon
Telerik team
 answered on 07 Jun 2011
1 answer
56 views

Hi folks:
Today, i'm trying to get a VS2010 C# Sharepoint 2010 Webpart project (Windows 7 Pro 64-bit with Sharepiont 2010 installed locally for development) to be able to utilize the radpanelbar control.

In Vs2010 in my proejct, i'm able to set a reference to the Telerik.web.ui.dll and telerik.web.design.dll (add->refernce->browese->navigate to C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q1 2011\Bin35.

I use the TOOLS in my vs2010 IDE to add the radpanelbar to my project. it adds a reference as follows:

 

 

<%

 

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 

 

 

 

it compiles well no errors or warnings. i deploy, no issues.
I create a new sharepoint page and at this new visualwebpart1 to this page. it throws an error.:

Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. The system cannot find the file specified.

I searched online for several hours, and Here’s ultimately the links I followed:

 

http://www.telerik.com/help/aspnet-ajax/moss-deploying-radcontrols.html

 

 

 

 

and

 

 

 

 

 

http://www.telerik.com/help/aspnet-ajax/moss-replace-sharepoint-quick-launch-menu-with-radpanelbar.html

 

 

 

 

I still get the same error from sharepoint, so i was unable to get this issue resolved.

 

 

 

 

 

 

 

As of right now, I have the Telerik.Web.UI and Telerik.Web.Design properly showing up in c:\windows\assembly

 

 

 

So the controls are registered in the GAC on my machine.

 

 

 

I removed the telerik DLLs from the Sharepoint BIN folder C:\program files\common files\microsoft shared\web server extentions\14\bin (I origially tried putting them here thinking they needed to be there fromn another blog i had followed to try to resolve this).

 

 

 

The assemblies are just in the GAC.

 

 

 

I also followed the above first link and tried setting the web.config with the myriad of settings it has you follow.

 

 

 

That file is:

 

 

 

C:\program files\common files\microsoft shared\web server extensions\14\config\web.config

 

 

 

There’s a ton of settings the first link above has you make.

 

 

 

Then I used sharepoint designer 2010 to edit the local sharepoint site, and modified the default.master master page as the second link instructs you to do by addeing the <@register with the telerik assembly reference

 

 

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2011.1.413.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>


My project compiles. tje radpanelbarworks in VS 2010 in design time. But I get the same error when browsing to a page with the web part added.

 

 

 

I’m sure I’m erally close. It’s probably something really stupid now.

i could really use some help figuring out why i get the error when browsing to the page with the web part added. the correlationID when referened in the log file for sharepoint basically says it can't find telerik.web.ui file or dependencies. it's not very helpful.

can someone offer some insights on how to overcome this?

thank you.

Kalina
Telerik team
 answered on 07 Jun 2011
6 answers
155 views
Hi,

Issue is that when there is RadComboBox inside update panel, memory leak occurs, same as if there is a TreeView control with context menus (this is important) enabled. Below I provide a link to a tool I used to profile, also a link to stand-alone web app project that reproduces the issue. Once the radcombobox is commented out and I remove context menus template from treeview - memory leak doesn't occur anymore. I'm using latest controls 2010.3.13.17.40 and web app is asp.net 4.0

Project details: you might need to add reference to Telerik.Web.UI.dll. (project is messy, cause it's a testing sandbox, also it's set up to run on my IIS 7.5 as localhost:1234 <- you will need to change this)

Next, profile (click some buttons, do drag'n'drop treeview elements) the page with given tool, you will see leaks count and browser memory consumption will be constantly increasing.

How to stop leaking:
go to: MainHeader.ascx and fully comment out <telerik:RadComboBox ID="ddlOwnProjects" runat="server"
then go to: Default.aspx and comment out <ContextMenus> for <telerik:RadTreeView ID="tree" runat="server"

rebuilt site, restart profiling application (totally restart to reset #leaks), click on buttons, try drag'n'drop tree items - #leaks - will remain 0.

I'm developing fully ajaxified asp.net 4.0 application and leaks there increase ~100-200 objects per single postback, slowly-slowly browser starts consuming more and more memory.

Please verify this and let's find the solution.
Thank you!

Link to the web app: leaking project
IE Sieve from http://home.orange.nl/jsrosman/

P.S.: would be great to have opportunity to upload zip files directly here
Simon
Telerik team
 answered on 07 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?