Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
223 views
I have followed the instructions specifically on integration of the RadControls into Sharepoint but I cannot get either Sharepoint nor Sharepoint Designer to work correctly.

Here is the message I get with Sharepoint:

An error occurred during the processing of . Unknown server tag 'telerik:RadMenu'

Here is the message I get with Sharepoint Designer:
Error Creating Control - RadMenu1This control cannot be displayed because its TagPrefix is not registered in this Web Form.


Any assistance would be greately appreciated.  Thank you.

Corey Hambrick
Sebastian
Telerik team
 answered on 17 Jul 2008
3 answers
244 views
Hello,

I'm in the process of updating my code to the newest version of Telerik.  I've been having some problems with the new grid.  Many weird things have been happening.

I can't seem to select rows anymore.   In addition, the dropdownlist which is displayed in EditMode does not actually drop down anymore. (it is unresponsive to user clicks)

I've commented out most of my previous code to try to get it to just work, but to no avail.   Here is a small example of what is not working:

 <telerik:RadGrid ID="users_grid" runat="server" OnNeedDataSource="users_grid_needData" AutoGenerateColumns="false"> 
                            <ClientSettings> 
                                <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" /> 
                            </ClientSettings> 
                            <MasterTableView> 
                                <Columns> 
                                    <telerik:GridClientSelectColumn> 
                                    </telerik:GridClientSelectColumn> 
                                    <telerik:GridBoundColumn DataField="ps_userid" HeaderText="User ID" UniqueName="User ID" 
                                            ColumnEditorID="usr_id"> 
                                            <HeaderStyle HorizontalAlign=center /> 
                                        </telerik:GridBoundColumn> 
                                </Columns> 
                            </MasterTableView> 
                        </telerik:RadGrid> 


I don't know if this makes a difference, but this grid is inside of an iframe.

Thanks for your help.


Konstantin Petkov
Telerik team
 answered on 17 Jul 2008
3 answers
301 views
Hi,
    I am using  a radgrid wherein i am allowing the user to Expand/Collapse a group.When i set the radgrid attribute showheader = false the Expand/Collapse functionality is not working and when i set it to true it starts working.But the problem is that when i set it to true ,Header gets displayed on the grid but the requirement is that the header should not be displayed.
Can anyone suggest me how to implement the Expand/Collapse functionality without showing the Header.

Thanks,
Avik.
Princy
Top achievements
Rank 2
 answered on 17 Jul 2008
1 answer
88 views
I am trying to create a RadMenu that looks like this demo:

(http://www.telerik.com/DEMOS/ASPNET/Prometheus/Menu/Examples/Functionality/Templates/DefaultCS.aspx).

This demo creates the items statically.  I need for them to come from the database.

Just like in the demo link above, I want the top level parent to be a simply menu item, but I want the child menu items to all use a template like in the demo.

I tried creating an item template in the ascx and it worked great - except it was used for the top level (parent) items as well as the children - not what I want.

Any guidance or samples of this?  I searched the site but have come up rather empty.

Thanks!

Michael
Michael
Top achievements
Rank 1
 answered on 17 Jul 2008
5 answers
128 views
I am outputting my grid in ExcelML format.  Is it possible to add a hyperlink to the cells?
Cheston Williams
Top achievements
Rank 1
 answered on 17 Jul 2008
0 answers
170 views
If you find yourself needing to hide a filter column at runtime with AutoGenerated columns - you might consider the following server side:

Once you reference the OnItemCreated method in the mark-up just determine the column name you want to hide. I hardcoded for this example but you could set it from a session or whatever your little heart desires.

First, get a reference to the e.Items.Controls collection.
It will have a ton of controls in there for me it was 80+ for e.Items.
Second, using reflection get a reference to the underlying Sytem Type. In this case we are looking at for the "GridTableCell" type string.
Third, get a reference to each set of controls under that type.
Iterate the second collection looking for a UniqueID containing your chosen column name. This is neccessary because the control's UniqueId contains the full clientId with all that ct100 crap (UniqueID.Contains(columnName)).
Last, just get a reference to the control at the appropriate index and turn it off.

Now, for all you performance minded individuals - yes the iterations will add to the ticks of the grid and yes reflection adds some weight too - I tested on a grid bound to 23,567 recs (server side - w/Linq DataSource) and saw no impact to normal performance. Paging, Sorting, Filtering all worked without impact.

Why, well you might use this method if you feel client side script is a waste of time and beneath you or if you prefer to manage state server side. Also, perhaps you are loading an image inside a tooltip and want to suspress filtering. BTW, I could not find a solution in the support forum.

I patiently wait for the backlash....

protected void RadGridItems_OnItemCreated(object sender, GridItemEventArgs e)
    {
        string columnName = "Items_ImageURI";

        ControlCollection cCol = (ControlCollection)e.Item.Controls;
        for (int x = 0; x < cCol.Count; x++)
        {
            Type curType = cCol[x].GetType();
            string undertype = curType.UnderlyingSystemType.Name;
            if (undertype == "GridTableCell")
            {
                ControlCollection z = (ControlCollection)cCol[x].Controls;
                for (int y = 0; y < z.Count; y++)
                {
                    if (z[y].UniqueID.Contains(columnName))
                    {
                        Control filterControl = (Control)z[y];
                        filterControl.Visible = false;
                    }
                }
            }
        }
    }

Jay
Top achievements
Rank 1
 asked on 16 Jul 2008
2 answers
157 views
In a particular case I need to access the selected tab and get its value on the client side. Like on a click of a certain button I want to get the selected tab and use its value to pefrom some function. 

After going through the tabsrtip documentation i tried to use the property "SelectedTab" of tabstrip on the client side but its returning undefined. Is it the right way of doing it in javascript or am I really missing something?

Thanks in advance.

Regards,

Khurram 
khurram
Top achievements
Rank 1
 answered on 16 Jul 2008
1 answer
165 views
Hello all

I've been using RadControls for asdp.net ajax with DNN and love them! However, I've just started getting this error in vs 2008 when building the solution:

Error   10  The type 'System.Web.UI.UpdatePanelTriggerCollection' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll'  c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website\33da4fb4\5b6f38ba\App_Web_wqcx3cr8.0.cs   2182     
 


I see the 2 files it is referring to in the GAC.. in my web.config, the 1.0.61025 version is specified... why is there this confusion? Shouldn't the newer version be specified? The Web.config that comes with DNN specified the 1.0.61025 version.  How can VS be made to resolve this conflict?

Thanks
Harold

hchattaway
Top achievements
Rank 1
 answered on 16 Jul 2008
4 answers
302 views
I have a RadGrid. Inside the CommandItemTemplate, I have a RadComboBox. What I am trying to do is when I select the different items in the RadComboBox, there is a RadToolTip that displays the information about the selected item. For ths I needed to do a postback with the SelectedIndexChanged event of the RadComboBox. Problem is when I select an item, the RadComboBox disappears.

Here is what I have for the RadGrid.
<rad:RadGrid ID="rgCustomer" runat="server"  AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false"  
    OnItemCreated="rgCustomer_ItemCreated" OnItemCommand="rgCustomer_ItemCommand" Skin="Telerik" DataSourceID="odsCustomer"> 
         
    <PagerStyle Mode="NextPrevAndNumeric" /> 
     
    <ClientSettings EnableRowHoverStyle="true"> 
        <Selecting AllowRowSelect="true" /> 
    </ClientSettings> 
         
    <MasterTableView Width="100%" ShowFooter="false" DataKeyNames="CustomerId" CommandItemDisplay="Top"> 
         
        <CommandItemTemplate> 
            <div style="width:100%; margin:5px 5px 5px 5px;"> 
                     
                <div style="width:10%; float:left; vertical-align:top; text-align:center;"> 
                    Customer: 
                </div> 
                <div style="width:40%; float:left; vertical-align:top; text-align:center;"> 
                    <div style="width:100%; text-align:center;"> 
                        <rad:RadComboBox ID="rcbLocation" runat="server" Width="400px" Height="300px" MarkFirstMatch="true"  
                            EnableLoadOnDemand="true" Skin="Telerik" AutoPostBack="true" OnSelectedIndexChanged="rcbLocation_SelectedIndexChanged" />                
                              
                        <asp:RequiredFieldValidator ID="rfvLocation" runat="server" ControlToValidate="rcbLocation" Display="Dynamic"  
                            SetFocusOnError="true" EnableClientScript="true" ErrorMessage="Required" InitialValue="0" ValidationGroup="save" /> 
                                     
                        <rad:RadToolTip ID="rttLocation" runat="server" TargetControlID="rcbLocation" Sticky="true" Animation="Fade"  
                            Position="MiddleRight" RelativeTo="Element" Skin="Telerik"> 
                            <asp:Label ID="lblRttLocation" runat="server" /> 
                        </rad:RadToolTip> 
                    </div> 
                </div> 
                <div style="width:40%; float:left; vertical-align:top; text-align:center;"> 
                    <rad:RadTextBox" ID="rtbCustomer" runat="server" Width="400px" Skin="Telerik" /> 
                    <asp:RequiredFieldValidator ID="rfvCustomer" runat="server" ControlToVaidate"="rtbCustomer" Display="Dynamic"  
                        SetFocusOnError="true" EnableClientScript="true" ErrorMessage="Required" ValidationGroup="save" /> 
                </div> 
                <div style="width:10%; float:left; vertical-align:top; text-align:center;"> 
                    <asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_Click" ValidationGroup="save" /> 
                </div> 
                     
            </div> 
                     
        </CommandItemTemplate> 
                 
        <Columns> 
         
            <rad:GridBoundColumn HeaderText="Id" DataField="CustomerId" SortExpression="CustomerId" /> 
                 
            <rad:GridBoundColumn HeaderText="Location" DataField="Location" SortExpresstion="Location" /> 
             
            <rad:GridBoundColumn HeaderText="Name" DataField="CustomerName" SortExpresstion="CustomerName" /> 
             
        </Columns> 
         
    </MasterTableView> 
     
</rad:RadGrid> 

On the codebehind, I have
private Table gTable; 
private GridTHead gHead; 
private GridCommandItem gItem; 
 
protected void Page_Load(object sender, EventArgs e) 
{ 
    if (!IsPostBack) 
    { 
        rgCustomer.DataBind(); 
 
        gTable = (Table)rgCustomer.MasterTableView.Controls[0]; 
        gHead = (GridTHead)gTable.Controls[0]; 
        gItem = (GridCommandItem)gHead.Controls[0]; 
 
        RadComboBox rcb = (RadComboBox)gItem.FindControl("rcbLocation"); 
        rcb.Items.Clear(); 
 
        rcb.DataSource = LocationList.Search(null, null, null, null, null, null, null, null, null); 
        rcb.DataTextField = "LocationName"; 
        rcb.DataValueField = "LocationId"; 
        rcb.DataBind(); 
        rcb.Items.Insert(0, new RadComboBoxItem("Select", "0")); 
    } 
} 
 
 
protected void rcbLocation_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e) 
{ 
    Label lbl = (Label)gItem.FindControl("lblRttLocation"); 
    if (e.Value == "0") 
        lbl.Text = "Select a Location"; 
    else 
    { 
        LocationList oLocation = LocationList.Get(Convert.ToInt32(e.Value)); 
        lbl.Text = LocationList.LocationDetails; 
        oLocation = null; 
    } 
} 

When the page loads, I can see the Location RadComboBox in the CommandItem. It has all the items loaded in it. But when I select an item in it, the ComboBox control disappears (only the combobox, other controls are fine.. I do have a RadAjaxManager whose initiate ControlId is RadGrid and update ControlId is itself.

Thank you.
Baal
Top achievements
Rank 1
 answered on 16 Jul 2008
2 answers
167 views
I'm using the RadGrid's Insert/Update capabilities in an application where users can create/update/delete records. Generally there are many pages of records for the users to work with and the data is sortable. When a user adds a new record they often lose the context of where they are in the data with the default behavior of the RadGrid.

Let's say the users is on page 10 of 20 and they create a new record with a sort value like "AAAA". After the record is inserted the user is moved from page 10 and placed on page 20. The new record is probably going to be displayed on page 1. So the user ends up in a different place in the grid than they were previously and don't see the record they just created. I think a better interaction would be for the grid to be auto paged to the page containing the new record with the new record highlighted in some way so the user understand the new record was created properly.

I have several pages in my current application that use asp.net GridView and Details View controls together to perform the same sort of Insert/Update operations. These pages also have some messy custom code to figure out where new/updated record will appear in the grid and page the grid automatically to display them. I'm going to use this same technique with the RadGrid to get the behavior I want.

I'm wondering if I'm missing an easy way to get the RadGrid to behave how I want. Or, perhaps there's a better user interaction for working with sorted data and the RadGrid control that's recommended.
marksweat
Top achievements
Rank 1
 answered on 16 Jul 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?