Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
254 views
Hi,

I'd just like to point out some presentation nastiness with RadListBox and multi-select.    Aside from the control hilighting the selected items, the browser is also highlighting item text which results in highlighting situations like the screen cap found at the link below:

http://www.marinko.ca/screencaps/CustomHilight.jpg

This is also an issue on your demo:
http://www.marinko.ca/screencaps/DemoHilight.jpg

Is there any way to prevent the browser from hilighting the item text above and beyond the control's own item highlight?
Riko
Top achievements
Rank 1
 answered on 20 Oct 2009
1 answer
110 views
I have a treeview that contains folders that can contain other folders and documents. The databinding is handled by a C# class that returns a dataview and it displays correctly. When I drag a folder or document to another folder, the source node appears after the destination node rather than beneath it. I need it to appear beneath. For example,

-Folder A
---Document X
-Folder B
---Folder C

When I drag X to B it winds up displaying like this:
-Folder A
-Folder B
---Folder C
-Document X

What I want is this:
-Folder A
-Folder B
---Folder C
---Document X

Here is my code:
        SourceNode.Owner.Nodes.Remove(SourceNode);  
        if (DestNode.Level == 0)  
        {  
            DestNode.Nodes.Insert(0, SourceNode);  
        }  
        else  
        {  
            switch (e.DropPosition)  
            {  
                case RadTreeViewDropPosition.Over:  
                case RadTreeViewDropPosition.Below:  
                    DestNode.InsertAfter(SourceNode);  
                    SourceNode.IsDescendantOf(DestNode);  
                    break;  
                case RadTreeViewDropPosition.Above:  
                    DestNode.InsertBefore(SourceNode);  
 
                    break;  
            }  
        }  
 

The line "SourceNode.IsDecendentOf(DestNode)" seems to have no effect.

Thanks for your help. YOu guys are awesome.
Yana
Telerik team
 answered on 20 Oct 2009
4 answers
126 views
Hi,

I am using Themes in my application. The Filter, Next, Previous, Move Last and Move First icons of Rad Grid shows border around these icons.

How to get rid of the border from these icons?

Thanks,
Pal
Tapinder
Top achievements
Rank 1
 answered on 20 Oct 2009
7 answers
173 views
We are using the TreeView control(ASP.NET AJAX Controls ver 2008.2 1001) in a interface that allows the user to drag and drop a link listed in a tree view on the left ( Available Links) to a tree view on the right (Goup Structure); illustrated in the attached screenshot.

If the user drag and drops the selected link i.e "05 KM Conference to the tree view on the right side and the cursor is not toward the top of the tree view, the drag and drop works just fine. However, if it is near the top, the drag and drop does nothing.

By using the IE Developer toolbar, we have been able to determine that there is a UL element with the class names "rtUL" and "rtLines" at the top of the empty tree view. This is highlighted with a blue border in the screen shot and you can see it highlighted in gray in the DOM structure listing the IE Developer toolbar. If the user drag drops the link from the tree view on the left and they attempt to release the drag and drop to the tree view on the right and the cursor is over this UL element (indicated by the red line on the screen shot), the drop does not occur. If they do it to any other area (indicated by the green line on the screen shot), it works.

So, it appears that this non-visible UL element interferes with the drag and drop function. It also appears that this UL element is part of the treeview rendering.

Any fix for this unwanted behavior?

Thanks in advance,

Keith E.

Yana
Telerik team
 answered on 20 Oct 2009
4 answers
127 views
Hello,

I wonder if it's possible to shift to the left the calendar using the css and how ?

Thanks.
Pierre-Antoine DOUCHET
Top achievements
Rank 1
 answered on 20 Oct 2009
2 answers
140 views
I've read the tutorials, and how-to section.  I'm using the 2009.2.701.35 dll.
I have a RadGrid with several columns.  The important part is that one contains an EnvironmentID.  I've setup a SQL datasource that gets the info from a view in the database.  I'm trying to set up a default filter on the EnvironmentID field to filter out any with the ID of 4.  I can not get the demo code to work to save my life.  There has to be something that I'm missing.

When I compile the site it does not filter the grid.  When I look at the filter, it shows "DoesNotEqual" as the selected filter, but there is no number in the box.  And, of course, the items with an EnvironmentID of 4 are there.

When I manually input a 4 and press enter, it filters just fine.  It just does not load with the filter.

I've also tried to set the filter declaratively (just like the example), but changing the CurrentFilterFunction="NotEqualTo" and CurrentFilterValue="4" on the EnvironmentID column.  When I do that, it doesn't filter, but the 4 shows up in the box and NotEqualTo is the highlighted filter.  When I press enter, it filters just fine.

One other thing:  I've changed the column type from GridBoundColumn to GridNumericColumn with no change (and back).  I've also tried changing the datatype to system.string with no real changes either.

Based on the lack of relevant articles indicating this is broken, what am I doing wrong?

Here's the pertinent Grid stuff:
<telerik:RadGrid ID="ServerRadGrid" runat="server"   
AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True"   
AutoGenerateEditColumn="True" DataSourceID="SqlDataViewServerLookup"   
GridLines="None" EnableLinqExpressions="false"   
onprerender="ServerRadGrid_PreRender">   
 
<MasterTableView AutoGenerateColumns="False" DataKeyNames="ServerID"   
DataSourceID="SqlDataViewServerLookup" AllowFilteringByColumn="True">   
 
<RowIndicatorColumn>   
<HeaderStyle Width="20px"></HeaderStyle>   
</RowIndicatorColumn>   
<ExpandCollapseColumn>   
<HeaderStyle Width="20px"></HeaderStyle>   
</ExpandCollapseColumn>   
 
<Columns>   
<Telerik:GridBoundColumn datafield="ServerID" datatype="System.Int32"   
headertext="ServerID" readonly="True" sortexpression="ServerID"   
uniquename="ServerID" Visible="False"></Telerik:GridBoundColumn>   
<Telerik:GridBoundColumn datafield="SystemName" headertext="SystemName"   
sortexpression="SystemName" uniquename="SystemName"></Telerik:GridBoundColumn>   
<Telerik:GridBoundColumn datafield="SerialNumber"   
headertext="SerialNumber" sortexpression="SerialNumber"   
uniquename="SerialNumber"></Telerik:GridBoundColumn>   
<Telerik:GridNumericColumn datafield="EnvironmentID"   
datatype="System.Int32" headertext="EnvironmentID"   
sortexpression="EnvironmentID" uniquename="EnvironmentID" AutoPostBackOnFilter="true"></Telerik:GridNumericColumn>   
<Telerik:GridBoundColumn datafield="EnvironmentName"   
headertext="EnvironmentName" sortexpression="EnvironmentName"   
uniquename="EnvironmentName"></Telerik:GridBoundColumn>   
</Columns>   
</MasterTableView>   
</telerik:RadGrid>   
 
<asp:SqlDataSource ID="SqlDataViewServerLookup" runat="server"   
ConnectionString="<%$ ConnectionStrings:CMDBConnectionString %>"   
SelectCommand="SELECT * FROM [ViewServerLookups]"></asp:SqlDataSource>  

And here's the stuff from the code behind:
protected void ServerRadGrid_PreRender(object sender, EventArgs e)  
        {  
            if (!Page.IsPostBack)  
            {  
                ServerRadGrid.MasterTableView.FilterExpression = "([EnvironmentID]!='4')";  
                GridColumn column = ServerRadGrid.MasterTableView.GetColumnSafe("EnvironmentID");  
                column.CurrentFilterFunction = GridKnownFunction.NotEqualTo;  
                ServerRadGrid.MasterTableView.Rebind();  
            }  
        } 

David Kingston
Top achievements
Rank 2
 answered on 20 Oct 2009
1 answer
144 views
I have a GridDropDownColumn and i insert ( in event RadGrid1_InsertCommand) selected value from GridDropDownColumn into a collection(here a llblgen collection-never mind this.) Each time i insert (so-called) the selected value, first item in GridDropDownColumn is inserted in code behind.

Here is how i get the selected value:

//e here is GridCommandEventArgs e 
GridEditableItem eeditedItem = e.Item as GridEditableItem; 
Hashtable newnewValues = new Hashtable(); 
//The GridTableView will fill the values from all editable columns in the hash 
e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);
//here newValues always stores the first item from the GridDropDownColumn



  <telerik:GridDropDownColumn DataField="HizmetId" DataSourceID="LLBLGenProDataSourceHizmet" 
                        HeaderText="Hizmet Adı" ListTextField="HizmetAdi" ListValueField="HizmetId" 
                        UniqueName="HizmetId" ColumnEditorID="GridDropDownColumnEditor1"  > 
                    <ItemStyle Width="400px"></ItemStyle> 
                    </telerik:GridDropDownColumn> 

Thanks...
Princy
Top achievements
Rank 2
 answered on 20 Oct 2009
1 answer
115 views
Hi

I am Sreedhar Ambati.
I am using RadGrid.
I have 4 headings for 4 columns. There are for Item no. , Name, Quantity and price.
But for Price it should have two subheadings like Rs. and Ps.

How to achieve this?

Regards
Sreedhar
Princy
Top achievements
Rank 2
 answered on 20 Oct 2009
1 answer
166 views

Hello.

I try to localize date picker used in RadGrid filter.
The properties I want localize are:
CancelButtonCaption(Button “Cancel” in Calendar popap),
OkButtonCaption (Button “OK” in Calendar popap)
TodayButtonCaption (Button “Today” in Calendar popap)

I’ve tried two solutions:
1. Localize it on Grid ItemCreated event;
2.Localize it on Grid DataBound event.
Code below:
/// <summary> 
/// First solution: Fired when item created. 
/// </summary> 
/// <param name="sender"></param> 
/// <param name="e"></param> 
public void Grid_ItemCreated(object sender, GridItemEventArgs e) { 
  if (e.Item is GridFilteringItem) { 
    GridFilteringItem filter = (GridFilteringItem)e.Item; 
    GridColumn[] renderColumns = e.Item.OwnerTableView.RenderColumns; 
    foreach (GridColumn column in renderColumns) { 
    if (column is GridDateTimeColumn) { 
      RadDatePicker picker = (RadDatePicker)filter[column.UniqueName].Controls[0]; 
      picker.Calendar.FastNavigationSettings.CancelButtonCaption = Resources.GlobalRes.Cancel; 
      picker.Calendar.FastNavigationSettings.OkButtonCaption = Resources.GlobalRes.OK; 
      picker.Calendar.FastNavigationSettings.TodayButtonCaption = Resources.GlobalRes.Today; 
    } 
    } 
 } 
} 
 
//--------------------------------------------------------------- 
 
/// <summary> 
/// Second solution: Is triggered when grid has data bound. 
/// </summary> 
/// <param name="sender"></param> 
/// <param name="e"></param> 
protected void Grid_DataBound(object sender, EventArgs e){ 
GridFilteringItem filteringItem = null; 
//Get grid filter item. 
if (this.Grid.MasterTableView.GetItems(GridItemType.FilteringItem) != null  
&& this.Grid.MasterTableView.GetItems(GridItemType.FilteringItem).Count() >0) {  
  filteringItem = (GridFilteringItem)this.Grid.MasterTableView.GetItems(GridItemType.FilteringItem)[0]; 
} 
if (filteringItem != null) { 
//Get filter control. 
foreach (GridColumn column in this.Grid.MasterTableView.RenderColumns) { 
  if (column is GridDateTimeColumn) { 
  RadDatePicker picker = (RadDatePicker)filteringItem[column.UniqueName].Controls[0]; 
picker.Calendar.FastNavigationSettings.CancelButtonCaption = Resources.GlobalRes.Cancel; 
picker.Calendar.FastNavigationSettings.OkButtonCaption = Resources.GlobalRes.OK; 
picker.Calendar.FastNavigationSettings.TodayButtonCaption = Resources.GlobalRes.Today; 
                    } 
                } 
            } 
        } 

But this does not help.
Could you help me and give an approach to localize date picker in grid filters?
 
Best regards,
Alex.

Martin
Telerik team
 answered on 20 Oct 2009
3 answers
131 views
Hello Telerik
I'm using the radgrid telerik.
When i'm trying  to edit one record and there is few records on the grid it works fine, but if the grid has a lot of records and i want to edit one of the records it takes a lot of time to do that operation(simply open the fields for editing ).
what should i do to fix it ?
Thanks
Moti
Shinu
Top achievements
Rank 2
 answered on 20 Oct 2009
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?