Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
102 views
I have a grid in the center of my page from which users can drag rows (representing pieces of merchandise) onto several different controls around the page.

The problem I'm having is this:
When a height is specified for the grid, rows expand to that size when you drag them. If not height is specified for the grid then rows maintain their original size during the drag. I need to specify a size for the grid, however, in order to maximize the number of rows that are visible at any given time. Here is the ASPX for my grid (although I've tried sizing it several different ways):


<telerik:RadGrid ID="rgItems" runat="server" GridLines="None" Skin="WebBlue" OnNeedDataSource="rgItems_NeedDataSource" OnRowDrop="rgItems_RowDrop" Width="460px" Height="585px">

<ClientSettings allowrowsdragdrop=True AllowColumnsReorder="True" ReorderColumnsOnClient="True">

<Selecting AllowRowSelect=True />

<ClientEvents OnRowDropping="onRowDropping"/>

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

</ClientSettings>

<MasterTableView DataKeyNames="nbrItemID" TableLayout="Fixed" AutoGenerateColumns="False">

<Columns>

<telerik:GridBoundColumn UniqueName="1" DataField="txtImageHTML" >

<HeaderStyle Width="60px" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn UniqueName="2" DataField="txtDescriptionHTML" HeaderText="&lt;center&gt;New Items&lt;/center&gt;" >

<HeaderStyle Width="220px" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn UniqueName="3" DataField="txtCategoryHTML" />

</Columns>

<RowIndicatorColumn Visible="False">

<HeaderStyle Width="20px" />

</RowIndicatorColumn>

<ExpandCollapseColumn Resizable="False" Visible="False">

<HeaderStyle Width="20px" />

</ExpandCollapseColumn>

<EditFormSettings>

<PopUpSettings ScrollBars="None" />

</EditFormSettings>

</MasterTableView>

</telerik:RadGrid>


Any help is greatly apreciated!

Mike
Top achievements
Rank 1
 answered on 23 Jun 2008
2 answers
119 views
On some of my pages that are converted to RADControls ASPNET.AJAX I have an annoying popup for all radcomboboxes that asks for the query parameter for the datasource every time I enter design mode.  It is extremely annoying.  It never used to do this and the code is clean.  I have no idea why its happening but any help would be great. 

The popup header is "Refresh Data Source Schema - SqlDatasource1"

Then below in the dialog it asks for the value for the datasource parameter.  I am not refreshing the schema so the popup should not happen.  Why does this keep happening?
Maxwell
Top achievements
Rank 1
 answered on 23 Jun 2008
3 answers
149 views
Hi,
I'm having a problem with a simple client side validation. I have a check-box 'I agree' disclaimer and the form cannot be submitted until the box is checked. The javascript for this is:

function checkValid(){
        var chk =  document.getElementById('<%= chkValid.ClientID %>');
        if (chk.checked){
            return true;
        }else{
            alert('you must agree to the disclaimer in order to save');
            return false;
        }
       
    }

I then set the 'onclick' attribute of the asp:button to use the function.

This works fine until the radAjax control is used, then the callback is not fired.

I tried using the RadAjax example in the help file but find that the documentation is incorrect for version 2008.1.528.20 as the documentation refers to the "OnRequestStart" event but the control uses "ClientEvents-OnRequestStart".

Also the statement to get the clientid of the control that fired the ajax request is 

var eventTarget = eventArgs.EventTarget;

which is wrong and happens to be 

var

eventTarget = eventArgs.get_eventTarget();

The button I am using has an ID of "cmdSave" and is in the container of a master form. This means the clientID of the control obtained by using 

<%= cmdSave.ClientID %> produces ctl00_ContentPlaceHolder1_cmdSave

while the clientID returned from eventArgs.get_eventTarget(); is 

ctl00$ContentPlaceHolder1$cmdSave.

I would suggest that the help section on RadAjax needs to be rewritten and especially with client side validation.

Could you please tell me how I can run my simple javascript function as described above.

Regards

Nikolay Rusev
Telerik team
 answered on 23 Jun 2008
1 answer
147 views
I have a LoadOnDemand combobox that I want to limit to 25 items or less.  I can do this just fine.  However I also want to update a label on the page with a match count depending on the contents of the text in the control.  I can probably show this better with an example:

Combo Text                       Label  
----------                       -----  
AL1                              4500 match(s)  
AL12                             567 match(s)  
AL123                            120 match(s)  
AL1234                           18 matche(s)       // actual items appear here. 

So far the load on demand portion of this is working fine.  However I can't figure out a way to pass back the match count (4500, 567, 120, 18, etc...) to the client so that the label can be updated.  I tried AjaxManager.ResponseScripts.Add() with no luck.  Also investigated the OnClientItemsRequested property, but there doesn't seem to be a way to pass a value back to it from the server call.

Is there any way to do what I am trying to do here?  Any help would this would be, as usual, greatly appreciated.

Thanks,
Kevin
Simon
Telerik team
 answered on 23 Jun 2008
5 answers
165 views
Hi,

I have a page using RadSplitter and RadGrids inside it (with static headers and scrolling). RadSplitter expands to 100% width and height and so grids do. After upgrade to SP2 page stopped to load and throws Javascript error. I debugged JS code and found out which part throws an error (Invalid argument) - i marked it in bold:

(...)
setTimeout("Telerik.Web.UI.Grid.frozenScrollHanlder("+this._frozenScrollCounter+")",0);

},onWindowResize:

function(){

this

.setHeaderAndFooterDivsWidth();

this

.setDataDivHeight();

},setHeaderAndFooterDivsWidth:

function(){

if

(this._owner.GridDataDiv&&this._owner.GridHeaderDiv){

if

(navigator.userAgent.toLowerCase().indexOf("msie")!=-1){

if

(this._owner.GridDataDiv.offsetWidth>0){

this

._owner.GridHeaderDiv.style.width=this._owner.GridDataDiv.offsetWidth-Telerik.Web.UI.Grid.getScrollBarHeight()+"px";

}
(...)

Regards,
Piotr

Konstantin Petkov
Telerik team
 answered on 23 Jun 2008
3 answers
186 views
Is there a way to keep the scroll position after you do an insert or and update.. also, is there a way to set the focus of the subject textbox on and inlineinserttemplate.

scroll position is my number one priority....

Thanks
Dimitar Milushev
Telerik team
 answered on 23 Jun 2008
3 answers
165 views
The RadTextBox is not visible when inside a RadDock when viewing the page with IE7. It works fine in FireFox. Here is an example:

<telerik:RadDockLayout ID="RadDockLayout1" runat="server">
            <telerik:RadDockZone ID="RadDockZone1" runat="server" Width="400px" Orientation="Vertical">
                <telerik:RadDock ID="RadDock1" runat="server" Title="Test">
                    <ContentTemplate>
                        Write something:<br />
                        <telerik:RadTextBox ID="RadTextBox1" runat="server" TextMode="MultiLine" Height="150px" Width="300px" />
                    </ContentTemplate>
                </telerik:RadDock>
            </telerik:RadDockZone>
        </telerik:RadDockLayout>
Tervel
Telerik team
 answered on 23 Jun 2008
3 answers
139 views
I'm pretty new to radcontrols and Ajax in general, so I'll try to be as thorough as possible in describing the scenario, but if you need more information please let me know.

Scenario:

I have an ASP textbox and a radComboBox that are both managed with a RadAjaxManager. Both controls are set up to update each other in the AjaxManager. The textbox has an TextChanged event handler that calls a function to load the radCombo, and the radCombo has an ItemsRequested event handler that also loads the combo.

the RadCombo is set with the following properties:
AppendDataBoundItems = true
AutoPostBack = true
EnableLoadOnDemand = true
MarkFirstMatch = true

The code in both the function called from the textbox textchanged event, as well as in the radCombo ItemsRequested event, makes a SQL server database call to retrieve the data for the combo.

We have entered text into the textbox control and then we click on the dropdown image of the RadCombo. We then see the "loading" message and then we receive a Javascript error:
this.Items.length is null or not an object.

After debugging, we found that the Items attribute is null. Does anyone have a possible resolution?
Konstantin Petkov
Telerik team
 answered on 23 Jun 2008
1 answer
98 views
Hi,

    I am opening a radwindow on a button click.
    
    The window has behaviour close,maximise what happening is...

When i open the window, get  it maximise and then close the window.

Now when i again click the button the window opens in the maximise state.

Please let me know,whet should i do so that it always opens in the original mode(Not in previous mode).

Thanks
Reena. 
Svetlina Anati
Telerik team
 answered on 23 Jun 2008
3 answers
125 views
Hello,

I had aspx code that is structure like below

ASPX:
<Form>
    <RadAjaxPanel ClientEvents-OnRequestStart="PanelRequestStarted"...>
        <asp:Table ...>
            <asp:TableRow ...>
                <asp:TableCell>
                    <asp:ImageButton ID="ImageButtonExport" OnClick="ImageButtonExport_Click" ... />
                <asp:TableCell>
                <asp:TableCell>
                    <asp:Button ID="ButtonCallDialog" ... />
                <asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    <asp:Panel ...>
        <RadGrid ID='RadGridExport' ... >
        </RadGrid>
    </asp:Panel>
    </RadAjaxPanel>
    <RadWindowManager...>
        <windows>
            <RadWindow ID="RadWindowDialog" ...>
            </RadWindow>
        </windows>
    </RadWindowManager>
    <AjaxLoadingPanel ...>
        ...
    </AjaxLoadingPanel>
    <Script>
        function ShowDialog()
        {
            var radWindow = window.radopen(null, "RadWindowDialog");
            radWindow.SetUrl(radWindow.GetUrl());
        }

        function PanelRequestStarted(ajaxPanel, eventArgs)
        {
            if (eventArgs.EventTarget = 'ImageButtonExport')
                eventArgs.EnableAjax=false;
        }
    </Script>
</Form>

C#:
private void Page_Load(object sender, EventArgs e)
{
    ButtonCallDialog.Attributes.Add("OnClick", "ShowDialog();return false;");
}

protected void ImageButtonExport_Click(object sender, ImageClickEventArgs e)
{
    RadGridExport.ExportSettings.OpenInNewWindow = true;
    RadGridExport.MasterTableView.ExportToExcel();
}

I click ImageButtonExport first and the it asked whether I want to open or save, I choose to open (it need to get open out side browser not in side browser).
The problem happen after it open up excel spreadsheet I went back to the page and click on ButtonCallDialog  I had to click twice. The first click gave me an error "'null' is null or not an object" second click succefully display RadWindow.

What do I need to do to get ButtonCallDialog work on the first click?

Thanks.
Svetlina Anati
Telerik team
 answered on 23 Jun 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?