Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
450 views
im wanting to open a radwindow from a hyperlink in a grid. the window provides a way to update the row item, so populates a form within a window with the existing field values.

previously it was being done on rowclick so just worked with loading the fields from the GridDataItem and opening the window via

Me.pBlocks.VisibleOnPageLoad = True


this now needs to be done via a hyperlink on one of the columns.

the hyperlink column is added in the code behind

hlc =

 

New GridHyperLinkColumn

 

Me.uxBlocks.Columns.Add(hlc)

hlc.HeaderText = GetCaption(p.Name)

hlc.UniqueName = p.Name

hlc.DataTextField = p.Name

hlc.DataNavigateUrlFields = {p.Name}

hlc.DataNavigateUrlFormatString =

 

"linktowindow?q={0}"

hlc.Display = True

 

hlc.HeaderStyle.Width =

 

 

Unit.Pixel(170)

hlc.ItemStyle.Wrap =

 

True


could i still call the existing method by getting the GridDataItem when the link is clicked?

Mark
Top achievements
Rank 1
 answered on 02 Aug 2012
7 answers
375 views
I can't seem to figure out how to get the selected value or text from a RadComboBox in a GridTemplateColumn. Actually seems like I can't find the control at all.  The edit Form is a popup. The grid is in a user control. 

Here is my column 
<telerik:GridTemplateColumn UniqueName="ProdWorkstation" HeaderText="ProdWorkstation">
    <ItemTemplate>
    <%#DataBinder.Eval(Container.DataItem, "ProdWorkstation")%>
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadComboBox runat="server" ID="RadComboBox_SelectWorkStation" Height="300px" Width="750px" DataSourceID="LCM_UserWorkstationList" EnableLoadOnDemand="true"
        ItemsPerRequest="20" EnableAutomaticLoadOnDemand="False" DataTextField="Workstation" DataValueField="Workstation"
        style="margin-bottom: 0px" AutoPostBack="True" HighlightTemplatedItems="true" CausesValidation="False" Skin="Office2007"
         OnItemsRequested="RadComboBox1_ItemsRequested">
 
            <HeaderTemplate>
                <ul>
                    <li class="col75">user_id</li>
                    <li class="col200">Workstation</li>
                    <li class="col200">Name</li>
                    <li class="col200">Profile</li>
                </ul>
            </HeaderTemplate>
            <ItemTemplate>
                <ul>
                    <li class="col75"><%# DataBinder.Eval(Container.DataItem, "user_id")%></li>
                    <li class="col200"><%# DataBinder.Eval(Container.DataItem, "Workstation")%></li>
                    <li class="col200"><%# DataBinder.Eval(Container.DataItem, "Name") %></li>
                    <li class="col200"><%# DataBinder.Eval(Container.DataItem, "Profile")%></li>
                </ul>
            </ItemTemplate>
        </telerik:RadComboBox>
    </EditItemTemplate>
</telerik:GridTemplateColumn>

Here is the codebehind where I try and get the text:
if (e.CommandName == "PerformInsert")
            {
                GridEditFormInsertItem EditForm = (GridEditFormInsertItem)e.Item;
                RadComboBox combo = EditForm["ProdWorkstation"].Controls[0] as RadComboBox;
                string ProdWorkstation = combo.Text; //NULL value

How can I do this?

Thanks!
Jayesh Goyani
Top achievements
Rank 2
 answered on 02 Aug 2012
8 answers
556 views
Hello Telerik Team,

I need to achieve a functionality to refresh the scheduler on a button click event.
The button should exist as a link button on the scheduler.I am using sharepoint list as the datasource
Could you provide some pointers on this.

Thank you
Smith

 

Peter
Telerik team
 answered on 02 Aug 2012
1 answer
420 views
I am getting the following error while trying to build my application.

" The type or namespace name 'Script' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)    in   Telerik.Web.UI"

How to solve this error, please help.

Andrey
Telerik team
 answered on 02 Aug 2012
17 answers
231 views

Hello,

I would like to allow the users to select the number of minutes per row of the Scheduler themselves.

I'm trying to reproduce a small part of the Scheduler customization demo page available there:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/customization/defaultcs.aspx

In my very simple example, I only have a drop down list to select the number of minutes and a Scheduler component with no datasource.


Page:
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> 
          
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="Panel1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" /> 
          
        <asp:Panel runat="Server" ID="Panel1">  
                Minutes per row:   
                <asp:DropDownList runat="server" ID="MinutesPerRow" AutoPostBack="true">  
                    <asp:ListItem Value="60" Text="60"></asp:ListItem> 
                    <asp:ListItem Value="30" Text="30" Selected="true"></asp:ListItem> 
                    <asp:ListItem Value="15" Text="15"></asp:ListItem> 
                    <asp:ListItem Value="10" Text="10"></asp:ListItem> 
                </asp:DropDownList> 
                         
            <telerik:RadScheduler runat="server" ID="RadScheduler1"   
                 ShowFullTime="true" OverflowBehavior="Expand" 
                 DataKeyField="ID" DataStartField="Start" DataEndField="End" DataSubjectField="Subject" >                 
            </telerik:RadScheduler> 

Code behind:
    protected override void OnPreRender(EventArgs e)  
    {  
        base.OnPreRender(e);  
 
        RadScheduler1.MinutesPerRow = int.Parse(MinutesPerRow.SelectedValue);  
    } 

This example completely failed.
When I select a value in the drop down list the Panel is refreshing but the Scheduler is still displaying the previous selected value.
I have to do a second post back to obtain the correct layout.

Did I forget something?

Thank you for you help.


Peter
Telerik team
 answered on 02 Aug 2012
1 answer
99 views
Hi all,

Do you have ideas, how to align  text in legend, when you have text format like {text} {value}(you can find details 
in attached image)?

This is simple code, how I create and fill values 
foreach(PieChartItem item in PieChartItemCollection)
            {
                ChartSeriesItem chartItem = item.ChartItem;
                chartItem.Label.TextBlock.Text = String.Format
                            (
                                "{0} {1}"
                                , str1
                                , str2
                            );
            }

Please advice.

Thanks,
Pavlo
 
Rosko
Telerik team
 answered on 02 Aug 2012
4 answers
131 views
As i click on the Insert new Row,  the Grid goes into databinding and i just want to disable the databinding to the Edit Template during insert new row, how is it possible ?

Secondly how is it possible that during edit mode it is able to recognize a dataitem to which the textbox is binded to and during add new row command it displays the error  â€˜Telerik.WebControls.GridInsertionObject does not contain a property’ ??

Maria Ilieva
Telerik team
 answered on 02 Aug 2012
3 answers
36 views
Hi,

I am just trying RadSpell for the first time.  So far, I am rather un-impressed by the suggestions that the spellchecker makes.

A basic example is 'teh'.  Everyone knows that this is a typo for 'the'.  Every spellchecker in the land will suggest 'the' as the best replacement.  With RadSpell, 'the' comes up at around TENTH in the list.  The top suggestion is 'tea'.

This is not going to cut it for our end-users.  Is there a way to improve the suggestion tool so that it is more like other spell-checkers?  Or can the tool at least learn from what words have been changed to by other users?

Thanks,

Craig
Craig Wallace
Top achievements
Rank 1
 answered on 02 Aug 2012
7 answers
450 views
I'm using the example provided in Filtering Template Columns to use a RadComboBox as a filter instead of the standard TextBox. I have followed the example and it is working as expected. Now I need to know how to pass a value to the RadComboBox so I can dynamically change its DataSource. The DataSource for the RadComboBox should change depending on the value of a column in the RadGrid. Can I somehow access the DataKeyNames of the parent RadGrid to get this value or is there a property of the GridTemplateColumn that I can set in my code-behind? I'm stumped.

protected override void SetupFilterControls(TableCell cell)
{
    RadComboBox rcBox = new RadComboBox();
    rcBox.ID = this.GetType().Name + "ComboBox";
    rcBox.AutoPostBack = true;
    rcBox.DataTextField = this.DataField;
    rcBox.DataValueField = this.DataField;
    rcBox.SelectedIndexChanged += rcBox_SelectedIndexChanged;
    rcBox.Items.Add(new RadComboBoxItem("Show All", ""));           
    rcBox.DataSource = DataSource; //<-------- I need to change this DataSource depending on what data is in my RadGrid.
                                    //How can I pass a value here from my aspx page
    rcBox.AppendDataBoundItems = true;
    cell.Controls.Add(rcBox);
}
Maria Ilieva
Telerik team
 answered on 02 Aug 2012
4 answers
275 views
Hello Friends
How Can i  dynamic add  item in context menu  and open Context Menu  on Grid row click by javascript .
Princy
Top achievements
Rank 2
 answered on 02 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?