Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
111 views
I have a radgrid like below with a column that adds a document to a shopping Cart by clicking a hyperlink.  When the document is added the link is hidden so that the document cannot be added again.  When the document is removed from the cart, I want to find the row in the radgrid based on the documentId  and show the link again. I found how to get row here now I need to hide hyperlink in column. I want to be able to do this client-side.

<telerik:RadGrid ID="rgResults" runat="server">  
                    <MasterTableView DataKeyNames="DocumentId" ClientDataKeyNames="DocumentId" DataSourceID="linqSource" 
                        AutoGenerateColumns="false">  
                        <Columns> 
                            <telerik:GridBoundColumn DataField="CaseNumber" HeaderText="Case Number" UniqueName="CaseNumber" /> 
                            <telerik:GridBoundColumn DataField="ParcelId" HeaderText="Parcel Id" UniqueName="ParcelId" /> 
                            <telerik:GridBoundColumn DataField="PartyName" HeaderText="Party Name" UniqueName="PartyName" /> 
                            <telerik:GridTemplateColumn UniqueName="AddDocument" HeaderText="Add">  
                                <ItemTemplate> 
                                    <asp:HyperLink ID="lnkAddDoc" runat="server" NavigateUrl='<%#"DocumentCart.aspx?docId=" & Eval("DocumentId") %>'>  
                                        <asp:Image ID="lnkImgAddDoc" runat="server" ImageUrl="~/images/doc.gif" AlternateText="Add to My Documents" /></asp:HyperLink> 
                                </ItemTemplate> 
                                <ItemStyle Width="25px" /> 
                            </telerik:GridTemplateColumn> 
                        </Columns> 
                    </MasterTableView> 
                </telerik:RadGrid> 

 
Joe Terhune
Top achievements
Rank 2
 answered on 24 Sep 2009
1 answer
141 views
Hi,

I have a RadGrid with a detailtable.
Given a certain condition i would like to expand an item dynamically usiong the following code
protected void customerRadGrid_ItemDataBound(object sender, GridItemEventArgs e)  
{             
  if (e.Item is GridDataItem)  
  {  
    if (MyExpandCondition((e.Item as GridDataItem)))  
    {  
      item.Expanded = true;  
    }  
  }               

Just setting the Expanded property to true doesn't seem to work. I debugged it and CanExpand is still false (because the ChildItem is still null) at this time.
The HierarchyLoadMode is set to the default one (ServerOnDemand)

I found out that when the user clicks the expand button a firecommand method is called with "ExpandCollapse" and the

ItemIndexHierarchical

 as parameters.
So i changed the "item.Expanded = true" line into "item.FireCommandEvent(RadGrid.ExpandCollapseCommandName, item.ItemIndexHierarchical)" but that doesn't seem to do what i expected.

Does anybody know how to expand this server-side? Or is there a Telerik demo that shows how to do this?

Thanks in advance!

 

Princy
Top achievements
Rank 2
 answered on 24 Sep 2009
2 answers
99 views
Here is exactly what I do :

  1. I open Visual Studio 2005
  2. Create a new Web Site
  3. In default.aspx, I add a new RadEditor Control
  4. In the Smart Tag, I
    • Enable RadEditor Dialogs
    • Enable Spell Check for RadEditor
    • Add RadScriptManager
  5. I compile the project
  6. I open the project (http://localhost/projectname/default.aspx) in my web browser.
  7. The Editor shows and all basic features work fine.  But when I open any dialog (Link manager, Image Manager,  etc), the dialog shows but not completely and I get Javascript errors like this :

 

Error: Sys is not defined  
Source file: http://localhost/project/Telerik.Web.UI.DialogHandler.aspx?DialogName=LinkManager&Skin=Default&Title=Hyperlink%20Manager&doid=1b370f61-93b1-4412-8280-42ccbd3a6b55&dpptn=&dp=BgtyGRNbERUlL1IBIgV6KyN%2FC3NpPxZKOWIPU1UTA0gCbjpUOCpLaHgrXzkuAj5LGBoVCC5hPE4jPyUdImF%2BKCMaDENiCh5VD2MIFXoXLVM1Uz4ICgVpYXEoUwUWPA9YNhsRNyhhIxUtPzEEIhRmMhh%2FbEp8IgJODhkTCnsQGEE1YSYJBj1HensrXy8XPCVDGDcVARNhEQ8tSDEEIj9ENRhwC0BSVWxTPhYxDlUTbFw1YQBPBjwGR0MrcjAmPA9CN24SAgd1ES4lSTkSLz5ACxpvHwV%2BMTBHOmExV2E4A0AHfyZgCQdxRHMGS3YgFj1iNxorKS9%2BMxg6PVZaIT8dExx%2FEElVLyhrDWI1EW45ZAI3RQBgEj5bTmwQfXYhOi1CNRsNOQVhXDQmSCk%2BLz5MdBtvF0RSLxJrDhYPFWADPgM1RSJsOFtXeEMqfXYtKwNCMDENAAd%2BBTclPSZZLBVYCh19YHVjMxJrDToxVWMRG3Exbj5gOS1xRHY5VzAhFyoANhsVKB9YBSMhSwcSKwdyAzR%2BNURVLxp8IRkPFW0CD2EHRClBCgdlfnc5cXYgBy1QNRo3JBNMOzchPggQLwUZBhxEKXVlM2gRPgk1Vm0MH0c6fhR9PT51XENOQzkhFg8BNR8%2FNhNhEQMtKxQfNBZcDRsaF1hSIDQQNQkPFlVmYGM6cT5XECxpR0M0aS84FQhC  
Line: 50  
 
Code: Sys.WebForms.PageRequestManager._initialize('ScriptManager1'document.getElementById('Form1')); 

Error: Type is not defined  
Source file: http://localhost/project/Telerik.Web.UI.DialogHandler.aspx?DialogName=LinkManager&Skin=Default&Title=Hyperlink%20Manager&doid=1b370f61-93b1-4412-8280-42ccbd3a6b55&dpptn=&dp=BgtyGRNbERUlL1IBIgV6KyN%2FC3NpPxZKOWIPU1UTA0gCbjpUOCpLaHgrXzkuAj5LGBoVCC5hPE4jPyUdImF%2BKCMaDENiCh5VD2MIFXoXLVM1Uz4ICgVpYXEoUwUWPA9YNhsRNyhhIxUtPzEEIhRmMhh%2FbEp8IgJODhkTCnsQGEE1YSYJBj1HensrXy8XPCVDGDcVARNhEQ8tSDEEIj9ENRhwC0BSVWxTPhYxDlUTbFw1YQBPBjwGR0MrcjAmPA9CN24SAgd1ES4lSTkSLz5ACxpvHwV%2BMTBHOmExV2E4A0AHfyZgCQdxRHMGS3YgFj1iNxorKS9%2BMxg6PVZaIT8dExx%2FEElVLyhrDWI1EW45ZAI3RQBgEj5bTmwQfXYhOi1CNRsNOQVhXDQmSCk%2BLz5MdBtvF0RSLxJrDhYPFWADPgM1RSJsOFtXeEMqfXYtKwNCMDENAAd%2BBTclPSZZLBVYCh19YHVjMxJrDToxVWMRG3Exbj5gOS1xRHY5VzAhFyoANhsVKB9YBSMhSwcSKwdyAzR%2BNURVLxp8IRkPFW0CD2EHRClBCgdlfnc5cXYgBy1QNRo3JBNMOzchPggQLwUZBhxEKXVlM2gRPgk1Vm0MH0c6fhR9PT51XENOQzkhFg8BNR8%2FNhNhEQMtKxQfNBZcDRsaF1hSIDQQNQkPFlVmYGM6cT5XECxpR0M0aS84FQhC  
Line: 104  
 
Code: Type.registerNamespace("Telerik.Web.UI.Widgets"); 

and a few more like that...  So I can't make it work properly and use all features.  Am I missing something ?  Am I doing something wrong ?
Alexis Gagnon
Top achievements
Rank 1
 answered on 24 Sep 2009
2 answers
128 views
I am trying to ajaxify links in a gridview. When I add the OnItemCreated event hander, I get the error:

Collection was modified; enumeration operation may not execute.


I have predefined AjaxSettings in the RadAjaxManager. I found that if I remove them, I don't get the error. Shouldn't it be possible to have defined ajax settings as well as dynamically added them in code behind?

protected void uxGrid_OnItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridDataItem) 
        { 
            GridDataItem item = (GridDataItem)e.Item; 
            LinkButton lnkAddParticipant = (LinkButton)item["TemplateColumn"].FindControl("lnkAddParticipant"); 
            RadAjaxManager1.AjaxSettings.AddAjaxSetting(lnkAddParticipant, uxGrid, null); 
        } 
    } 

This works:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
        <AjaxSettings> 
</AjaxSettings> 
    </telerik:RadAjaxManager> 

This doesn't work:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="btnLoadRooms"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="uxGrid" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
</AjaxSettings> 
    </telerik:RadAjaxManager> 



Ron Cirka
Top achievements
Rank 1
 answered on 24 Sep 2009
2 answers
269 views
Hi,

I am trying to use 'RadListBox' and getting the error : Unknown server tag 'telerik:RadListBox'.

In my code(given below), i have 'telerik:RadScriptManager ' , 'telerik:RadTextBox' and 'telerik:RadListBox '.

If i remove the 'telerik:RadListBox ' then the other two ('telerik:RadScriptManager ' and 'telerik:RadTextBox') works fine and RadTextBox is displayed on the screen.

If i add 'telerik:RadListBox ' to the same page then page give me above error. 


Thanks
Pal



My code:-
------------------------------------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="temp.aspx.cs" Inherits="Aif.Gatas.temp" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<html><head>
</head>
<body>
<form runat="server" id="mainForm" method="post" style="width: 100%">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadTextBox ID="rTextBox" runat="server" ></telerik:RadTextBox>
        <telerik:RadListBox runat="server" ID="RadListBox1" AllowReorder="true" AllowDelete="true"
            Height="200px" Width="240px">
            <Items>
                <telerik:RadListBoxItem Text="Test Item 1" />
                <telerik:RadListBoxItem Text="Test Item 2" />
            </Items>
        </telerik:RadListBox>
</form>
</body></html>
------------------------------------------------------------------
Tapinder
Top achievements
Rank 1
 answered on 24 Sep 2009
4 answers
204 views
Hi,

I used the search and found some posts dealing with this. Some some posts it sounded as it would be enough to alter CSS. In one post Telerik posted new CSS and image. The css did not match the css I have. Maybe it was an older version.

So is the only way to reduce the height to get Telerik to supply a new image and css? Or is there some way to alter the existing image myself? Tutorial?

PS! I'm not talking about the height of the expanded combobox or the input box alone. I'm talking about the "normal" appearance when no selection is made.

EDIT: Apparently "we" (the customer) have bought the component. I thought we only used the trial for now, so I have asked someone here with access to the premium "powers" to open a ticket regarding this issue.
Lindsey Kelly
Top achievements
Rank 1
 answered on 24 Sep 2009
3 answers
105 views
Hello,

I customized the header row of the radgrid, and I cannot figure out how to access it.  How do I get access to the header row in code-behind?

Thanks.
Shinu
Top achievements
Rank 2
 answered on 24 Sep 2009
1 answer
52 views
I have a three appointment for a single day , and i want to create the seperate context menu for each this three appointment , will it be possible?

How can i create the Seperate context menu for individual appointment..?

Regards
Samir
Peter
Telerik team
 answered on 24 Sep 2009
2 answers
172 views
I want to be able to validate all of the controls in all of the tabs in one button click event. I have all of the controls broken out into separate validation groups by their tab. The tricky part is that i want to know what tab has the invalid controls.

I tried creating an array of my validation groups in the same order as the tabs and then looping through it like so:

for (int i = 0; i < ValidationGroups.Count - 1; i++)
            {
                Page.Validate(ValidationGroups[i]);

                if (!Page.IsValid)
                    RadTabStrip1.Tabs[i].ImageUrl = iconPath;

            }

The problem is that Page.IsValid will always return false as soon as ANY validation group is false. So if I have invalid controls on the first tab, the Page.IsValid will always return false for every tab after that.

Does anyone have a better solution? Thanks!
Josh Pollard
Top achievements
Rank 1
 answered on 24 Sep 2009
1 answer
65 views
Hi - I have a scheduler with multiple rooms defined - some of my 'talks' are just in 1 room but I need to define things such as 'breakfast' that span all rooms - is this possible?

Thanks
Peter
Telerik team
 answered on 24 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?