Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
131 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
139 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
108 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
161 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
128 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
5 answers
185 views
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%; width: 100%">  
<head runat="server">  
    <title>Untitled Page</title> 
</head> 
<body style="height: 100%; width: 100%">  
    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <telerik:RadSplitter BorderSize="0" ID="RadSplitter1" Width="90%" Height="100%" 
            Orientation="Horizontal" runat="server">  
            <telerik:RadPane ID="rpnHeader" Height="100%" Width="100%" runat="server" Scrolling="both">  
                <table cellpadding="3" cellspacing="0" width="100%" border="0" height="100%">  
                    <tr valign="top">  
                        <td style="width: 25%; text-align: center">  
                            <telerik:RadDockZone ID="RadDockZone1" runat="server" BorderStyle="None">  
                                <telerik:RadDock ID="RadDock1" Width="100%" Height="100%" runat="server" Title="Email">  
                                    <ContentTemplate> 
                                        <div style="padding: 3px">  
                                            <table cellpadding="2" cellspacing="0" style="width: 100%;">  
                                                <tr> 
                                                    <td> 
                                                        New Emails</td> 
                                                    <td align="right">  
                                                        0</td> 
                                                </tr> 
                                                <tr> 
                                                    <td> 
                                                        New Emails</td> 
                                                    <td align="right">  
                                                        0</td> 
                                                </tr> 
                                                <tr> 
                                                    <td> 
                                                        New Emails</td> 
                                                    <td align="right">  
                                                        0</td> 
                                                </tr> 
                                                <tr> 
                                                    <td> 
                                                        New Emails</td> 
                                                    <td align="right">  
                                                        0</td> 
                                                </tr> 
                                            </table> 
                                        </div> 
                                    </ContentTemplate> 
                                </telerik:RadDock> 
                            </telerik:RadDockZone> 
                        </td> 
                        <td style="width: 50%; text-align: center">  
                            <telerik:RadDockZone ID="RadDockZone2" runat="server" BorderStyle="None">  
                                <telerik:RadDock ID="RadDock2" runat="server" Title="Schedule">  
                                    <ContentTemplate> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                        asdsadasd</> 
                                    </ContentTemplate> 
                                </telerik:RadDock> 
                                <telerik:RadDock ID="RadDock3" runat="server" Title="Hahaha">  
                                    <ContentTemplate> 
                                        asdasdsad  
                                    </ContentTemplate> 
                                </telerik:RadDock> 
                            </telerik:RadDockZone> 
                        </td> 
                        <td style="width: 25%; text-align: center">  
                            <telerik:RadDockZone ID="RadDockZone3" runat="server" BorderStyle="None">  
                                <telerik:RadDock ID="RadDock4" runat="server" Title="Hahaha">  
                                    <ContentTemplate> 
                                        asdasdsad  
                                    </ContentTemplate> 
                                </telerik:RadDock> 
                            </telerik:RadDockZone> 
                        </td> 
                    </tr> 
                </table> 
            </telerik:RadPane> 
        </telerik:RadSplitter> 
    </form> 
</body> 
</html> 
 

Hi, I'm not sure whether to report this in docking or splitter forum.

When I tried to put docking controls inside a splitter, the dock just won't scroll down if its' height is very long. And this is only in IE. It works just fine in Firefox. Stripped down code is included above.

Also, I made screenshots from my original program to illustrate my point:

http://www.m1o.com/telerik/ie_dock_bug.gif
This one is IE7 on Vista. Notice how the docks just overflow outside the scrolls inside the splitter. It stays static when I tried to scroll down

http://m1o.com/telerik/ff_dock_bug.gif
This is Firefox. Everything looks and works just nicely, even with RadScheduler added.


Jim
Top achievements
Rank 1
 answered on 20 Oct 2009
6 answers
269 views
Hi:

I am working on an application that does some processing when the user clicks a button, and I'd like to show a progress indicator while the code runs. I followed the RadAjaxLoadingPanel example and got the indicator to show, but then the code doesn't work. So in the attached images 1 and 2 show what happens with no LoadingPanel, the user clicks Login and the code populates the drop-down.

When I add the Loading Panel it shows the indicator, 3.png, but then when it is finished the drop-down does not populate, see 4.png.

Can anyone make a suggesiton as to how I can get this to work?

Thanks in advance for any and all advice.

John.
John
Top achievements
Rank 1
 answered on 20 Oct 2009
1 answer
80 views

I have two pages in my applicaiton, both pages have the following basic structure:

 

...  
<asp:UpdatePanel runat="server" ID="xxx" UpdateMode="Conditional">  
    <ContentTemplate> 
        <telerik:RadDockLayout ID="xxx" runat="server">  
            <telerik:RadDockZone ID="xxx" runat="server">  
                <asp:UpdatePanel runat="server" ID="xxx" UpdateMode="Conditional">  
                    <ContentTemplate> 
                        <telerik:RadDock runat="server" ID="xxx">  
                            <ContentTemplate> 
                                <asp:UpdatePanel runat="server" ID="xxx" UpdateMode="Conditional">  
                                    <ContentTemplate> 
                                        ...  
 
                                    </ContentTemplate> 
                                </asp:UpdatePanel> 
                             </ContentTemplate> 
                         </telerik:RadDock> 
                     </ContentTemplate> 
                </asp:UpdatePanel>   
            </telerik:RadDockZone>   
        </telerik:RadDockLayout> 
    </ContentTemplate> 
</asp:UpdatePanel> 
...  
 

(note that each UpdatePanel has appropriate AsyncPostBackTriggers set)

One of the pages dynamically adds the RadDocks at run-time, and the other has the RadDocks hard-coded.  The issue is that when any RadDock is moved/minimized/closed within the dynamic page, all other RadDocks are refreshed.  When any RadDock is moved/minimized/closed within the hard-coded page, all other RadDocks remain untouched.  What I want is the latter effect, where I can alter one RadDock and others will remain untouched.

How can I make this happen?  Anything with ViewState?  With more/less UpdatePanels?  With changing UpdateModes?  Any help would be greatly appreciated.

~Ryan

 

 

Pero
Telerik team
 answered on 20 Oct 2009
1 answer
120 views
Hi,

i have installed MOSS 5.5.1 on the Sharepoint Server and after opening my Startpage i get the following error:

Server Error in '/' Application.  
--------------------------------------------------------------------------------  
 
Parser Error   
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.   
 
Parser Error Message: Bei der Verarbeitung der Seite ist ein schwerwiegender Fehler aufgetreten. Bitte wenden Sie sich an den Administrator dieser Website, um Hilfe zur Behebung des Problems zu erhalten.  
 
Source Error:   
 
 
Line 1:  <%@ Page Inherits="Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %> <%@ Reference VirtualPath="~TemplatePageUrl" %> <%@ Reference VirtualPath="~masterurl/custom.master" %><html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head> 
Line 2:  <!--[if gte mso 9]><xml>  
Line 3:  <mso:CustomDocumentProperties> 
   
 
Source File: /sites/npp/Seiten/NPPDokumentation.aspx    Line: 1   
 
 
--------------------------------------------------------------------------------  
Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016  

When i Retract the radeditormoss.wsp Solution everything works fine. Can someone help?
Stanimir
Telerik team
 answered on 20 Oct 2009
1 answer
81 views
I am using Telerik LinkManager in my code. When we give url text as 'http://google.com' the hyper link is getting created where the HREF is http://localhost/myapp/http://google.com.
Please do let me know how to get the correct url text here.

Thanks in advance.
Princy
Top achievements
Rank 2
 answered on 20 Oct 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?