Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
280 views
Dear Telerik,

I am trying to replicate the restriction zone behavior of the RadWindow (http://demos.telerik.com/ASPNET/Prometheus/Window/Examples/Default/DefaultCS.aspx) in a RadDock component. Using the Client-Side API, I can detect wether the dock is currently in it's restriction zone or not but I am unable to stop it's movement. I tried using set_pinned() on the dock to prevent it from moving whenever it got out of it's restrictive zone but it also cancels the drag. I also tried using set_top() / set_left() but it had no effect.

Is there a way to replicate such behavior with Docks?

Thank you.
Nikolay Raykov
Telerik team
 answered on 21 Jan 2009
1 answer
81 views
Hi,

I tried to find someting talking about this in the support, forums, KB but didn't find anything, so I post here.

Does RadMenu support items to wrap on multiples lines ?

My problem is that I have a menu that is 150 px large, and everytime an item got text that is larger than the menu, it doesn't wrap and instead just go over the right part of my page, and thus is larger than the menu...

I tried to fix size of differents elements like rmItem, li, ul, rmText, rmLink but can archieve to get my text go on a second line. This occurs for the root menu, I didn't try for sub-menus (because I don't need this behaviour on submenu).

Anyone, know how to fix this, or if it's possible ?

Best regards
Edgar Maucourant
STEMax
Top achievements
Rank 1
 answered on 21 Jan 2009
1 answer
262 views
Hi,

I have managed to update  the records in the database using the following codes however after the click event of the update button regardless of what it does ,simply doesn't get refresh.Radgrid gets refreshed with the updated data  if I click on end editing which is not what I want.
And whilst i try to insert records , it simply doesn't take,instead it scares me with an error message .i will very thankful to you if u can help me out.I use a liecensed version but can't open a ticket yet .

--------------Insert--------------

protected

void RadGrid1_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)

 

{

 

 

GridEditFormInsertItem insertedItem = (GridEditFormInsertItem)e.Item;

 

ErrorMsg - "Unable to cast object of type 'Telerik.Web.UI.GridCommandItem' to type 'Telerik.Web.UI.GridEditFormInsertItem'."



string
Activity = (insertedItem["Activity"].Controls[0] as TextBox).Text;

 

 

string Status = (insertedItem["Status"].Controls[0] as TextBox).Text;

 

 

string Comments = (insertedItem["Comments"].Controls[0] as TextBox).Text;

 

 

 

try

 

{

 

string Query = null;

 

 

Query =

"INSERT into SheduleActivityDetails(Activity,Status,Comments) values('" + Activity + "','" + Status + "','" + Comments + "')";

 

objDataLayer.ExecuteNonQuery(Query);

 

}

 

catch (Exception ex)

 

{

RadGrid1.Controls.Add(

new LiteralControl("Unable to insert Activity. Reason: " + ex.Message));

 

e.Canceled =

true;

 

}

 


------ data source

 

protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

 

{

 

 

string Query = "";

 

 

DataTable dt = null;

 

Query =

"select D.Id,Activity,Status,Comments from ScheduleActivitymaster M join ScheduleActivitydetails D on M.ActivityID = D.ActivityID where M.ActivityID='" + RadComboBox1.SelectedValue + "'";

 

dt = objDataLayer.GetDataTable(Query);

RadGrid1.DataSource = dt;

//Can't use Radgrid1.rebind();

 

}


------Update -----


 

protected void RadGrid1_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)

 

{

 

GridEditableItem editedItem = e.Item as GridEditableItem;

 

 

string Id = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["Id"].ToString();

 

 

string Activity = (editedItem["Activity"].Controls[0] as TextBox).Text;

 

 

string Status = (editedItem["Status"].Controls[0] as TextBox).Text;

 

 

string Comments= (editedItem["Comments"].Controls[0] as TextBox).Text;

 

 

 

try

 

{

 

string Query = null;

 

Query =

"UPDATE ScheduleActivityDetails set Activity='" + Activity + "',Status='" + Status + "',Comments='" + Comments + "' where Id='" + Id + "'";

 

objDataLayer.ExecuteNonQuery(Query);
//tried assigning -1 to radgridItemIdex but no joy

Radgrid.rebind();

 

}

 

 

catch (Exception ex)

 

{

RadGrid1.Controls.Add(

new LiteralControl("Unable to update Activity. Reason: " + ex.Message));

 

e.Canceled =

true;

 

}

}

 



------Rad grid --------

<

telerik:RadGrid ID="RadGrid1" runat="server"

 

 

Width="600px" AllowMultiRowSelection="false" AllowMultiRowEdit="false" AllowAutomaticInserts="false"

 

 

AllowAutomaticUpdates="true" AllowPaging="true" ShowStatusBar="true" AutoGenerateEditColumn="false"

 

 

EnableAJAX="true" OnNeedDataSource="RadGrid1_NeedDataSource"

 

 

OnInsertCommand="RadGrid1_InsertCommand" OnUpdateCommand="RadGrid1_UpdateCommand"

 

 

ShowFooter="True" OnItemCreated="RadGrid1_ItemCreated" Skin="Office2007">

 

 

 

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="true" EnableDragToSelectRows="true" />

 

 

</ClientSettings>

 

 

 

<MasterTableView CommandItemDisplay="Top" DataKeyNames="Id" EditMode="InPlace" AllowAutomaticInserts="False" AutoGenerateColumns="false" Width="100%">

 

 

 

<Columns>

 

 

<telerik:GridClientSelectColumn HeaderStyle-Width="40px" />

 

 

 

 

<telerik:GridBoundColumn DataField="Id" Visible="true" HeaderText="Id"

 

 

UniqueName="Id" ReadOnly="True">

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="Activity" HeaderText="Activity" SortExpression="Activity"

 

 

UniqueName="Activity">

 

 

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status"

 

 

UniqueName="Status" Visible="true" EditFormColumnIndex="1">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Comments" HeaderText="Comments" SortExpression="Comments"

 

 

UniqueName="Comments" Visible="true" EditFormColumnIndex="1">

 

 

</telerik:GridBoundColumn>

 

 

 

 

</Columns>

 

 

 

<CommandItemTemplate>

 

 

 

<div style="padding: 10px 0px;">

 

 

 

 

<asp:LinkButton Style="vertical-align: bottom" ID="btnEditSelected" runat="server"

 

 

CommandName="EditSelected" CausesValidation="false" Visible='<%# RadGrid1.EditIndexes.Count == 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="=../../Images/Edit.gif" /> Edit Selected Activity</asp:LinkButton>

 

 

 

<asp:LinkButton ID="LinkButton1" runat="server" CommandName="UpdateEdited" Visible='<%# RadGrid1.EditIndexes.Count > 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="=../../Images/Update.gif" /> Update Activity</asp:LinkButton>

 

 

&nbsp;

 

 

 

 

 

<asp:LinkButton ID="LinkButton2" runat="server" CommandName="CancelAll" CausesValidation="false"

 

 

Visible='<%# RadGrid1.EditIndexes.Count > 0 || RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="=../../Images/edit.png" /> Cancel editing</asp:LinkButton>

 

 

&nbsp;

 

 

 

 

<asp:LinkButton ID="LinkButton3" runat="server" CommandName="InitInsert" Visible='<%# !RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="=../../Images/AddRecord.gif" /> Add new Activity</asp:LinkButton>

 

 

 

<asp:LinkButton ID="LinkButton4" runat="server" CommandName="PerformInsert" Visible='<%# RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="=../../Images/Insert.gif" /> Add this Activity</asp:LinkButton>

 

 

&nbsp; &nbsp;&nbsp;&nbsp;

 

 

 

<asp:LinkButton ID="LinkButton5" runat="server" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="" src="=../../Images/Refresh.gif"/> Refresh Activities</asp:LinkButton>

 

 

</div>

 

 

 

</CommandItemTemplate>

 

 

 

 

 

 

<EditFormSettings ColumnNumber="2" CaptionFormatString="Edit properties of Activity with Id {0}"

 

 

CaptionDataField="ActivityId">

 

 

 

 

 

 

<FormTableItemStyle Wrap="False"></FormTableItemStyle>

 

 

<FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>

 

 

<FormMainTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="5" BackColor="White"

 

 

Width="100%"/>

 

 

<FormTableStyle CellSpacing="0" CellPadding="2" CssClass="module" Height="110px"

 

 

BackColor="White"/>

 

 

<FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>

 

 

<EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update record"

 

 

UniqueName="EditCommandColumn1" CancelText="Cancel edit">

 

 

</EditColumn>

 

 

<FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>

 

 

</EditFormSettings>

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

</telerik:RadGrid>

 



 
Yavor
Telerik team
 answered on 21 Jan 2009
1 answer
132 views
Hi

I have a usercontrol that allows the user to navigate through a list of images. The control has an edit link, when clicked it opens a radprompt and allows the user to edit the caption of the current image. I would like to use spell check for the textbox displayed in the radprompt window.

Also, the radprompt window uses a custom template.

My question is how can I use a spell check with radprompt input.

Rgds
Shuchi
Georgi Tunev
Telerik team
 answered on 21 Jan 2009
12 answers
317 views
Hi All,

I have a grid that is databound server-side. This is what I want to happen when a row is selected:

I have 3 radCombo boxes (supplier, transaction, description) and 2 rad textboxes (supplier ref., net) elsewhere on the page and a grid that has corresponding columns.

I want to be able to update the combo boxes and text boxes with values that are in the corresponding columns in the selected row.

I presume I need to do this client side but I'm not sure what would be the best approach.

Can anyone help,
Thanks.
Sebastian
Telerik team
 answered on 21 Jan 2009
2 answers
128 views
how do i set the style of the header separated from the cell.
like i want the header to be 150px wide and the width of the cell to be data length. thank you.
appdev
Top achievements
Rank 1
 answered on 21 Jan 2009
1 answer
269 views
I have a Radgrid "radgrid1" that pulls a list of contacts from a SQL Database. The indentity column is "contactid". I would like to have a tooltip that shows more details of the contact when the user hovers the mouse over the record in the grid. I have tried following some of the code posted but can't seem to get this to work. does anyone have a simple example in vb that shows how to do this?
Svetlina Anati
Telerik team
 answered on 21 Jan 2009
2 answers
96 views
I've noticed the menu is automatically picking up my sitemap description values and showing them as a tooltip.  How can I disable that?
Samantha
Top achievements
Rank 1
 answered on 21 Jan 2009
8 answers
130 views

Hi,

I'm struggling with the RADEditor Image and Link manager. I'm working on a personnalized internet facing SharePoint site using my own default.master page and trying to use div, span and Css instead of "Table" layout that standard SharePoint master page provides. In some of my pages I use RadEditor controls with the following ConfigFile properties :

  <property name="AllowThumbGeneration">True</property>
  <property name="ConvertToXhtml">True</property>
  <property name="EnableDocking">True</property>
  <property name="ShowHtmlMode">False</property>
  <property name="ShowPreviewMode">False</property>
  <property name="ToolbarMode">Default</property>
  <property name="ToolsWidth">550px</property>
  <property name="Skin">Telerik</property>
  <property name="EditModes">Design</property>
  <property name="ImagesPaths">
 <item>/SiteCollectionImages</item>
  </property>
  <property name="Language">fr-FR</property>

The problem is that the Image Manager and Link Manager don't display in the screen, they appear far below the page, forcing users to scroll down to see the managers. I'm using Telerik Manager instead of Microsoft ones and I guess this is a problem with how my elements are positionned but I can't find what's wrong. Does anyone know how to solve this behavior ?


Best regards
Edgar Maucourant
STEMax
Top achievements
Rank 1
 answered on 21 Jan 2009
3 answers
232 views
The RadGrid with FilterMenu the vertical Scrolling is very very slow ,
 Columns#10 Rows15, Skin Deafult advanced data binding is used
Dimo
Telerik team
 answered on 21 Jan 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?