Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
140 views
Dear friends, I found may threads but none of them worked for me. what I'm trying to do is:

main page (with masterpage) will call page1 in radwindow
o page1, I need to close radwindow and sense its closed so I'll go on...

problem is, I could not find main page's radwindow control and cannot close it. can you help me ?

on main page I open as:
<telerik:radwindowmanager id="RadWindowManager1" reloadonshow="true" runat="server">
        <Windows>
            <telerik:RadWindow runat="server" Width="600px" Height="550px" VisibleStatusbar="true" Style="z-index: 10000;"
                ID="ExplorerWindow" Modal="true" Behaviors="Default" ShowContentDuringLoad="true" RegisterWithScriptManager="true" >
            </telerik:RadWindow>
        </Windows>
    </telerik:radwindowmanager>
 
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    ExplorerWindow.NavigateUrl = "page1.aspx"
    ExplorerWindow.VisibleOnPageLoad = True
End Sub

I dont know howto find radwindow from the page inside radwindow.

Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
 
    ' close window
 
End Sub

there's nothing in pages as this is isolated test application. just trying to close radwindow.
thanks...

Princy
Top achievements
Rank 2
 answered on 10 Dec 2012
1 answer
172 views
'AjaxControlToolkit.NumericUpDownExtender' cannot extend controls of type 'Telerik.Web.UI.RadNumericTextBox'..How to use
 'Telerik.Web.UI.RadNumericTextBox' with numeric updown extender
Princy
Top achievements
Rank 2
 answered on 10 Dec 2012
1 answer
81 views
I have a grid that is pulling data from a stored procedure. When I export, I want to query another stored procedure that has many additional columns of data returned. Is it possible to bind my grid to a separate datasource prior to exporting to excel or pdf? It is not an option for me to loop through the columns returned and show/hide each one. Any thoughts are appreciated!
Jayesh Goyani
Top achievements
Rank 2
 answered on 10 Dec 2012
2 answers
137 views
Hi Everybody
I m stuck.. my radgrid fetches data from a stored procedure ..(DeptID,SubDeptID,DocSubject,DateUploaded).Can I have a select button (like in asp.net grids) which can be used to fire selectedindexchanged event. On the event of slectedindexchanged I want to fetch the rows values for particular columns..
Thanks  in advance

Animesh Chatterjee
Shinu
Top achievements
Rank 2
 answered on 10 Dec 2012
1 answer
366 views
Hi,
I have a rad grid on my page. I added the below ajax code from one of the examples available in the rad grid site:

<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="radgrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radgrid1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>


I am getting the error "Only one instance of a ScriptManager can be added to the page".

How to fix this?
Thanks
Jayesh Goyani
Top achievements
Rank 2
 answered on 10 Dec 2012
2 answers
216 views
Hi , 
  I am trying to understand how to use a GridButtonColumn as an Edit button to display my FormTemplate. A few questions.  When I use it, the form magicaly appears. Thats great, but the control freak in me is puzzled.  I would like to control when it displays the form ?
  
  1) When I use a GridButtonColumn, I see it comming into the ItemCommand event, but it disappears, then the form appears. Is it the CommandName, CommandArgument or UniqueName that goes somewhere beyond that to display the actual form ? What events, properties or code is used to turn on a FormTemplate ?  Perhaps the code that turns on the form is expecting a certain combination of CommandName, CommandArgument or even UniqueName ?  Or maybe on of the 'on' properties (onInsert, onUpdate, etc) in combination with ?
  2) Is it just good Telerik to always use the GridEditCommandColum for this ?
  3) Why is there no GridDeleteCommandColumn or is the GridEditCommandColumn used for delete - I see there are delete like properties there ? And I have seen code to that effect - Is this the standard ?
  4)  Is there any documentation explaining the how, why and when for the use of the GridEditCommandColumn vs GridButtonColumn ? Or is the GridButtonColumn intended for all other button uses except Edit and Delete ?
  5) There is some code that requires a UniqueID, but the GridEditCommandColum and GridButtonColumn only have the UniqueName.   

   Sorry, looks like I have 10 "?" for 5 question Items :-)

   When I test changing CommandName, CommandArgument or even UniqueName in certain combinations, I am beginning to think there is a conflict of sorts when I use a  GridButtonColumn for Edit vs a GridEditCommandColumn to display the form.
 
 thanks,
 David
Peter
Top achievements
Rank 1
 answered on 10 Dec 2012
4 answers
104 views
I have a RadGrid with using AllowAutomaticUpdates and EntityDataSource and I'd like to set some custom data (or override data) before the item is saved.

How do I do this?

I've tried this, but it doesn't work:

protected void rgUnits_UpdateCommand(object sender, GridCommandEventArgs e)
       {
           GridEditableItem item = (GridEditableItem)e.Item;
           ((RadDatePicker)item["LastModified"].Controls[0]).SelectedDate = DateTime.Now; 
           ((TextBox)item["LastModifiedBy"].Controls[0]).Text = Context.User.Identity.Name;
       }

<telerik:GridDateTimeColumn DataField="LastModified" FilterControlAltText="Filter Last Modified" HeaderText="Last Modified" SortExpression="LastModified" UniqueName="LastModified" ReadOnly="true" AllowFiltering="true" ColumnEditorID="gceSmallDateBox" DataFormatString="{0:dd/MM/yyyy}" PickerType="DatePicker">
                                            </telerik:GridDateTimeColumn>
                                            <telerik:GridBoundColumn DataField="LastModifiedBy" FilterControlAltText="Filter Last Modified By" HeaderText="Last Modified By" SortExpression="LastModifiedBy" UniqueName="LastModifiedBy" ReadOnly="true" AllowFiltering="true">
                                            </telerik:GridBoundColumn>


I don't *need* to have them as Grid Columns, but I figured this is what I'd have to do to get it work.
Peter
Top achievements
Rank 1
 answered on 10 Dec 2012
14 answers
265 views
Hi,

I'm having a problem with the RadGrid and using StaticHeader. When UseStaticHeaders="true", the header and footer get a margin-right of 17px (the size of the vertical scrollbar). This results in an empty/white space next to the footer/header. However, if I decrease the page size to 10, the scrollbar disappears. Now, the margin from the header is removed and gets the full width of the grid. But the margin is not removed from the footer.

Steps to reproduce:

Markup:
<telerik:RadGrid ID="grdData" runat="server" PageSize="20" AllowPaging="true" ShowFooter="true" OnNeedDataSource="grdData_NeedDataSource">
    <ClientSettings>
      <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
      <Resizing ClipCellContentOnResize="false" AllowColumnResize="true" AllowResizeToFit="true" EnableRealTimeResize="true" />
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="true">
    </MasterTableView>
  </telerik:RadGrid>

Code behind:
public partial class test : System.Web.UI.Page {
    public class MyDataItem {
      public int Id { get; set; }
      public string Name { get; set; }
    }
 
    protected void Page_Load(object sender, EventArgs e) {
       
    }
 
    protected void grdData_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e) {
      List<MyDataItem> datasource = new List<MyDataItem>();
      for (int i = 0; i < 100; i++) {
        datasource.Add(new MyDataItem() {
          Id = i,
          Name = "name_" + i
        });
      }
 
      grdData.DataSource = datasource;
    }
  }

On initial load, the page size is 20 and the vertical scrollbar, including the whitespaces, it rendered.
Now reduce the pagesize to 10: the vertical scrollbar is gone but the whitespace next to the footer remains.

In this example in doesn't look like a problem (besides it doesn't look nice). However, I'm having a grid with 20 columns and values in the footer. The last value can't be read completely because half of the text is cut of due to the margin.

Is this realy a bug or am I doing something wrong? And is there any workaround?

Thanks.
Pavlina
Telerik team
 answered on 09 Dec 2012
1 answer
116 views
hello,
I' m new in raddevelopment and I'm trying the free Telerik's version
For some reason, I put the radMenu control in an ascx asp.net control and the ascx control is in a masterPage
The basic functions of the menu are working well
But the calling pages are heavy, and it takes several secondes/ minutes to load.
I need to put a waiting message onload
In a normal aspx page, I put the radMenu in an updatepanel, with a updateprogress and there isn't ny problem
But,in the mentioned situation, I tried onclick, onitemclick, onitemdatadound, and every onclient function. I won't be able to fire any waiting message.
Do you have some idea?
Thank you
Pierre
Top achievements
Rank 1
 answered on 09 Dec 2012
3 answers
156 views
My basic question is, every time the Count changes during client-side data binding, it jumps me back to the first page.  Is there any way to prevent this?

Here's a more in-depth description of the problem:

I'm using the RadGrid to display messages with client-side data binding.  A new message arrives on the server every few seconds.  We only keep x hundred messages on the server so once the queue is full old messages fall off the queue as new ones arrive.  Therefore using the standard startRowIndex to keep track of where we are in the grid doesn't work for us.  What is row 20 in one call might be row 19 a few seconds later as the oldest message falls off the queue.  Therefore simply want the next/previous/first/last buttons to jump to the next/previous/first/last group of messages and I'll handle the paging logic with my server code.

Toward that end, I have overridden (using OnItemCreated) the next/previous paging buttons to call my own javascript function for paging -
    function myGridPage(radGridId, dir) {
        pagingDirection = dir;
        $find(radGridId+'_ctl00').page(dir);
    }

Then on data binding I do this:
function RadGridMessages_DataBinding(sender, args) {
        var myMethodArguments = new Object();
        myMethodArguments.pagingDirection = pagingDirection;
        myMethodArguments.maximumRows = args.get_methodArguments().maximumRows;
        args.set_methodArguments(myMethodArguments);
    }

On the server-side I do this:
        [WebMethod(EnableSession = true)]
        public Dictionary<string, object> GetMessages(string pagingDirection, int maximumRows)
        {
<message logic goes here>
            Dictionary<string, object> data = new Dictionary<string, object>();
            data.Add("Data", messages);
            data.Add("Count", totalNumberOfMessages);
            return data;
        }

Everything seems to work fine, except that the "Count" changes often during the first few hours before the server message queue is full.  Every time the Count changes the Telerik client-side code calls set_virtualItemCount() which calls set_currentPageIndex(0).  This move me back to the first page (and triggers a rebind).

a. Am I handing the next/previous page in an appropriate way for my situation or is there a better way to do this.
b. How do I prevent set_virtualItemCount() from kicking me back to the first page every time the count changes?


Amjad
Top achievements
Rank 1
 answered on 09 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?