Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
299 views
hi all,
   I am using editform to edit my data in radgridview. EditFormType is 'Autogenerated'. I have one problem in insert mode.
I have one status column in the grid. This is not a visible column and i need to show this column in edit mode only. In normal mode and insert mode i need not siplay this control. I specify the template column in grid view as follows

<telerik:GridTemplateColumn UniqueName="Status" HeaderText="Status" Visible="false" > 
    <EditItemTemplate> 
         <asp:CheckBox ID="chk1" runat="server" /> 
    </EditItemTemplate> 
</telerik:GridTemplateColumn> 

In my databound event i try to set visibility of this column. checkbox will hide in the insert mode but the header text exists the same. how to handle that header text also. my code behind is

    Protected Sub Rad_grd1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles Rad_grd1.ItemDataBound  
 
        If (TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode) Then  
            Dim edititem As GridEditFormItem = CType(e.Item, GridEditableItem)  
            If edititem.OwnerTableView.IsItemInserted Then  
                edititem("Status").Visible = False 
            Else  
                edititem("Status").Visible = True 
            End If  
        End If  
 
    End Sub  
 
Only checkbox is hide. please help to handle that header text. If i didnt put header text in design mode, ':' is visible. how to handle this colon (:) in the editmode
Akhil Raj
Top achievements
Rank 1
 answered on 27 May 2010
1 answer
350 views

My grid is databound to List<Entity>

Edit mode is:

 EditMode="PopUp" 

EditForm is template:

<EditFormSettings EditFormType="Template" ... />

I want to customize pop-up caption that it will say 'You are editing item {number}'.

I cannot use CaptionFormatString because {number} is not my Entity property. It is just subsequent number and it can be DataItem.ItemIndex as well.

I may set it declaratively or in code-behind but how to extract DataItem.ItemIndex of editing row?

Shinu
Top achievements
Rank 2
 answered on 27 May 2010
4 answers
249 views
This is my ascx code

<td  colspan="2" style="height:auto">
                    <telerik:RadGrid ID="gv_data_contract" runat="server" AutoGenerateColumns="False" GridLines="None" OnNeedDataSource="gv_data_contract_NeedDataSource" Width="1034px" AllowPaging="True" Skin="Web20" OnItemCommand="gv_data_contract_ItemCommand" AllowAutomaticInserts="true" AllowAutomaticUpdates="true" OnItemDataBound="gv_data_Contract_ItemDataBound">
                        <MasterTableView CommandItemDisplay="Top" DataKeyNames="ContractID" NoMasterRecordsText="No hay Contratos para mostrar." EditMode="PopUp">
                            <Columns>
                                <telerik:GridEditCommandColumn ButtonType="ImageButton" CancelText="Cancelar" EditText="Editar"
                                    InsertText="Adicionar" UpdateText="Actualizar">
                                    <HeaderStyle Font-Names="Arial" Font-Size="12px" Width="15px" />
                                    <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" Wrap="True" />
                                </telerik:GridEditCommandColumn>
                                <telerik:GridBoundColumn DataField="ContractCode" UniqueName="ContractCode" HeaderText="C&#243;digo">
                                    <HeaderStyle Font-Bold="True" Font-Names="Verdana" Font-Size="13px" HorizontalAlign="Center" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="ReferenceID" HeaderText="Referencia" UniqueName="ReferenceID">
                                    <HeaderStyle Font-Bold="True" Font-Names="Verdana" Font-Size="13px" HorizontalAlign="Center" />
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn DataField="PersonConpanyName" HeaderText="Contratante" UniqueName="PersonConpanyName">
                                    <ItemTemplate>
                                    
                                        <asp:Label ID="lbl_gv_companyName" runat="server" ></asp:Label>
                                           <asp:Label id="lbl_gv_data_PersonCompanyName" runat="server">
                                              <%# DataBinder.Eval(Container.DataItem, "Person.PersonCompanyName") %>
                                           </asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="True" Font-Names="Verdana" Font-Size="13px" HorizontalAlign="Center" />
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="StartingDate" DataFormatString="{0:d}" DataType="System.DateTime"
                                    HeaderText="Fecha Inicia" UniqueName="StartingDate">
                                    <HeaderStyle Font-Bold="True" Font-Names="Verdana" Font-Size="13px" HorizontalAlign="Center" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="EndingDate" DataFormatString="{0:d}" DataType="System.DateTime"
                                    HeaderText="Fecha Termina" UniqueName="EndingDate">
                                    <HeaderStyle Font-Bold="True" Font-Names="Verdana" Font-Size="13px" HorizontalAlign="Center" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="TotalAmount" DataFormatString="{0:c2}" DataType="System.Decimal"
                                    HeaderText="Valor Total" UniqueName="TotalAmount">
                                    <HeaderStyle Font-Bold="True" Font-Names="Verdana" Font-Size="13px" HorizontalAlign="Center" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </telerik:GridBoundColumn>
                                <telerik:GridCheckBoxColumn DataField="ContractStatus" DataType="System.Boolean"
                                    HeaderText="Estado" UniqueName="ContractStatus">
                                    <HeaderStyle Font-Bold="True" Font-Names="Verdana" Font-Size="13px" HorizontalAlign="Center" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridCheckBoxColumn>
                            </Columns>
                            <EditFormSettings EditFormType="Template">
                                <EditColumn UniqueName="EditCommandColumn1">
                                </EditColumn>
                                <FormTemplate>
                                    <table style="padding-left: 8px; font-family: Arial; font-size: 12pt; width: 98%;">
                                        <tr>
                                            <td style="width: 187px">
                                            </td>
                                            <td style="width: 275px">
                                            </td>
                                            <td>
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 187px">
                                                Seleccione Cliente</td>
                                            <td style="width: 275px">
                                                <asp:DropDownList ID="ddl_gv_person" runat="server" DataTextField="Person.PersonCompanyName" DataValueField="PersonID" >
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 187px">
                                                Referencia Contrato</td>
                                            <td style="width: 275px">
                                                <telerik:RadTextBox ID="txb_rd_ReferenceID" runat="server" EmptyMessage="--- Introduzca Referencia ---"
                                                    Skin="WebBlue" Width="177px" Text='<%# Bind("ReferenceID") %>'>
                                                    <EnabledStyle HorizontalAlign="Right" />
                                                    <DisabledStyle HorizontalAlign="Right" />
                                                    <EmptyMessageStyle ForeColor="Blue" HorizontalAlign="Center" />
                                                </telerik:RadTextBox></td>
                                            <td>
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 187px">
                                                Fecha Inicia</td>
                                            <td style="width: 275px">
                                                <telerik:RadDatePicker ID="txb_rdp_StartingDate" runat="server" Skin="WebBlue" Width="175px" Culture="English (United States)" DbSelectedDate='<%# Bind("StartingDate") %>'>
                                                    <Calendar runat="server" Skin="WebBlue" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False"
                                                        ViewSelectorText="x">
                                                        <FastNavigationSettings CancelButtonCaption="Cancelar" DateIsOutOfRangeMessage="Fecha fuera de rango.">
                                                        </FastNavigationSettings>
                                                        <DisabledDayStyle HorizontalAlign="Right" />
                                                        <SelectedDayStyle HorizontalAlign="Right" />
                                                    </Calendar>
                                                    <DatePopupButton HoverImageUrl="" ImageUrl="" ToolTip="Mostrar Calendario." />
                                                    <DateInput runat="server" DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy" EmptyMessage="--- Seleccione Fecha Inicial ---">
                                                        <EmptyMessageStyle ForeColor="Blue" HorizontalAlign="Center" />
                                                        <EnabledStyle HorizontalAlign="Right" />
                                                    </DateInput>
                                                </telerik:RadDatePicker>
                                            </td>
                                            <td>
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 187px">
                                                Fecha Termina</td>
                                            <td style="width: 275px">
                                                <telerik:RadDatePicker ID="txb_rdp_EndingDate" runat="server" Skin="WebBlue" Width="175px" Culture="English (United States)" DbSelectedDate='<%# Bind("EndingDate") %>'>
                                                    <Calendar runat="server" Skin="WebBlue" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False"
                                                        ViewSelectorText="x">
                                                        <FastNavigationSettings CancelButtonCaption="Cancelar" DateIsOutOfRangeMessage="Fecha fuera de rango.">
                                                        </FastNavigationSettings>
                                                        <DisabledDayStyle HorizontalAlign="Right" />
                                                        <SelectedDayStyle HorizontalAlign="Right" />
                                                    </Calendar>
                                                    <DatePopupButton HoverImageUrl="" ImageUrl="" ToolTip="Mostrar Calendario." />
                                                    <DateInput runat="server" DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy" EmptyMessage="--- Seleccione Fecha Final ---">
                                                        <EmptyMessageStyle ForeColor="Blue" HorizontalAlign="Center" />
                                                        <EnabledStyle HorizontalAlign="Right" />
                                                    </DateInput>
                                                </telerik:RadDatePicker>
                                            </td>
                                            <td>
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 187px">
                                                Valor Total</td>
                                            <td style="width: 275px">
                                                <telerik:RadNumericTextBox ID="txb_rn_TotalAmount" runat="server" Culture="English (United States)"
                                                    DataType="System.Decimal" Skin="WebBlue" Type="Currency" Value="0" Width="186px" DbValue='<%# Bind("TotalAmount") %>'>
                                                    <DisabledStyle HorizontalAlign="Right" />
                                                    <IncrementSettings InterceptArrowKeys="False" InterceptMouseWheel="False" />
                                                    <EmptyMessageStyle ForeColor="Blue" HorizontalAlign="Center" />
                                                    <EnabledStyle HorizontalAlign="Right" />
                                                </telerik:RadNumericTextBox></td>
                                            <td>
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 187px">
                                                Estado Contrato</td>
                                            <td style="width: 275px">
                                                </td>
                                            <td>
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 187px">
                                            </td>
                                            <td style="width: 275px">
                                            </td>
                                            <td>
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 187px; height: 26px">
                                            </td>
                                            <td align="right" style="width: 275px; height: 26px">
                                                <asp:Button ID="btnUpdate" Text='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "Adicionar" : "Actualizar" %>'
                                                    runat="server" CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>'>
                                                </asp:Button>&nbsp;
                                                <asp:Button ID="btnCancel" Text="Cancelar" runat="server" CausesValidation="False"
                                                CommandName="Cancel"></asp:Button>
                                            </td>
                                            <td style="height: 26px">
                                            </td>
                                            <td style="height: 26px">
                                            </td>
                                        </tr>
                                    </table>
                                </FormTemplate>


My problem is that I don't know how to bind a DDL in code behind in order to Insert or Edit

I have this codebehind:

protected void gv_data_Contract_ItemDataBound(object sender, GridItemEventArgs e)
    {

        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            GridEditableItem item = e.Item as GridEditableItem;
            // access/modify the edit item template settings here
            DropDownList list = item.FindControl("lbl_gv_data_PersonCompanyName") as DropDownList;
            list.DataSource = GetCompany();
            list.DataBind();

            if (Session["Updated"] != null)
            {
                list.SelectedValue = Session["updatedValue"].ToString();
            }
        }
        else if (e.Item is GridDataItem && !e.Item.IsInEditMode && Page.IsPostBack)
        {
            GridDataItem item = e.Item as GridDataItem;
            Label label = item.FindControl("ddl_gv_person") as Label;
            // update the label value
            if (label != null) label.Text = Session["updatedValue"];
        }

    }

And I get this error

System.NullReferenceException was unhandled by user code
  Message="Object reference not set to an instance of an object."
 



Bricton Perez
Top achievements
Rank 1
 answered on 27 May 2010
0 answers
80 views
A script that mistake can be solved?
w j
Top achievements
Rank 1
 asked on 27 May 2010
1 answer
132 views
hi,

my captcha not displayed image on deployed but only in IE
firefox and chrome it's ok ????

why ie not display image ?
thank's
Ch Perez
Top achievements
Rank 1
 answered on 26 May 2010
0 answers
154 views
After a long battle, I've gotten good, validating results with RADMENU asp.net AJAX at http://www.haymondlaw.com.  I'm going to share with you guys how it is done. 

There are three simple steps to getting your RADMENU working in DNN / DOTNETNUKE / DNN 5+

Step 1) Register the control

Thanks to this post, I learned how to properly write my declaration, which is included below: http://www.telerik.com/community/forums/dotnetnuke/skin-objects/looking-for-dnn-sample-skin-for-radmenu.aspx

Here is my declaration, exactly as it stands.  You place this, or a modified version to your liking in your skin.ascx.  In case you don't know, that document sits in your Portals/X/Skin folder (whatever your location is exactly) and gets parsed when you upload your skin.  Open your skin.ascx file.  If there is already an entry there for the classic version of RADMENU, remove it.  Next, add a line like this in next to the other similar looking entries, but don't overwrite one of the other ones accidentally. 

<%

@ Register TagPrefix="dnn" TagName="RADMENU" Src="~/DesktopModules/r.a.d.menu/RadMenu.ascx" %>

Part 2, Add RADMENUAJAX to your skin

You cannot get the results you want without seeing the link to the skinning whitepaper below.  Basically, you will add this info to where you call in your RADMENU into your skin.  With the classic version, you used to add these into the skin.xml, but not with ASP.NET AJAX version of RADMENU.  Below is a link to the Telerik whitepaper with all the good little things you can do in DNN with radmenu.  Everything from animations, separators, etc, etc. 

Now this is important:   I read that DotNetNuke wont parse this info properly.  So, you'll have to add it directly to your .ascx manually as I did.   Parse your skin out, go up and grab the ascx and edit this in.  Basically, it's better to just skin that way anyway.  Take a look at how mine looks seen below.

Telerik Skinning API whitepaper:  http://www.telerik.com/help/aspnet/menu/menu_apireference.html
 
<
dnn:RADMENUAJAX runat="server" EnableEmbeddedSkins="false" id="dnnRADMENU" Skin="Vista" ExpandAnimationType="InOutElastic" ExpandAnimationDuration="300" CollapseAnimationType="none" childGroupSeparator="*SkinPath*/Menu/dnn/img/child_sep.gif" childGroupSeparatorCssClass="childseparator" HeaderSeparator ="*SkinPath*/Menu/dnn/img/nav-sep.gif" HeaderSeparatorCssClass="headerseparator" />

Save the document and upload it back, refresh your site.  Should be working.

Part 3)  Let RADMENU AJAX FOR DNN see your style

In order for your solution to work, Telerik says you'd need to link to a properly named css file with the skin name.  Except, that isn't a good solution in DNN.  See, you cannot just go linking to external resources in your ascx skin because it will render outside of the header and your skin won't validate according to w3c standards. 

Instead, just include (combine) the CSS entries from your menu style document into your skin.css and comment the section so you can find it easily later. 

VERY IMPORTANT, the classes are SUFFIXED with the skin name. Suffix means FOLLOWING.  You can use the internal styles that are hidden away in the telerik UI DLL or make your own.  It can be named whatever you like, but you must suffix your classes with that name and that name must match what is set when you reference RADMENU (see step 2 below)

ex:  .RadMenu_Vista . 

.Radmenu goes before the underscore.  Now, RADMENU is using psudo classes, which are a little different than what you might be used to.  Have a look at my CSS below and you will see what I mean.

Here is a link describing all the styles that will absolutely work for you in DNN as they did for me:
http://www.telerik.com/help/aspnet-ajax/menu_appearancecssselectors.html

Here is the complete CSS code behind my menu, and yes, it sits in my skin.css. 

/* <RadMenu / Vista> */.RadMenu_Vista .headerseparator {background-image:url(Menu/dnn/img/nav-sep.gif);width:1px;height:50px;}
.RadMenu_Vista .rmLink {font-family:Tahoma;font-size:14px;font-weight:lighter;}

/* <Root items> */

.RadMenu_Vista  .rmVertical {width:248px;}
.RadMenu_Vista .rmLink {line-height: 38px; text-decoration: none; color: white; position: relative; display: inline-block !important; }
.RadMenu_Vista .rmLink:hover {line-height: 38px; text-decoration: none; color: yellow; position: relative; display: inline-block !important; background-image:url(Menu/dnn/img/navbg_hover.gif); }

/* </Root items> */

/* <Submenu items> */

.RadMenu_Vista  .rmVertical .rmSeparator {height: 1px; line-height: 1px; background-image:url(Menu/dnn/img/child_sep.gif);height:2px;background-repeat:no-repeat;margin-left:20px; }
.RadMenu_Vista .rmGroup {padding-bottom:50px;}
.RadMenu_Vista .rmGroup .rmLink {line-height:28px;}
.RadMenu_Vista .rmGroup .rmLink:hover,
.RadMenu_Vista .rmGroup .rmFocused,  .RadMenu_Vista  .rmGroup .rmExpanded {color: yellow; background-image:url(Menu/dnn/img/child_hov.gif); background-repeat:no-repeat; }
.RadMenu_Vista .rmVertical {background-image:url(Menu/dnn/img/child_back.gif); background-repeat:no-repeat; background-position: 0 14px; line-height:28px; width:248px;}
.RadMenu_Vista
.rmGroup .rmFirst {background-image:url(Menu/dnn/img/menu_top.gif); background-repeat:no-repeat; padding-top:15px;width:248px;}
.RadMenu_Vista .rmGroup .rmLast {background-image:url(Menu/dnn/img/menu_bottom.gif); margin-bottom:-15px; background position: 0 13px; background-repeat:no-repeat; width:248px; }

4) Images

If you pasted my code above and got this far and yet nothing, then you probably forgot to put up images for your menu or change the css above to refect background colors instead of images.  Get it done.

Now, time to make the sprite for this menu...  ;-)

 

 

 

 

 

 

 

 

 

Eric Pontbriand
Top achievements
Rank 1
 asked on 26 May 2010
2 answers
150 views
Hi,
I am new to telerik. I have a TabStrip control in a web content page. I need to add several user controls dynamically to each tab. They need to be added after the pageview is created so I can't use the dynamic control load example in the demos as this assumes you are only adding the control at the time the pageview is created. I can add the user controls at page_load and it works fine and postback is ok. However, when I add any controls via my "NEXT" button the control only persists until the next postback.

How can I persist these user controls through a postback?

My ASPX snippet:

<

 

telerik:RadScriptManager ID="RadScriptManager1" runat="server"/>

 

 

 

 

<div id="RadTabDiv">
<telerik:RadTabStrip Style="position: absolute; top: 84px;" ID="RadTabStrip1" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1" Height="100%" Width="100%">

 

 

 

<Tabs>

 

 

 

</Tabs>

 

 

 

</telerik:RadTabStrip>

 

 

 

<telerik:RadMultiPage Style="position: absolute; top: 134px;" ID="RadMultiPage1" runat="server" SelectedIndex="0">

 

 

<telerik:RadTextBox Runat="server">

 

 

</telerik:RadTextBox>

 

 

</telerik:RadMultiPage>

 

 

</div>

 

 

<div id="Next" style="padding: 20px; float:right">

 

 

<asp:Button ID="btnNext" runat="server" Text="Next" CssClass="Button" />

 

 

</div>

 

 

One of the user controls I am adding:

<%

@ Control Language="vb" AutoEventWireup="false" CodeBehind="QuestionTextbox.ascx.vb" Inherits="CSS.QuestionTextbox" %>

 

<%

 

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

 

 

 

<div style="height:50px">

 

 

 

<asp:Label ID="lblQuestion" runat="server" Text="Question:"/>

 

 

<asp:Label ID="lblQuestionText" runat="server" Text="??????"/>

 

 

<br />

 

 

<telerik:RadTextBox ID="txtAnswer2" runat="server" Width="200"/>

 

 

<telerik:RadComboBox Runat="server"></telerik:RadComboBox>

</

 

 

div>
My Code behind (if it helps). In this example I am hardcoding the Tabs and usercontrols but in the final app these will be dynamically generated via a list held in external data.

 

 

Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

    If Not Page.IsPostBack Then

        AddTab(

"General")

 

 

 

        AddTab(

"Check Nearby SCNs")

 

 

    End If

         AddControls()

 

End Sub

 

 

 

 

 

 

Private Sub AddTab(ByVal tabName As String)

    Dim tab As New RadTab()

    tab.Text = tabName

    RadTabStrip1.Tabs.Add(tab)

 

 

 

    Dim pageView As New RadPageView()

    pageView.ID = tabName

    RadMultiPage1.PageViews.Add(pageView)

 

 

 

End Sub

 

Private Sub AddControls()

    Dim ProcessID As Integer = 20

    Dim TaskID As Integer = 10

    Dim Pageview As RadPageView = FindControl("ctl00$ContentPlaceHolder1$General")

    Dim ucQuestion As UserControl = Page.LoadControl("UserControls/QuestionTextbox.ascx")

 

    ucQuestion.ID =

 

"uc" & ProcessID & TaskID

 

 

 

 

 

    Dim lblQuestionText As Label = ucQuestion.FindControl("lblQuestionText")

    lblQuestionText.Text =

 

"What is your name?"

 

    Pageview.Controls.Add(ucQuestion)

    TaskID = 20

 

    Dim ucQuestion2 As UserControl = Page.LoadControl("UserControls/Statement.ascx")

    ucQuestion2.ID =

 

"uc" & ProcessID & TaskID

 

 

    Pageview.Controls.Add(ucQuestion2)

    TaskID = 30

 

 

 

    Dim ucQuestion3 As UserControl = Page.LoadControl("UserControls/QuestionDropdown.ascx")

    ucQuestion3.ID =

 

"uc" & ProcessID & TaskID

 

 

    Pageview.Controls.Add(ucQuestion3)

    TaskID = 50

 

 

 

    Dim txt1 As New TextBox

    txt1.Text =

 

"THIS IS THE TEXT"

 

    Pageview.Controls.Add(txt1)

 

    Dim Pageview2 As RadPageView = FindControl("ctl00$ContentPlaceHolder1$Check Nearby SCNs")

    TaskID = 40

 

 

 

 

    Dim ucQuestion4 As UserControl = Page.LoadControl("UserControls/QuestionTextbox.ascx")

    ucQuestion4.ID =

 

"uc" & ProcessID & TaskID

 

 

    lblQuestionText = ucQuestion4.FindControl(

 

"lblQuestionText")

 

 

    lblQuestionText.Text =

 

"What is your name?"

 

 

 

    Pageview2.Controls.Add(ucQuestion4) 

 

 

    Dim btnNext As Button = FindControl("ctl00$ContentPlaceHolder1$btnNext")  

    btnNext.Enabled = 

 

True

 

 

 

End Sub

 

 

 

 

Protected Sub btnNext_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnNext.Click

 

 

 

    Dim Pageview As RadPageView = FindControl("ctl00$ContentPlaceHolder1$General")

 

 

 

    Dim ucQuestion As New UserControl

 

    ucQuestion = Page.LoadControl(

 

"UserControls/QuestionTextbox.ascx")

 

    ucQuestion.ID =

 

"uc" & Now

 

 

 

    Dim lblQuestionText As Label = ucQuestion.FindControl("lblQuestionText")

 

    lblQuestionText.Text =

 

"Time is: " & Now

 

    Pageview.Controls.Add(ucQuestion)

 

End Sub

 

 

 

 

 

 



Thanks
Dave
Dave Isackson
Top achievements
Rank 1
 answered on 26 May 2010
5 answers
386 views
I am attempting to add a customised DetailTable to my RadGrid, but can't seem to get it working. I have tried two approaches so far with no luck.

1. Use another RadGrid within a NestedViewTemplate. The problem with this is hooking up the Parent/Child Relationship - I can't seem to get this happening properly as when you expand the row SelectedIndexChanged isn't fired. Any ideas?
2. Use a DetailTable alongside/inside a NestedViewTemplate. I could only get one or the other working, don't think this is possible.

Therefore, how am I supposed to show a DetailTable with extra stuff around it (basically some more data bound fields from the parent record that isn't shown in the row itself)?

Surely this would be functionality that is used quite frequently but I can't seem to find a demo or forum post exactly addressing this.
Ken
Top achievements
Rank 1
 answered on 26 May 2010
1 answer
114 views
I've been trying to modify the Image Manager in two ways. I'd like to remove the "New Folder" option and remove the link to the image editor because we don't want our users to have access to these functions. How can I do this in Sharepoint 2007? Everything I read about mentions the RadTools directory and ImageManager.ascx, neither of which I can find. Thanks!
Jefftheman45
Top achievements
Rank 1
 answered on 26 May 2010
18 answers
1.0K+ views
Hi there,

I'm working on small form where I use Javascript to validate form's elements through asp.net custom validator.

I was trying to read selected item value from RadCombo box but all my tries didn't help finding out the solution, I used below methods.

1. var xCombo = document.getElementById(<%=RadcomboBox1.ClientID%>);
var xItem = XCombo.GetValue();

and tried

2. var xCombo = document.getElementById(<%=RadcomboBox1.ClientID%>);
var xItem = XCombo.get_text();

unfortunately it didn't work. However if I place the second code in OnClientIndexChanging script it works perfectly and Javascript retrieve ComboBox selected item successfully. but I dont want to use such function because it requires Events args and Sender parameters.

I really need help since i'm stuck with this for hours now
loai taha
Top achievements
Rank 1
 answered on 26 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?