Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
100 views
Hello,

I was looking around in the forum to find something about the thumbnail quality and all i got was april's old posts speaking about a fix and OctreeQuantitizer

With the last version of ajax controls there is a way to fix the thumb quality?

Or a fix in c#

Thanks for the attention
Rumen
Telerik team
 answered on 11 Sep 2008
6 answers
316 views
Can anyone tell me more about the drag and drop feature with the grid? I have a simple grid that i want to be able to reorder the items, and once the items are in correct order i can use a button to loop through and retrieve that order. So far i can only select on a row but when i move the row it goes back to it's original order.

Thanks
Rosen
Telerik team
 answered on 11 Sep 2008
3 answers
123 views
I have a page that when I first load the page, I want to show a grid that has student information on it.  When the user selects Teacher from the dropdown box, I want the student grid to disappear and the Teacher grid that has totally different information and headers to appear.

I also want to enable paging on this page. 
My problem is the "NeedDataSource" for both grids.  It doesnt work for the teacher.
Mike
Top achievements
Rank 1
 answered on 11 Sep 2008
2 answers
344 views
i've got a checkbox that i want to be able to control whether or not the tooltipmanager i have shows the tooltip. i'm using a raddatagrid and the tooltips work fine on it, but i want to be able to control whether or not it shows.

so i put an asp checkbox control and on the checkchanged event, i set the mytootipmanager.visible = mycheckbox.checked. this makes it invisible, but then won't re-enable it. ie, once it's off, it's off.

ideas?
Eric Sims
Top achievements
Rank 1
 answered on 11 Sep 2008
2 answers
124 views
I am wondering why the following options are showing up in the FilterMenu for a column that I have defined as a system.string:

GreaterThan
LessThan
GreaterThanOrEqualTo
LessThanOrEqualTo

I don't understand why numeric filters are showing up on a column defined as a string.  Here is how the column is set up:

<telerik:GridBoundColumn DataField="request" HeaderText="Request" SortExpression="request" DataType="System.String" UniqueName="request" FilterListOptions="VaryByDataType"></telerik:GridBoundColumn>

Dave
Top achievements
Rank 1
 answered on 11 Sep 2008
1 answer
133 views
I found the examples of drag and drop for a Rad Grid. However, I would like to check if it is valid to do the drag and drop. Because of server side specific data relationships, I would like to check client-side whether it is valid to do the drag and drop from on place in the grid to another. Do you have any example of such a check?

Thanks in advance,

K.E.
Rosen
Telerik team
 answered on 11 Sep 2008
1 answer
147 views
What is the best way to handle a many-to-many mapping in the DB for a table that is being represented with the Grid control using databinding?

Let's say I have a employee contact table and it currently has a FK for ContactTypeID which is a lookup to one of a variety of contact types.

Currently it is a databound dropdown list in the grid.  But let's say that I want to make it a many to many mapping by inserting a mapping table called EmployeeContacts which contains a FK to Employee table and a FK to ContactTypes table.

I still want a single grid that shows and edits employee contacts from the Employee table, but I now want the column that used to be a simple drop down of Contact Types to be a drop down with multiple check boxes or some other kind of column that lets me choose more than one selection.  Then I want to keep as much of the databinding as possible, or do I have to manually code the back end hook up of the checking and recording of the checkboxes upon edit form submission?

Anybody have an example of this kind of usage with RadGrid?  m2m mapping tables are a pretty common need.

Thanks in advance,
Rob
Bodevain Svensson
Top achievements
Rank 1
 answered on 11 Sep 2008
1 answer
84 views
Hi

I have created a custom css for the RadWindow and have customized the inactive window display through it.

There is now a requirement to have different inactive window styles based on the context in which a rad window is popped up.

I would like to know if this is possible through javascript or if there is a way to change the css to support different styles.

~Shuchi
Georgi Tunev
Telerik team
 answered on 11 Sep 2008
1 answer
75 views

Requirements

RadControls version

2008.01.0415.20
.NET version

2.0
Visual Studio version

2005
programming language

C#
browser support

all browsers supported by RadControls


 
PROJECT DESCRIPTION

This project illustrates how to select and expand a hierarchical Grid using the navigation buttons in the CommandItem. This is achieved by adding a GridButtonColumn to select and expand the Grid. Hook the ItemCommand Event and perform the computation there. Below are the code snippets.

ASPX:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server"
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <div> 
            <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" PageSize="5" DataSourceID="SqlDataSource1" GridLines="None" OnItemCommand="RadGrid1_ItemCommand" Skin="Default2006" OnPreRender="RadGrid1_PreRender"
                <MasterTableView AutoGenerateColumns="False"  CommandItemDisplay="Top" DataSourceID="SqlDataSource1" > 
                     <CommandItemTemplate> 
                         <asp:LinkButton ID="LinkButton1" Text="Next"  CommandName="Next" runat="server"></asp:LinkButton> 
                         <asp:LinkButton ID="LinkButton2" Text="Previous"  CommandName="Prev"  runat="server"></asp:LinkButton> 
                     </CommandItemTemplate> 
                    <RowIndicatorColumn Visible="False"
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn Resizable="False"
                        <HeaderStyle Width="20px" /> 
                    </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID" SortExpression="CustomerID" 
                            UniqueName="CustomerID"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" 
                            UniqueName="CompanyName"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="PostalCode" HeaderText="PostalCode" SortExpression="PostalCode" 
                            UniqueName="PostalCode"
                        </telerik:GridBoundColumn> 
                      <telerik:GridButtonColumn CommandName="Select" text="Select" HeaderText="SelectColumn" UniqueName="column" ></telerik:GridButtonColumn> 
                    </Columns> 
                    <EditFormSettings> 
                        <PopUpSettings ScrollBars="None" /> 
                    </EditFormSettings> 
                    <DetailTables> 
                     
                      <telerik:GridTableView runat="server" DataSourceID="SqlDataSource2"  > 
                        <Columns> 
                         <telerik:GridBoundColumn DataField="CustomerID" DataType="System.Int32" HeaderText="CustomerID" 
                            SortExpression="CustomerID" UniqueName="CustomerID"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="OrderID" HeaderText="OrderID" SortExpression="OrderID" 
                            UniqueName="OrderID"
                        </telerik:GridBoundColumn> 
                        </Columns> 
                          <RowIndicatorColumn Visible="False"
                              <HeaderStyle Width="20px" /> 
                          </RowIndicatorColumn> 
                          <ExpandCollapseColumn Resizable="False" Visible="False"
                              <HeaderStyle Width="20px" /> 
                          </ExpandCollapseColumn> 
                          <EditFormSettings> 
                              <PopUpSettings ScrollBars="None" /> 
                          </EditFormSettings> 
                      </telerik:GridTableView> 
                    </DetailTables> 
                </MasterTableView> 
                <ClientSettings> 
                 <Selecting AllowRowSelect="True" /> 
                </ClientSettings> 
            </telerik:RadGrid> 
            &nbsp;&nbsp; 
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthWindConnectionString2 %>" 
                SelectCommand="SELECT [CustomerID], [CompanyName], [PostalCode], [Region] FROM [Customers]"
            </asp:SqlDataSource> 
            <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:NorthWindConnectionString2 %>" 
                SelectCommand="SELECT [OrderID], [CustomerID], [EmployeeID] FROM [Orders]"
            </asp:SqlDataSource> 
            <br /> 
        </div> 
    </form> 
</body> 
</html> 
 


C#:
using System; 
using System.Data; 
using System.Configuration; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
using System.Data.Sql; 
using Telerik.Web.UI; 
 
public partial class _Default : System.Web.UI.Page  
    protected void Page_Load(object sender, EventArgs e) 
    { 
 
    } 
    protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
    { 
        if (e.CommandName == "Select") 
        { 
            GridDataItem item = (GridDataItem)e.Item; 
            item.Expanded = true
        } 
        if (e.CommandName == "Next") 
        { 
            foreach (GridDataItem item in RadGrid1.MasterTableView.Items) 
            { 
                if (item.Selected) 
                { 
                    item.Selected = false
                    item.Expanded = false
                    int CurrentIndex = item.ItemIndex; 
                    int NextIndex; 
                    if (CurrentIndex == RadGrid1.PageSize - 1) 
                    { 
                         NextIndex = 0
                    } 
                    else 
                    { 
                        NextIndex = CurrentIndex + 1; 
                    } 
                    RadGrid1.MasterTableView.Items[NextIndex].Selected = true
                    RadGrid1.MasterTableView.Items[NextIndex].Expanded = true
                    break; 
                } 
 
            } 
        } 
        else if (e.CommandName == "Prev") 
        { 
            foreach (GridDataItem item in RadGrid1.MasterTableView.Items) 
            { 
                if (item.Selected) 
                { 
                    item.Selected = false
                    item.Expanded = false
                    int CurrentIndex = item.ItemIndex; 
                    int PrevIndex; 
                    if (CurrentIndex == 0) 
                    { 
                        PrevIndex = RadGrid1.PageSize-1; 
                    } 
                    else 
                    { 
                        PrevIndex = CurrentIndex - 1; 
                    } 
                     
                    RadGrid1.MasterTableView.Items[PrevIndex].Selected = true
                    RadGrid1.MasterTableView.Items[PrevIndex].Expanded = true
                    break; 
                } 
 
            } 
        } 
    } 
    protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        foreach (GridColumn col in RadGrid1.MasterTableView.RenderColumns) 
        { 
            if (col.UniqueName == "ExpandColumn") 
            { 
                col.Display = false
            } 
        } 
        
    } 

Yavor
Telerik team
 answered on 11 Sep 2008
1 answer
106 views
Hi,$0  i m creating the Dynamic search result for this creating the dynamic  dockable object to this Dock object i m adding the RadGrid as a contenttemplate  from another UserControl in which everything going fine but when i m clicking on custom paging control it will give me error Incorrect loading on an Ajaxified UserControl. i m using 2007 RadControls.Actually i m not got GridItemEvent.$0
Sophy
Telerik team
 answered on 11 Sep 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?