Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
228 views
i am doing my grid binding, sorting, paging client side

i have handled the client side oncommand event like below as an example
 
function radGrid_Command(sender, e) { 
    showloadingpanel(true); 
    e.set_cancel(true); 
    var commandName = e.get_commandName(); 
    switch (commandName) { 
        case 'Sort'
        case 'Page'
        case 'PageSize'
            //if the page has unsaved changes etc etc 
            if (confirm("changes not saved, continue?")){ 
                //pagemethod get my data using the grid pagesize, pageindex, sortcolumn, sort direction, rebind the grid on callback etc etc 
            } 
            else
            //revert the sort, page or pagesize that was changed 
            showloadingpanel(false); 
        default: 
            break
    } 


now it is the else part (reverting the grid to its precommand state) that i need help on

this is what happens in the case of changing the page index

i have a hundred records of page size 10
i am on page 4
i change something somewhere
i change to page 7
on confirm i refuse
result is the page index is still changed to 7 even though i cancelled the event

with sort the sort icon will remain on the previously sorted column (even though i have not allowed multi column sorting)
with pagesize change the new page size will change even though i cancelled


so i guess the question is how do i restore the grid to still select the page 4 that was still selected above or make the sort icon not show on the newly clicked (but sort command cancelled) column? or rever the page size?

thanx
Mula Njira
Top achievements
Rank 1
 answered on 11 Mar 2010
1 answer
79 views
Simple question, is there a Rad Button control like asp:Button?  I see a control for pretty much everything else, but doesnt seem to be anything for buttons.

J
Daniel
Telerik team
 answered on 11 Mar 2010
1 answer
225 views
Hi,

We have a grid control placed inside a iFrame where we are implementing the resize of the grid columns by setting AllowScroll= true and usestaticheaders = true.

I want to check whether it supports all the functionality if we place the grid control inside inside the iframe.
Right now we are facing issues regarding the scrolling and static headers apart from alignment of columns.

Below are the issues i am facing with the Telerik grid

1)  Grid Lines after each of the item/ AlternatingItem i.e each row in a grid as per screenshot alignment.gif
2)  Grid Header is not aligned with the cell content when static headers and allow scroll set to true as per screenshot alignment.gif.
3)  How to override the default css class by custom css classes
4)  How to set wrap option for a GridTemplateColumn because i need to set tooltip and wrap =false both.
5)  How to get the scrollbars at runtime if the grid is inside a iframe when i have resized the columns by default allowscroll set to false.
6)  What needs to be set if I need to seperate each of the Grid column header text just like seperator.
7)  When no of records are selected as 5 the pager row is not attached to the grid rows as per attached screenshot1
Please let me know the solutions for the above raised questions.

Thanks
Schlurk
Top achievements
Rank 2
 answered on 11 Mar 2010
0 answers
413 views
Hi guys,

We have discovered a small, but annoying bug in RadMultiPage in Q1 2010 release (version 2010.1.309).

PROBLEM
A JavaScript error can occur when using the debug versions of the MS AJAX library (<compilation debug="true"> in web.config).

SOLUTION
There are three solutions, please pick one of them:

1. Set ScriptMode="Release" property of the ScriptManager / RadScriptManager.

2. Disable the debugging in the web.config file:
    <compilation debug="false">

3. Override the dispose method of the control on the page:
<asp:ScriptManager ID="ScriptManager" runat="server">  
</asp:ScriptManager>  
 
<script type="text/javascript">  
    (function() {  
        var oldDispose = Telerik.Web.UI.RadMultiPage.prototype.dispose;  
        Telerik.Web.UI.RadMultiPage.prototype.dispose = function()  
        {  
           Telerik.Web.UI.RadMultiPage.callBaseMethod(this"dispose");  
           oldDispose.call(this);  
        }  
    })();  
</script> 


What is Next
The problem is already fixed and will be available in the next Latest Internal Build and the first service pack.

We apologize for the caused inconvenience.
Telerik Admin
Top achievements
Rank 1
Iron
 asked on 11 Mar 2010
1 answer
98 views
Hi All,
            is there any way to add more space to Rad Tab Items Level 1, Can somebody let me know which CSS style we should change

Thanks in Advance

Thomson
Yana
Telerik team
 answered on 11 Mar 2010
1 answer
197 views
Hello!
  I have a problem regarding use of EditFormSettings with FormTemplate and NestedViewTemplate in same RadGrid. It seems NestedViewTemplate tempers with FormTemplate in edit mode so the whole EditTemplate is off.

For easier understanding I added two pictures. The one named withoutnestedview.jpg shows the grid with EditFormSettings FormTemplate and has no NestedViewTemplate properties, and the other has NestedViewTemplate code in the grid. And I mean literally just the code <NestedViewTemplate></NestedViewTemplate> and nothing else.

I searched the forum and did't find any similar problems. Is there a workaround am I doing something wrong ?

Thanx,
Grega

Veli
Telerik team
 answered on 11 Mar 2010
5 answers
156 views
Hello,

is there a way to select all items in a group on clientside? I tried the following code but without any success.

Best regards,
Dominic

The Grid:

<

 

telerik:RadGrid ID="radGrid" AllowMultiRowSelection="true" ...>

 

 

<MasterTableView ...>

 

 

<GroupByExpressions>

 

 

<telerik:GridGroupByExpression>

 

 

<SelectFields>

 

 

<telerik:GridGroupByField FieldAlias="Zyklus" FieldName="Cycle" HeaderValueSeparator=": ">

 

 

</telerik:GridGroupByField>

 

 

</SelectFields>

 

 

<GroupByFields>

 

 

<telerik:GridGroupByField FieldName="Cycle" />

 

 

</GroupByFields>

 

 

</telerik:GridGroupByExpression>

 

 

</GroupByExpressions>

 

 

<Columns>

 

 

<telerik:GridClientSelectColumn UniqueName="appliedColumn" HeaderText="verabreicht" />
...

Inside the ItemDataBound Event

 

if

 

( e.Item is GridGroupHeaderItem )

 

{

 

    GridGroupHeaderItem item = ( GridGroupHeaderItem )e.Item;

 

 

    CheckBox check = new CheckBox();

 

    check.ID =

"CheckAll";

 

    check.Attributes.Add(

"onclick", "headerClick(this)");

 

    check.Text =

"Auswahl aller Anwendungen des Zyklus umkehren.";

 

    item.DataCell.Controls.Add( check );

}

The Javascipt:

 

function

 

headerClick(e)

 

{

 

var masterTable = $find( "ctl00_MasterContent_therapyFormView_tumourTherapy_therapyRadGrid" ).get_masterTableView();

 

 

var element = $(e).parent().parent().parent();

 

 

var children = $(element).find("~ tr");

 

 

for (var a = 0; a<children.length;a++)

 

{

 

if ($(children[a]).attr("class") == "rgRow" || $(children[a]).attr("class") == "rgAltRow" || $(children[a]).attr("class") == "rgRow rgSelectedRow" || $(children[a]).attr("class") == "rgAltRow rgSelectedRow")

 

{

 

if( e.checked ) {

 

masterTable.selectItem( $(children[a])[0] );

}

 

else {

 

masterTable.deselectItem( $(children[a])[0] );

}

}

 

else if ($(children[a]).attr("class") == "rgGroupHeader")

 

{

 

break;

 

}

}

}

Martin
Telerik team
 answered on 11 Mar 2010
1 answer
150 views
I have added some custom fields and bound them to  datasources.

<AdvancedForm Modal="true" Width="400" MaximumHeight="400" /> 
 
<ResourceTypes> 
 
<telerik:ResourceType KeyField="AccountNumber" Name="AccountNumber" TextField="AccountName" ForeignKeyField="AccountNumber"   
 
DataSourceID="sdsAccounts" /> 
 
<telerik:ResourceType KeyField="ContactNumber" Name="ContactNumber" TextField="ContactName" ForeignKeyField="ContactNumber" 
 
DataSourceID="sdsContacts" /> 
 
<telerik:ResourceType KeyField="TaskType" Name="Type" TextField="TaskType" ForeignKeyField="TaskType" 
 
DataSourceID="sdsTaskTypes" /> 
 
<telerik:ResourceType KeyField="TaskAction" Name="Action" TextField="TaskAction" ForeignKeyField="TaskAction" 
 
DataSourceID="sdsTaskActions" /> 
 
<telerik:ResourceType KeyField="RepNumber" Name="For" TextField="RepName" ForeignKeyField="For" 
 
DataSourceID="sdsReps" /> 
 
<telerik:ResourceType KeyField="RepNumber" Name="By" TextField="RepName" ForeignKeyField="By" 
 
DataSourceID="sdsReps" /> 
 
<telerik:ResourceType KeyField="PriorityText" Name="Priority" TextField="PriorityText" ForeignKeyField="PriorityText" 
 
DataSourceID="sdsPriority" /> 
 
</ResourceTypes>   
 

This is working but when the form loads each datasource has a blank value by default.  This blank value will mess up my SQL.
They are integer fields ich would need a value of   zero

I just want to get rid of the blank so only items in the datasource can be selected.

So i added:

    Protected Sub RadScheduler1_FormCreated(ByVal sender As Object, ByVal e As SchedulerFormCreatedEventArgs)  
 
 
        If e.Container.Mode = SchedulerFormMode.AdvancedEdit Then  
            Dim ddlContactNumber As RadComboBox = DirectCast(e.Container.FindControl("ContactNumber"), RadComboBox)  
            ddlContactNumber.Items.Remove(0)  
 
 
            Dim ddlAccountnumber As RadComboBox = DirectCast(e.Container.FindControl("Accountnumber"), RadComboBox)  
            ddlAccountnumber.Items.Remove(0)  
 
 
        End If  
    End Sub 

This tells me that it can not find the control by those names.  Am i referencing the names wrong ?


I can cause problems on your sample page as well.
http://demos.telerik.com/aspnet-ajax/scheduler/examples/outlook2007/defaultcs.aspx
If I edit one of the items and choose "" blank for the Calendar - that item goes into oblivion.





robertw102
Top achievements
Rank 1
 answered on 11 Mar 2010
2 answers
141 views
hi all:
  I tried to add RadCalendar and RadCombox to my application . I got the error "Error creating control". I tried to unistall telerik control then re install. I still got the same error. I added the Telerik.web.ui control under the Global assemble but I still get the same error

Did I miss any thing on my PC when I download Telerik control? Please see attached screen shot


Thanks
Helena
HL
Top achievements
Rank 1
 answered on 11 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?