Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
104 views
Hi,

Is it possible to put all rows in edit mode and still have alternating row colors?

thx in advance
Glenn
Princy
Top achievements
Rank 2
 answered on 21 Jul 2008
1 answer
97 views

Hi,

I have struck up with one scenario as follow.

I have taken one RadCombo Box under RadGrid’s <FormTemplate> Tag (You can see following  Code for referral).

I want to bind the Data to the RadCombo at run time. Any one can pls help me in this regards.

At least pls guide with any sample program/code with same scenario.

 

<%@ Page Language="C#" MasterPageFile="~/Matrix_MasterPage.master" AutoEventWireup="true"

    CodeFile="addsubmenus.aspx.cs" Inherits="addsubmenus" Title="Untitled Page" %>

 

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

    </telerik:RadCodeBlock>

    <table width="100%" style="height: Auto" width="80%" class="TableBackGround" cellpadding="0"

        cellspacing="0">

            <td style="height: 21px" colspan="6" class="MenuSubHeading">

                Add Submenu

            </td>

        </tr>

        <tr>

            <td style="height: 100px">

                <telerik:RadGrid ID="rgSubmenus" runat="server" AllowPaging="True" GridLines="Horizontal"

                    Skin="WebBlue" OnNeedDataSource="rgSubmenus_NeedDataSource" PageSize="10" Width="70%"

                    OnInsertCommand="rgSubmenus_InsertCommand" OnItemDataBound="rgSubmenus_ItemDataBound" OnItemCreated="rgSubmenus_ItemCreated">

                    <PagerStyle Mode="Slider" />

                    <MasterTableView CommandItemDisplay="TopAndBottom" AutoGenerateColumns="false" DataKeyNames="submenuid"

                        EditMode="EditForms">

                        <Columns>

                            <telerik:GridBoundColumn DataField="submenuid" HeaderText="SubMenu ID" HeaderStyle-HorizontalAlign="Center"

                                ItemStyle-HorizontalAlign="Left" Visible="false">

                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="mainmenuid" HeaderText="MainMenu ID" HeaderStyle-HorizontalAlign="Center"

                                ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="15%" Visible="false">

                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="mainmenuname" HeaderText="MainMenu Name" HeaderStyle-HorizontalAlign="Center"

                                ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="15%">

                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="submenuname" HeaderText="SubMenu Name" HeaderStyle-HorizontalAlign="Center"

                                ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="15%">

                            </telerik:GridBoundColumn>

….. So On.

                        </Columns>

                        <EditFormSettings EditFormType="Template">

                            <EditColumn UniqueName="EditCommandColumn1">

                            </EditColumn>

                            <FormTemplate>

                                <table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="red">

                                    <tr>

                                        <td width="49%" align="right">

                                            Select MainMenu

                                        </td>

                                        <td width="2%">

                                            :

                                        </td>

                                        <td width="49%" align="left">

                                            <telerik:RadComboBox ID="ddlMainmenus" runat="server" MarkFirstMatch="True" Skin="WebBlue"

                                                EmptyMessage="Select Mainmenu" Width="150px">

                                                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

                                            </telerik:RadComboBox>

                                        </td>

                                    </tr>

                                    <tr>

                                        <td width="49%" align="right">

                                            Submenu Name …………………So on….

C#Code:-

I am trying to bind this by using

protected void rgSubmenus_ItemDataBound(object sender, GridItemEventArgs e)

    {

       

        if(e.Item is GridEditableItem && e.Item.IsInEditMode)

        {

            RadComboBox cboInstructor = (RadComboBox)e.Item.FindControl("ddlMainmenus");

………

            

        }

 

    }

But I am nt able to Bind. Pls help me in this regards….!

Princy
Top achievements
Rank 2
 answered on 21 Jul 2008
2 answers
214 views
I see that there's a way to implement a post back on a row click.  (by setting ClentSettings -> EnablePostBackOnRowClick to true).

Is there a way to do the same thing with only a double click?  (Ie. I don't want a post back on a single click, only a double click)
Shinu
Top achievements
Rank 2
 answered on 21 Jul 2008
1 answer
304 views
Hello

I want to open a new Rad window on the button click. And I want to display some controls from the same page only.

Please provide me any sample application for the same or any methods to do the same.

Regards,

Vinit
Shaun Peet
Top achievements
Rank 2
 answered on 20 Jul 2008
2 answers
131 views
Dear Sir,

I am using javascript to add some new tabs.  After total tabs are more than expected, the scrollbar should be displayed.  However, the scrollbar doesn't.

Anything I can do to get this goal without postback?
Thank you
DaveJones
Top achievements
Rank 1
 answered on 19 Jul 2008
7 answers
437 views
I have a radwindow with some links to different things. I want to be able to click on a link and then have the radwindow close (got this part working)

and then in the parent page I want a code behind method to be called so I can look at the value sent back from the RadWindow and Response.Redirect to certain URL.

Is this possible?

I looked on the forum here already and didnt see anything regarding this issue. help

Shaun Peet
Top achievements
Rank 2
 answered on 19 Jul 2008
2 answers
221 views
hi,
I work on custom control(inherit RadComboBox) with multi column combobox. For header is used HeaderTemplate and on ItemsRequested I create RadComboBoxItem for each element. For each element I want to display a picture from Table. If put in  RadComboBoxItem an Image control and fill ImageUrl with path it works exactly what I want.
The question is how to show picture from table? I'm able to read the picture into System.Drawing.Image control and make some extra changes on the image but I don't now how to display the image in the RadComboBox.
Any suggestions how to do it?
Marjan
Top achievements
Rank 1
 answered on 19 Jul 2008
4 answers
165 views
Hi,

I have been trying to call a webservice validation to the events before the editor allows someone to edit an appointment.

But i can't find a way to actually stop the scheduler from opening the form.

I call the validation OnClientAppointmentDoubleClick

var hasReservations = null; 
function OnClientAppointmentDoubleClick(sender, eventArgs) 
{ 
    var strId = eventArgs.get_appointment().get_id().substring(0, 36); 
    WebServices.SiteService.EventHasRegistration(strId, OnLookupComplete, OnError); 


then i set the hasReservations = true/false depending if there are any reservations to that appointment.

I try using the following code to stop the schduler, but it wont work due to the async. delay.
if(hasReservations == null || hasReservations== 'undefined') 
{ 
    eventArgs.set_cancel(true); 
    radalert("Validation service currently unavailable. Editing events are not available at this time."); 
    return; 
} 
 
if(hasReservations) 
{ 
    radalert("Some occurrences of this series have reservations assigned to them, they will not be modified."); 
    eventArgs.set_cancel(true); 
} 
 

How am i able to implement such thing?

This doesn't have to happen on the client side, but i cant't find a way to validate it before the client recurrence popup is displayed.

The client documentation for the scheduler is horrible, and i cant find anything i need.

Someone please help me!

Thanks

Fabio


Fabio Honigmann
Top achievements
Rank 2
 answered on 18 Jul 2008
1 answer
87 views
Hi

I'm trying to build a custom skin for the calendar and I can't figure out how to reference the arrows for fast navigation. Does anyone know where in the CSS I can change those images?

Mike
The KID
Top achievements
Rank 2
 answered on 18 Jul 2008
5 answers
270 views
Hi, !'m building a web app that contains a Prometheus TreeView with partial loading threw ServerSideCallback.
The tree view's data source can be changed by the user threw a dropdown. The Treeview's datasource and DataBinding is done in the OnPreRender event so that the newly selected value in the dropdown are cought (so that we don't get PostBack problem returning the earlier selected value).

The TreeView control works fine the first time the page is loaded, but when the user selects a new value ( = Datasource ) in the drop down, trigging a Postback I get this error :
 
Sys.InvalidOperationException: A control is already associated with the element.
http://localhost/ScriptResource.axd?d=I_sV7_5aqsHUuZz1dlHW-RqZsi4HVpivLZbDA9G0_dLCsiXBM93DwJPASsxTuNt_QVQWDeUc-OuHZjNgQ_3i5s507ruArCU5OS77T0Ea8jM1&t=633401439743849103
Line 7278
if (typeof(element.control) != 'undefined') throw Error.invalidOperation(Sys.Res.controlAlreadyDefined);


This worked fine with the old version of the TreeView. It seems that there are some conflicts when the page is PostBack and the ScriptManager doesn't clean the control cache or something. It should be Dissposed by the AJAX.NET framework.

I've tried clearing the ScriptManagers control collection in the OnInit and PreRender events but it didn't help.

The error dissapears when I set  EnableViewState="false" for the TreeView but then I loose all references so I can't load the child nodes and so on.

The code for loading the first nodes are

Protected

Overrides Sub OnPreRender(ByVal e As
LoadNodes()
MyBase.OnPreRender(e)
End Sub


Renders the nodes at the top level

Private

Sub LoadNodes()
RadTreeView.Nodes.Clear()
RadTreeView.ContextMenus.Add(GetContextMenues())
RadTreeView.DragAndDrop = True
For Each dr As DataRow In MigEl.DAL.Dimention.GetSingleTreeLevel(SelectedDimention(), 1, Nothing, GetSelectHierarcy()).Rows
Dim node As RadTreeNode = New RadTreeNode
node.Value = dr("Id").ToString()
node.Text = dr(
"Description").ToString()
node.Attributes.Add(
"RkId", dr("RkId").ToString())
node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack
node.ContextMenuID =
"MemberMenu"
RadTreeView.Nodes.Add(node)
Next
RadTreeView.DataBind()
End Sub


'''

<summary>
''' Handles the NodeExpand event of the RadTreeView control.
''' </summary>
''' <param name="o">The source of the event.</param>
''' <param name="e">The <see cref="Telerik.WebControls.RadTreeNodeEventArgs" /> instance containing the event data.</param>

Protected Sub RadTreeView_NodeExpand(ByVal o As Object, ByVal e As RadTreeNodeEventArgs) Handles RadTreeView.NodeExpand

Dim level As Integer = If(e.Node Is Nothing, 0, e.Node.Level)
For Each dr As DataRow In MigEl.DAL.Dimention.GetSingleTreeLevel(SelectedDimention(), level + 2, e.Node.Value, GetSelectHierarcy()).Rows
Dim node As RadTreeNode = New RadTreeNode
node.Value = dr("Id").ToString()
node.Text = dr(
"Description").ToString()
node.Attributes.Add(
"RkId", dr("RkId").ToString())
node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack
node.ContextMenuID =
"MemberMenu"
e.Node.Nodes.Add(node)
Next

End Sub

Simon
Telerik team
 answered on 18 Jul 2008
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?