Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
282 views
i having a rad grid with item template column consist of link button.i need to update the grid when i click the link button.

currently i am using radajaxmanger with ajax request function .but my grid doesnt get updated.
my code snippets are below
<telerik:RadGrid runat="server" ID="uxAlerts" OnItemCreated="uxAlerts_ItemCreated" OnNeedDataSource="uxAlerts_NeedDataSource"  OnItemDataBound="uxAlerts_OnItemDataBound" Skin="Simple" AllowPaging="True" AllowSorting="True"
                    CellSpacing="0" GridLines="Both" CssClass="Grid" AutoGenerateColumns="false"
                    ShowHeader="true">
                    <MasterTableView>
                        <Columns>
                            <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject" HeaderStyle-HorizontalAlign="Left">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="AssignedTo" HeaderText="Assigned To" HeaderStyle-HorizontalAlign="Left"
                                ItemStyle-Width="200px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CreatedDate" HeaderText="Date/Time" ItemStyle-Width="100px"
                                ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn HeaderText="Action" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center"
                                HeaderStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:LinkButton ID="uxUnread"  runat="server" Text='<%# Bind("ReadStatus")%>'></asp:LinkButton>
                                    <asp:LinkButton ID="uxClose"  Text="Close"  runat="server"></asp:LinkButton>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
<telerik:RadAjaxLoadingPanel runat="server" Skin="Default" ID="uxLoadingPanel" />
                    <telerik:RadAjaxManager ID="uxRadAjaxManager" runat="server" OnAjaxRequest="uxRadAjaxManager_AjaxRequest">
                        <AjaxSettings>
                            <telerik:AjaxSetting AjaxControlID="uxAlerts">
                                <UpdatedControls>
                                    <telerik:AjaxUpdatedControl ControlID="uxAlerts" LoadingPanelID="uxLoadingPanel" />
                                </UpdatedControls>
                            </telerik:AjaxSetting>
                        </AjaxSettings>
                    </telerik:RadAjaxManager>
and js func is

function CloseClick(index) {
            var ajaxManager = $find("<%= uxRadAjaxManager.ClientID %>");
               if (ajaxManager != null)
                {
                   ajaxManager.ajaxRequest(index);
               }

and cs func are
protected void uxAlerts_OnItemDataBound(object sender, GridItemEventArgs e)
        {

            if (e.Item is GridDataItem)
            {
                CaseAlert caseAlertDetails = e.Item.DataItem as CaseAlert;
                if (caseAlertDetails != null)
                {
                    GridDataItem dataItem = (GridDataItem)e.Item;
                    LinkButton rblHyperLink = (e.Item.FindControl("uxClose") as LinkButton);
 
                    string alertID = caseAlertDetails.Id.ToString();

                    rblHyperLink.OnClientClick = string.Format("return CloseClick('" + alertID + "');");


                }
            }
        }
protected void uxRadAjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            if (e.Argument != null)
            {
                //uxAlerts.DataSource = new List<CaseAlert>();
                //uxAlerts.DataBind();
          
                    
                }

            
        }

When i click close link button it works and it calls ajax request but i dnt find any loading panel working on grid and no update on grid
Casey
Top achievements
Rank 1
 answered on 17 Feb 2012
1 answer
92 views
I am using a RadTreeView control in RadPane. I have set Scrolling="None" in the pane which has my tree. I want the Tree to have height of its container pane. I have set RadTreeView height="100%" but it doesn't work. Also I have same problem for RadEditor not fitting in the RadPane.


HELP...
Plamen
Telerik team
 answered on 17 Feb 2012
2 answers
103 views
hi

I have attached a sample to show how the chinese characters in the resource is being cut off. The english text is fine.
It should be this 贵宾房 instead the top portion of the characters is cut off by about a few pixel.
How should i resolve this?
Plamen
Telerik team
 answered on 17 Feb 2012
3 answers
161 views
Hi,

I have been trying a demo project (the zip file that I downloaded was named as 213914_radschedulerdemo.zip) posted by Telerik support in one of the Telerik forums. The demo uses MVC 2.0 and RadScheduler. The demo works fine when MVC 2.0 is used. But in our application we are using MVC 3.0 and need to use RadScheduler. Using the provided sample, I tried to modify it to use MVC 3.0 instead of MVC 2.0. But after making these changes I get following error:

"Object reference not set to an instance of an object."

in OnActionExecuting method that is used to deserialize Json. Following is the snapshot of Exception:

======================
System.NullReferenceException was unhandled by user code
  Message=Object reference not set to an instance of an object.
  Source=RadSchedulerDemo
  StackTrace:
       at RadSchedulerDemo.Helpers.JsonParameterFilterAttribute.OnActionExecuting(ActionExecutingContext filterContext) in D:\3 SecurePMS\RnD\213914_radschedulerdemo\RadSchedulerDemo\RadSchedulerDemo\Helpers\JsonParameterFilterAttribute.cs:line 44
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
       at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14()
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
  InnerException: 
============

Following are the changes that I have done in the code:
1. Changed .Net framework of project from 3.5 to 4.0
2. Replaced reference to System.Web.MVC (2.0) with 3.0 version. Updated <assemblies> in web.config.
3. Commented Authorize attribute in "ScheduleController.cs" and "SchedulerServiceController.cs" files to disable authentication.

Note: I am not able to find the forum from where I downloaded the demo and also not able to upload the updated solution.

Any help on this will be of great help.

Thanks in advance.
Peter
Telerik team
 answered on 17 Feb 2012
10 answers
266 views
Hi 1) we are in the development phase of localizing our application and we use the telerik rad controls for Ajax in most of our pages ... In this phase we have to support 5 languages (English, Japanese, French, portugese And German). We are using our customized resource files for all the asp.net controls and even for few telerik controls like RAdgrid .. How about radcalendar ? Which is the best way to localize radcalendar ? Does it allow custom resourcefile creation? We don find any property for Jan feb mar etc ... And also for the fast navigation controls (ok cancel today) or the month headers .. can u please guide us with the best possible way ? 2) same way even for the other rad controls can u let us know how many languages do u actually support ? We want to make sure that if we use the inbuilt radcontrol resource files all he 5 languages I mentioned above are supported and also in future too it should be expandable ... Thanks, Karthik
Peter
Telerik team
 answered on 17 Feb 2012
1 answer
111 views
I have two RadComboBoxes, one to select a primary value using load on demand and the other to select a secondary value. When a value is selected in the primary control, I need to bind the secondary control with value relative to the primary selected value. (parent / child)

I know this can be accomplished using AJAX, but I could use an example of how to do this.

Thank you

SteveO

 

<table>
  
  
  
  
<tr>
  
  
  
  
<td style="text-align: right; white-space:nowrap">
  
  
  
<asp:Label ID="Label2" runat="server" Text="Case-Nbr:" Font-Bold="true" />
  
  
  
</td>
  
  
  
  
<td>
  
  
  
<telerik:RadComboBox ID="RadComboBox5" 
  
runat="server" 
  
Width="150px"
  
MarkFirstMatch="true"
  
AllowCustomText="True"
  
HighlightTemplatedItems="true" 
  
DropDownWidth="150px" 
  
CollapseAnimation-Duration="1"
  
EnableLoadOnDemand="true"
  
EnableVirtualScrolling="true"
  
ShowMoreResultsBox="true"
  
EmptyMessage="Select Case #" 
  
OnItemsRequested="CaseNbr_ItemsRequested">
  
  
  
</telerik:RadComboBox>
  
  
  
</td>
  
  
  
  
<td style="text-align: right">
  
  
  
<asp:Label runat="server" ID="Label16" style="font-weight: bold" Text="Item:"></asp:Label>
  
  
  
</td>
  
  
  
  
<td style="text-align: left">
  
  
  
<telerik:RadComboBox 
  
ID="ddl1" 
  
runat="server" 
  
DataSourceID="SqlDataSource10" 
  
DataValueField="item" 
  
DataTextField="item" 
  
OnClientFocus="getItems"
  
  
  
Width="100px">
  
  
  
</telerik:RadComboBox>
  
  
  
</td>
  
  
  
  
</tr>
  
  
  
  
<tr><td> </td></tr>
  
  
  
  
<tr>
  
  
  
<td colspan="4" style="text-align: center">
  
  
  
<asp:button ID="Button11" runat="server" BackColor="Blue" ForeColor="White" Text="Search" ToolTip="Search Article Records" OnClick="Search_OnClick" />
  
  
  
</td>
  
  
  
</tr>
  
  
  
</table>
  
  
Shinu
Top achievements
Rank 2
 answered on 17 Feb 2012
3 answers
306 views
RadControls version

RadControls for ASP.NET AJAX Q1 2010 SP2
.NET version

3.5
Visual Studio version

2008
programming language

C#

PROJECT DESCRIPTION
I am allowing users to update SQL records through a rad grid. I use a radEditor in a template. I need to allow users to click a button and import the attribute in the previous record. I am running into a problem with the reference to teh RadEditor Client script. I added this script to handle my custiom tool inside the template like so:

ASPX Template Markup
<telerik:GridTemplateColumn HeaderText="Narrative" UniqueName="Narrative" DataField="Narrative">
    <EditItemTemplate>
        <telerik:RadEditor ID="reNarrative" runat="server" SkinID="ScorecardInput" Content='<%#Bind("Narrative") %>'>
        </telerik:RadEditor>
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
            Telerik.Web.UI.Editor.CommandList["ImportNarrative"] = function(commandName, editor, args) {
                editor.pasteHtml('Test narrative here');
            };
            </script>
        </telerik:RadCodeBlock>
    </EditItemTemplate>
    <ItemTemplate>
        <asp:Label ID="lblNarrative" runat="server" Text='<%# Eval("Narrative") %>'></asp:Label>
    </ItemTemplate>
</telerik:GridTemplateColumn>


Code behind (I define the structure of the tools in my code behind)
EditorToolGroup etgNarrative = new EditorToolGroup();
EditorTool etImportNarrative = new EditorTool("ImportNarrative");
etImportNarrative.ShowText = true;
etImportNarrative.ShowIcon = false;
etImportNarrative.Text = "Import Last Narrative";
etgNarrative.Tools.Add(etImportNarrative);
neweditor.Tools.Add(etgNarrative);


This works fine unless the user clicks edit on another row in the grid. Once this happens the javascript declaration adding my custom button to the command list does not happen. I get the error "The command ImportNarrative is not implimented yet" - even though I have explicitly done so in the template right after the RadEditor code.



If I could create a reference to the RadEditor API without placing it on my page, I could put the script at the top of the page so it is always run.

Any help would be appreciated.
Rumen
Telerik team
 answered on 17 Feb 2012
4 answers
795 views
Hi ,my code is as below:
<ajax:GridTemplateColumn UniqueName="CompNo" HeaderText="CompNo" SortExpression="CompNo" HeaderStyle-Width="70px" ItemStyle-VerticalAlign="Top">
    <ItemTemplate>
        <%#DataBinder.Eval(Container.DataItem, "CompNo")%> 
    </ItemTemplate>
</ajax:GridTemplateColumn>

Does anyone how to get the value from the column?
Help Please!!
Bill Togkas
Top achievements
Rank 2
 answered on 17 Feb 2012
1 answer
103 views
I am trying to change the lookout of a RadDataPager, No matter what I try I cannot affect the spacing between the elements (see red arrows below). Nor can the change the size of the boxes nor the font size (see green arrows)/



Here is the styles I am using:
.rdpPagerLabel
 {
     font-size: 7pt;
 }
  
 .RadDataPager
 {
     font-size: 7pt;
 }

Here is the definition of the RadDataPager
<telerik:RadDataPager ID="RadDataPager1" runat="server" PageSize="25" PagedControlID="RadListView1"
    BorderWidth="0" OnFieldCreated="RadDataPager1_FieldCreated" CssClass="dataPagerClass">
    <Fields>
        <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
        <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="5" />
        <telerik:RadDataPagerButtonField FieldType="NextLast" />
        <telerik:RadDataPagerPageSizeField PageSizeText="Page size: " />
        <telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go"
            TextBoxWidth="15" />
        <telerik:RadDataPagerTemplatePageField>
            <PagerTemplate>
                <b>Total Number of Assets Found:
                    <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                </b>
            </PagerTemplate>
        </telerik:RadDataPagerTemplatePageField>
    </Fields>
</telerik:RadDataPager>
Shinu
Top achievements
Rank 2
 answered on 17 Feb 2012
7 answers
144 views
Hi,
Here is the problem that i encountered working on a project.
I have a RadEditor and there is an timer control (ajaxified) which auto saves the text in the RadEditor.
Say that I am on the page and I paste lot of text and scrolled to the bottom and left my cursor.
After it autosaves, the scroll position moves to the top in IE9 compatibility mode(IE7).
but works fine on IE9.
Also, here is another interesting thing that i noticed, when i publish on my development environment it works fine on IE9 compatibility mode(IE7) but not on IE9.
I couldn't find any workarounds to fix this.
Rumen
Telerik team
 answered on 17 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?