Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
138 views
So far the entire controll set has been functioning like a dream.
However, when nearing the end of the PoC we tested with larger appointments spanning a lot more cells and got a rather annoying result.
** Tested in both Firefox and IE
 
http://greynet.nl/images/telerik/annoying.png

The online demo http://demos.telerik.com/aspnet-ajax/scheduler/examples/timelineview/defaultcs.aspx also displays the same odd behavior when 7 slots are selected, and the appointment is dragged over all 7 sets.

http://greynet.nl/images/telerik/alsoindemo.png

Pretty sure on what causes it to.
When using the property "width" in percentage mode, it only uses the actual cell width, it does not take into account the width of the border line.
A simple explanation would be, say you have a grid of 50 columns, each column beeing 10px long devided by a default (1px) solid border. Now to span all those 50 columns, the scheduler simply says "width: 5000%".
So it draws a appointment of 50*34px = 1700px.
I trust you see the issue, the border is not taken into the calculation here, thus the appointment is 50px short.
The problem becomes more prominent with larger border values.
Here is a screenshot of the same screen with the border-style disabled through CSS.

http://greynet.nl/images/telerik/borders-disabled.png

Any thoughts on how to effectivly solve this without having to to recalculate the effective width's of each appointment?

Made myself a quick patch (Though this really is not the way Id like to resolve it)
function fixAppointmentWidth() { 
    // retrieve all the divs in the page (A lot) 
    var divs = document.getElementsByTagName("div"); 
     
    // loop the divs 
    for (i in divs) { 
        // retrieve the divs class name 
        divclass = divs[i].className; 
        // check if the classname matches an appointment class (For some reason IE needs a space behind the class name, no clue as to why) 
        if((divclass == "rsApt ") || (divclass == "rsApt")) { 
            // get the current cell width (Which is going to be a percentage) 
            var cellwidth   = divs[i].style.width; 
            // strip the % and devide the remainder by 100 to fetch the ammount of cells the appointment is supposed to span 
            var cells       =   (cellwidth.substr(0,(cellwidth.length -1 )) / 100); 
            // fetch the current (real) pixel value clientwidth 
            var clientwidth = divs[i].clientWidth; 
 
            // Reset the width to clientWidth + cellcount. (This offcourse assumes the border is 1px as it generally is) 
            divs[i].style.width = (clientwidth + cells) + "px"; 
        } 
    } 
} 
Adding this to the page bottom as well as registering it as the "ClientEvents-OnResponseEnd" of the ajaxmanager auto fixes the issue.
still, not the way i like to resolve it :)
Arpad
Top achievements
Rank 1
 answered on 08 Jun 2009
3 answers
117 views
I am trying to get the Full Featured RadEditor for SharePoint to allow special tags and scripts.  I have a simple onclick statement to add to a DIV tag <div onclick="">.  The editor continues to strip this out.  I have read the documentation and have added the AllowScripts = true to the Config.XML file and also added the property AllowSpecialTags = true to the Page Layout that contains the RadEditor.  Am I missing something?

Stanimir
Telerik team
 answered on 08 Jun 2009
6 answers
134 views

Hi,

I am facing a big problem related to rad menus.

It gets hides behind Flash animation in Mozilla. Please refer this link for more information.

http://em.fusionoutsourcing.com/user/governance/index.aspx

If you open that link in IE it will work fine

Any help will be appreciated.

Thanks,

Narender singh

Paul
Telerik team
 answered on 08 Jun 2009
1 answer
175 views
When I have a RadGrid with a width of 100% but only very little text displayed in the columns, then there is a lot of whitespace between columns.

Is it possible to somehow tweak the grid to display columns only as wide as necessary (to display their content) and to have some sort of "filler-column" which takes up the remaining horizontal space (the grid should still be 100% wide).

Thanks for your help.
Shinu
Top achievements
Rank 2
 answered on 08 Jun 2009
1 answer
136 views
Hi all,

Bit baffled here,..new one on me.
My Detail Grid Inserts fine,
If I go into edit mode,  I can edit the record, and "Accept" it,  ...fine...but, ...on "Cancel" to get outta edit mode,...I get this,...(and no Postback that i can see (well not at PageLoad event anyway.))

Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

I have tried trimming most code behind out to see if that was causing it,...Problem persists.
(The code behind just shows selected vals from/in a dropdown, in Ins and Edit mode otherwise that selected val in a label of that col.

And, ...I do not add any controls dynamically, nor move them about...
Thanks Neal


Markup is as follows:

 

<telerik:RadGrid ID="GrvTask" runat="server"

 

 

AutoGenerateColumns="False"

 

 

AllowAutomaticUpdates="False"

 

 

AllowAutomaticDeletes="False"

 

 

AllowAutomaticInserts="False"

 

 

AllowSorting="True"

 

 

ShowStatusBar="True"

 

 

CssClass="GridVClass"

 

 

Width="100%"

 

 

Height="100%" CellPadding="4"

 

 

GridLines="None" AllowPaging="True"

 

 

Visible="true"

 

 

OnInsertCommand="GrvTask_InsertCommand"

 

 

OnNeedDataSource="GrvTask_NeedDataSource"

 

 

OnUpdateCommand="GrvTask_UpdateCommand"

 

 

OnDeleteCommand="GrvTask_DeleteCommand"

 

 

OnSelectedIndexChanged="GrvTask_SelectedIndexChanged"

 

 

OnItemCommand="GrvTask_ItemCommand"

 

 

EnableTheming="False"

 

 

OnItemDataBound="GrvTask_ItemDataBound"

 

 

OnDetailTableDataBind="GrvTask_DetailTableDataBind"

 

 

PageSize="20">

 

 

 

<MasterTableView

 

 

CommandItemDisplay="Top"

 

 

DataKeyNames=" TaskId"

 

 

EditMode="InPlace">

 

 

<DetailTables>

 

 

<telerik:GridTableView

 

 

Name="TaskItems"

 

 

BorderColor="Gray"

 

 

BorderStyle="solid"

 

 

BorderWidth="1px"

 

 

BackColor="LemonChiffon"

 

 

HeaderStyle-BackColor="LemonChiffon"

 

 

ItemStyle-BackColor="White"

 

 

AlternatingItemStyle-BackColor="GhostWhite"

 

 

CommandItemDisplay="Top"

 

 

CommandItemStyle-BackColor="LemonChiffon"

 

 

CommandItemStyle-BorderColor="Gray"

 

 

CommandItemStyle-BorderStyle="solid"

 

 

CommandItemStyle-BorderWidth="1px"

 

 

AllowPaging="true"

 

 

PageSize="6"

 

 

EditMode="inPlace"

 

 

Width="100%" runat="server"

 

 

DataKeyNames="Id">

 

 

<Columns>

 

 

 

<telerik:GridEditCommandColumn ButtonType="ImageButton"

 

 

UpdateImageUrl="../../App_Themes/Images/Update.gif"

 

 

EditImageUrl="../../App_Themes/Images/EditIcn.gif"

 

 

InsertImageUrl="../../App_Themes/Images/Insert.gif"

 

 

HeaderText="Edit"

 

 

CancelImageUrl="../../App_Themes/Images/Cancel.gif">

 

 

<ItemStyle Width="25px" HorizontalAlign="Left" />

 

 

<HeaderStyle Width="25px" HorizontalAlign="Left" />

 

 

</telerik:GridEditCommandColumn>

 

 

 

<telerik:GridBoundColumn DataField="Name"

 

 

HeaderText="Task Name" UniqueName="Name">

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

<HeaderStyle HorizontalAlign="Left" Wrap="False" />

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="SeqNo"

 

 

HeaderText="SeqNo" UniqueName="SeqNo">

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

<HeaderStyle HorizontalAlign="Left" Wrap="False" />

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="AmtNote"

 

 

HeaderText="Amt." UniqueName="AmtNote">

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

<HeaderStyle HorizontalAlign="Left" Wrap="False" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="OfNote"

 

 

HeaderText="Amt. Of" UniqueName="OfNote">

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

<HeaderStyle HorizontalAlign="Left" Wrap="False" />

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridTemplateColumn UniqueName="TemplateColumn"

 

 

HeaderText="Priority" >

 

 

<ItemTemplate>

 

 

<asp:Label id="lblPriority" runat="server">

 

<%

# TaskItemId %>

 

 

</asp:Label>

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<asp:DropDownList ID="ddlPriority" runat="server"

 

 

AutoPostBack="true"

 

 

OnSelectedIndexChanged="ddlPriority_SelectedIndexChanged"

 

 

OnDataBinding = "ddlPriority_DataBindingR"

 

 

Width="100%"

 

 

style="z-index:1000"

 

 

/>

 

 

</EditItemTemplate>

 

 

<HeaderStyle Width="90px" HorizontalAlign="Left"/>

 

 

<ItemStyle Width ="90px" HorizontalAlign="Left" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridButtonColumn

 

 

HeaderText="View Notes"

 

 

UniqueName ="ShowNotes"

 

 

ButtonType="ImageButton"

 

 

ImageUrl="../../Images/ViewNotes.gif"

 

 

CommandName="TaskItemNotes"

 

 

AutoPostBackOnFilter ="True">

 

 

<ItemStyle Width ="40px" HorizontalAlign="Left" />

 

 

<HeaderStyle Width ="40px" HorizontalAlign="Left" />

 

 

</telerik:GridButtonColumn>

 

 

 

<telerik:GridTemplateColumn

 

 

HeaderText="View Contacts"

 

 

UniqueName ="Contacts"

 

 

DataField="Select" AutoPostBackOnFilter ="True">

 

 

<ItemTemplate >

 

 

<img src="../../App_Themes/Images/Docs/document_info_64.png"

 

 

onclick="OpenAllocatedContacts('<%# DataBinder.Eval(Container.DataItem, "Id") %>');

 

return false;"

 

/>

 

 

</ItemTemplate>

 

 

<ItemStyle Width ="40px" HorizontalAlign="Left" />

 

 

<HeaderStyle Width ="40px" HorizontalAlign="Left" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridButtonColumn ConfirmText="Are you sure you want to deallocate this taskItem?"

 

 

ButtonType="ImageButton"

 

 

ImageUrl="../../App_Themes/Images/Delete.gif"

 

 

CommandName="Delete" Text="Delete"

 

 

UniqueName="DeleteColumn" HeaderText="Delete">

 

 

<HeaderStyle Width="20px" HorizontalAlign="Left" />

 

 

<ItemStyle HorizontalAlign="Left" Width="20px"/>

 

 

</telerik:GridButtonColumn>

 

 

 

</Columns>

 

 

 

</telerik:GridTableView>

 

 

</DetailTables>

 

 

 

<Columns>

 

 

<telerik:GridEditCommandColumn ButtonType="ImageButton"

 

 

UpdateImageUrl="../../App_Themes/Images/Update.gif"

 

 

EditImageUrl="../../App_Themes/Images/EditIcn.gif"

 

 

InsertImageUrl="../../App_Themes/Images/Insert.gif"

 

 

HeaderText="Edit"

 

 

CancelImageUrl="../../App_Themes/Images/Cancel.gif">

 

 

<ItemStyle Width="25px" HorizontalAlign="Left" />

 

 

<HeaderStyle Width="25px" HorizontalAlign="Left" />

 

 

</telerik:GridEditCommandColumn>

 

 

 

<telerik:GridBoundColumn DataField="Name"

 

 

HeaderText="Task Name" UniqueName="Name">

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

<HeaderStyle HorizontalAlign="Left" Wrap="False" />

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="SeqNo"

 

 

HeaderText="SeqNo" UniqueName="SeqNo">

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

<HeaderStyle HorizontalAlign="Left" Wrap="False" />

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridTemplateColumn UniqueName="TemplateColumn"

 

 

HeaderText="Priority" >

 

 

<ItemTemplate>

 

 

<asp:Label id="lblPriority" runat="server">

 

<%

# SPlanId %>

 

 

</asp:Label>

 

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<asp:DropDownList ID="ddlPriority" runat="server"

 

 

AutoPostBack="true"

 

 

OnSelectedIndexChanged="ddlPriority_SelectedIndexChanged"

 

 

OnDataBinding = "ddlPriority_DataBindingR"

 

 

Width="100%"

 

 

style="z-index:1000"

 

 

/>

 

 

</EditItemTemplate>

 

 

<HeaderStyle Width="90px" HorizontalAlign="Left"/>

 

 

<ItemStyle Width ="90px" HorizontalAlign="Left" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridButtonColumn

 

 

HeaderText="View Notes"

 

 

UniqueName ="ShowNotes"

 

 

ButtonType="ImageButton"

 

 

ImageUrl="../../Images/ViewNotes.gif"

 

 

CommandName="vNotes"

 

 

AutoPostBackOnFilter ="True">

 

 

<ItemStyle Width ="40px" HorizontalAlign="Left" />

 

 

<HeaderStyle Width ="40px" HorizontalAlign="Left" />

 

 

</telerik:GridButtonColumn>

 

 

 

<telerik:GridButtonColumn ConfirmText="Are you sure you want to deallocate this task?"

 

 

ButtonType="ImageButton"

 

 

ImageUrl="../../App_Themes/Images/Delete.gif"

 

 

CommandName="Delete" Text="Delete"

 

 

UniqueName="DeleteColumn" HeaderText="Delete">

 

 

<HeaderStyle Width="20px" HorizontalAlign="Left" />

 

 

<ItemStyle HorizontalAlign="Left" Width="20px"/>

 

 

</telerik:GridButtonColumn>

 

 

 

</Columns>

 

 

 

<CommandItemTemplate>

 

 

<table width="100%" style="border-right: #003333 thin solid; border-top: #003333 thin solid;

 

padding-bottom: 2px; margin: 1px; border-left: #003333 thin solid; padding-top: 2px;

border-bottom: #003333 thin solid"

 

bordercolor="#336666">

 

 

<tr>

 

 

<td align="left" style="width: 50%">

 

 

<asp:LinkButton ID="LinkButton2"

 

 

runat="server"

 

 

OnClientClick="OpenUnallocatedTasks();return false;">

 

 

<img style="border:0px"

 

 

alt=""

 

 

src="../../RadControls/Grid/Skins/AddRecord.gif"

 

 

/>Allocate Tasks

 

 

</asp:LinkButton>

 

 

</td>

 

 

<td align="right" style="width: 50%">

 

 

<asp:LinkButton ID="LinkButton4" runat="server" CommandName="Re bindGrid">

 

 

<img style="border:0px" alt="" src="../../RadControls/Grid/Skins/Refresh.gif" />

 

Refresh

</asp:LinkButton>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</CommandItemTemplate>

 

 

</MasterTableView>

 

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 

 

 

<ActiveItemStyle BackColor="Bisque" />

 

 

<SelectedItemStyle BackColor="Coral" />

 

 

<EditItemStyle BackColor="Bisque" CssClass="SelectedItem" />

 

 

 

</telerik:RadGrid>

 

Yavor
Telerik team
 answered on 08 Jun 2009
6 answers
433 views
I have a tree that I build with Load on Demand
(.ExpandMode = TreeNodeExpandMode.ServerSideCallBack)

The tree gets large, and after clicking and expanding, the ajax post and response sizes get huge fast, (for example, one time I saw 1MB up and down).  This is too much data, and ajax timeouts start to pop up because of the delays.

So I turned off the tree ViewState.  When I do that, only the first nodeclick or expand works, any nodeclicks or expands after the first get a client side error:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Specified argument was out of the range of valid values.
Parameter name: Cannot find item with hierarchical index 0:0

Am I doing something wrong, or does ServerSideCallBack require ViewState?

P.S.  -- I recently converted the tree from the classic tree, and I dont remember this hugh ajax post size problem with the old version.
wajahat
Top achievements
Rank 1
 answered on 08 Jun 2009
3 answers
186 views
Does RadChart handle infinity number?  Let's say: I have a set of number like: (1,1), (30,5), (60, infinity), (90, 50), will the chart be displayed correctly or throw an error?

Ves
Telerik team
 answered on 08 Jun 2009
1 answer
88 views
Hello all,

We are starting to use this cool editor control,

But we would like to make some changes on tool bar style for instance remove its border.
How can we do it ?

We are using a file to manage the controls.
"<root>

 

 <

 

tools name="MainToolBar" enabled="true" DockingZone="Top" border-left="none">

 

 

 <

 

tool name="Undo"></tool>

 

<

 

tool name="Redo"></tool>"

but border-left no works :(

 

 

 

 

 

 

 

 

 

 

Martin
Telerik team
 answered on 08 Jun 2009
3 answers
131 views
hello all i have a very easy problem that is not supposed to happen i have a rad grid with all of its columns of type checkbox column when i press edit and change the checked columns and press update nothing is saved..and it all returns to its original condition i have the datakey names stored correctly and the  updatecommand is automaticaly generated by the sqldatasource yet it is not working? what am i doing possible wrong
Shinu
Top achievements
Rank 2
 answered on 08 Jun 2009
2 answers
91 views
I have installed the radcontrols 2009 Q1 but when i open the demo on my computer i get the following error:

Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances.

Can anyone help me with this?
Rik
Top achievements
Rank 1
 answered on 08 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?