Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
122 views
Hey all.
As you may have inferred from the title, I'm having some problems showing and hiding the grid.

I have three grids each tied to its own tab page. They are not contained in any tab page but are visible based on which tab is active.

The tabs are at the top of the page.
Below the tab control I have a table. The table has three rows; two have a grid and the third row has some other UI controls.

When my page loads, tab 1 is active and so I hide table rows 2 and 3 (to avoid some UI quirks in the markup I set the display style of rows 2 and 3 to none).

As I tab through, I show and hide these table rows accordingly.
So after the page loads, I tab to the second tab, I hide rows 1 and 3 and toggle the visibility on row 2 at which point grid 2 is visible but the sizing is all messed up. Everything is squished up at the top of the grid div; the size of the master table view is very small. If I tab to another tab and tab back it corrects itself in IE but not Firefox.
If I open the dev toolbar in IE or Firebug in FF, it corrects itself.

I'm wondering if I can force it to correct itself.


Is there anything I can do?

towpse
Top achievements
Rank 2
 answered on 09 Feb 2009
1 answer
215 views
I have slider with AutoPostBack property set to "true". How can I block auto postback when changing value of a slider with the client side API? E. g. I don't need postback to fire when running this code:
$find('slider_name').set_value(0);
At the same time I need postback to fire when I change value of a slider by Drag Handle.
Tsvetie
Telerik team
 answered on 09 Feb 2009
1 answer
153 views
Hi
       Am using Dataset to bind data to the Scheduler. In the dataset i fetch
       Id, Subject, StartTime, EndTime, RecurrenceRule , RecurrenceParentId and Annotations. In the above fields I Set Null values to
       RecurrenceRule,RecurrenceParentId and Annotations. because i don't know how to set the values for the fields. Now My Questions
      are
1) What is Recurrence Rule? How to set values for the Recurrence Rule? Give Sample values.
2) How to Set All Day Events? Should i add a New Column for All Day events while fetching. and alose what is the key field for all day events in Scheduler.
3) We have a table to Set recurrence  for an appointments. can i implement Scheduler's Recurrence data with my table.

Regards,
Sathak Musthafa
Peter
Telerik team
 answered on 09 Feb 2009
5 answers
252 views
I'm using AJAX call to dynamically add rows to my RadGrid on the Client-Side.  The data is initially loaded on the Server Side.

If there were X rows when the grid was initialized, adding the (X+1)th row, the GridButtonColumns are not rendered.

What the grid looks like before the Add

What the grid looks like Afterward

After the AJAX call adds the record to the appropriate SQL Table, I use a WebMethod in the page's Code Behind to retrieve all the data that should be in the grid.

I then bind that result to the grid (AGPermissions is the ID of the RadGrid):
        function updateGrid(result) 
        { 
            var masterTableView = GetMasterTableView("<%=AGPermissions.ClientID %>"); 
            if (result) 
            { 
                masterTableView.set_dataSource(result); 
                masterTableView.dataBind();   
                                                
                ToggleDivVisibility('ShowGridClient',true); 
               var grid = $find("<%= AGPermissions.ClientID %>"); 
               grid.repaint(); 
 

While tracing through the code, the correct data is stored within "result".

Here's the RadGrid definition:

    <telerik:RadGrid ID="AGPermissions" EnableViewState="false" runat="server" 
        AllowPaging="false" AllowSorting="false" AllowFilteringByColumn="false" GridLines="None" 
        EnableEmbeddedSkins="false" Skin="IMCGridStyle" ImagesPath="Grid"  
        OnNeedDataSource="AGPermissions_NeedDataSource"
        <ItemStyle Wrap="false" /> 
        <MasterTableView  
            AllowMultiColumnSorting="true"  
            TableLayout="Auto"  
            EnableNoRecordsTemplate="false"  
            ClientDataKeyNames="AssetGroupID,AssetGroupPermissionType" 
            AutoGenerateColumns="false" 
            ShowHeadersWhenNoRecords="false"
            <Columns> 
                    <telerik:GridBoundColumn DataField="AssetGroupID" Display="false" HeaderText="Asset Group ID" /> 
                    <telerik:GridBoundColumn DataField="AssetGroupName" HeaderText="Asset Group" /> 
                    <telerik:GridBoundColumn DataField="AssetGroupPermissionType" Display="false" HeaderText="Asset Group Permission Type" /> 
                    <telerik:GridBoundColumn DataField="AssetGroupPermissionTypeText" HeaderText="Permission Type" /> 
                    <telerik:GridButtonColumn  UniqueName="1MakeGroupMaster"  Visible="true" ButtonType="ImageButton" ImageUrl="Grid/btnMakeGM.jpg" CommandName="1MakeGroupMaster" Text="Make Group Master"></telerik:GridButtonColumn>   
                    <telerik:GridButtonColumn  UniqueName="2MakeGroupReader" ButtonType="ImageButton" ImageUrl="Grid/btnMakeGR.jpg" CommandName="2MakeGroupReader" Text="Make Group Reader"></telerik:GridButtonColumn>   
                    <telerik:GridButtonColumn  ConfirmText="Remove access to this Asset Group?" ButtonType="ImageButton" ImageUrl="Grid/btnRemove.jpg" CommandName="RemoveAccess" Text="Remove Access"></telerik:GridButtonColumn>   
            </Columns> 
            <NoRecordsTemplate> 
                <div>There are no records to display.</div> 
            </NoRecordsTemplate> 
        </MasterTableView> 
         
        <ClientSettings> 
            <ClientEvents  
                OnCommand="RadGridCommand"  
                 
                OnDataBound="TestThis"/> 
        </ClientSettings>         
        <PagerStyle AlwaysVisible="true" /> 
                                 
    </telerik:RadGrid> 
 
 

If I do a refresh of the page, the Server Side methods load and display the grid properly.  Any help on why this is happening would be appreciated.

I'm using the Q3 2008 version.

Thanks.


Nikolay Rusev
Telerik team
 answered on 09 Feb 2009
1 answer
53 views

Hello.

We are developing business rule engine. Users can create database structure, objects, web forms and so on. Now, we would like to provide the users with the ability to set up Telerik ASP.NET Ajax controls using xml set up files.
 
These files have the same structure like html code snippets used in VS.NET Designer for every type of your control.

The main reasons for that is:

1) we can easily create xml schema for "supported subset of features"
2) there are too many features to create special form for every property of the control
...

The question is How to interpret there xml files to set up controls.

1) With help of reflection. => We need to cast strings in xml attributes to proper types.
2) Use already existing functionality in VS.NET designer to read aspx files and set up controls on the fly.

What do you think about that? I know nothing about the second option. Can you help me, please?

Thank you very much.

Tom

Atanas Korchev
Telerik team
 answered on 09 Feb 2009
9 answers
372 views
Hi,

I have a simple question. If I add a child element <AdvancedEditTemplate> to my radScheduler I have to specify all of the components; I can't just add one asp:label for example. All the other elements vanish.

I need just to validate the advanced edit form, by the way, is there any other method to do this? MsgBox which is called inside the RadScheduler1_AppointmentUpdate event also doesn't work.

Maybe I overlooked the solution on other threads, because it seems a very common problem.

Anyway,
thanks in advance for your reply.

LP, Luka
Peter
Telerik team
 answered on 09 Feb 2009
3 answers
158 views
In order to optimize sharepoint public facing web sites, could htmleditor.js be loaded conditionally?  It was noticed the file size of HtmlEditor.js is about 283 KB which seems like a lot to load especially those with slower connections.  Would loading this conditionally be possible?  If so, how do we know about setting this up?

Thanks,
Chris
Stanimir
Telerik team
 answered on 09 Feb 2009
1 answer
81 views
can we set the width of the radscheduler columns in percentage?
Peter
Telerik team
 answered on 09 Feb 2009
1 answer
56 views
The styles for the ajax toolkit validatorcalloutextender get lost when using them on the radgrid.
How can I remedy this?\

Screenshot example
http://tinyurl.com/d8zjh9
Rosen
Telerik team
 answered on 09 Feb 2009
1 answer
91 views

Below are the java scrip and code behind.

SInce we have a lot of data for the drop down box, we are not loading the drop down on the page load.
User will start typing the value and then we will return data to the control.

If i typed 56 in the drop down, no data is populating, if i backspace 6, then i do get data that starts with 56
If i type 5 nothing happend, if i typed 5 and backspaced then it is loading data

Can you please help?


function

OnVendorNameKeyPress(sender, eventArgs)

 

{

 

 

var a = eventArgs.get_domEvent().keyCode;  

 

// 8 - Backspace  

 

 

// 127 - Delete

 

if (a >= 32 && a <= 126 || a == 8 || a == 127)

 

 {

 

var b = sender.get_text() ? sender.get_text() : '';

 

 

 

if (a >= 32 && a <= 126)

 

 

 {

b += String.fromCharCode(a);

}

 

if (b && b != $$$._vendorNamePart)

 

 

 {

$$$._vendorNamePart = b;

$$$._departmentReq =

 

false;

 sender.requestItems(

 

'txt:' + b, false);  

 

}

}

 

 

Protected

Sub ctlRComboBoxVendorID_ItemsRequested(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles ctlRComboBoxVendorID.ItemsRequested  

 

If New DB_BLL.Cache().IsMaintain Then  

 

e.Message =

""   

 

Try

 

Dim comBox As RadComboBox = sender

 

 

 

If Not (comBox Is Nothing) Then

 

 

 

If Not (e.Text Is Nothing) And (e.Text.StartsWith("txt:") Or e.Text.StartsWith("id:")) Then

 

 

 

If e.Text.StartsWith("txt:") And e.Text.Length > 4 Then

 

 

 

 

 

Dim txt As String = e.Text.Substring(4)

 

Me.ctlRComboBoxVendorID.Items.Clear()

 

 

 

Dim vendorList As List(Of TMS402VH_VENDOR) = DB_VENDOR.GetAllVendorsByVendorNumber(txt)

 

 

 

If Not (vendorList Is Nothing) And vendorList.Count <> 0 Then

 

 

 

For Each info As TMS402VH_VENDOR In vendorList

 

 

 

Me.ctlRComboBoxVendorID.Items.Add(New RadComboBoxItem(info.VENDOR_ID.ToString() & " - " & info.VENDOR_NME.Trim(), info.VENDOR_ID))

 

 

 

Next

 

 

 

End If

 

 

 

ElseIf e.Text.StartsWith("id:") And e.Text.Length > 3 Then

 

 

 

Dim departmentId As Integer = 0

 

 

  

Try

 

 

 

departmentId = Convert.ToInt32(e.Text.Substring(3))

 

 

Catch ex As Exception

 

 

 departmentId = 0

 

End Try

 

 

 

Me.ctlRComboBoxVendorID.Items.Clear()

 

 

 

Dim vendorList As List(Of TMS402VH_VENDOR) = DB_VENDOR.GetAllVendorsByDepartment(departmentId, String.Empty, False)

 

 

 

If Not (vendorList Is Nothing) And vendorList.Count <> 0 Then

 

 

 

For Each info As TMS402VH_VENDOR In vendorList

 

 

 

Me.ctlRComboBoxVendorID.Items.Add(New RadComboBoxItem(info.VENDOR_ID.ToString() & " - " & info.VENDOR_NME.Trim(), info.VENDOR_ID))

 

 

 

 

 

Next

 

End If

 

 

 

End If

 

 

 

End If

 

 

 

End If

 

 

 

Catch ex As Exception

 

 

e.Message = ex.Message

 

End Try

 

 

 

End If

 

 

 

End Sub

 

 

 

 

 

Yana
Telerik team
 answered on 09 Feb 2009
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?