Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
163 views
I have an app in which I use a tabcontainer control of the microsoft ajax control tool kit. And I just realized, after mush time spent trying to make it work, that it does not work at all inside a tab of the tabcontainer control.

Anybody knows any work around?

<

 

cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0">

 

<cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Photos Grouped in Frames">

 

<HeaderTemplate>
Grouped in Frames

 

 

</HeaderTemplate>

 

 

 

<ContentTemplate>

 

 

 

<telerik:RadRotator ID="RadRotator1" runat="server" DataSourceID="ObjectDataSource2">

 

<ItemTemplate>

 

 

<asp:Image ID="Image1" ImageUrl='<%#"~/" + eval("imageurl") %>' runat="server" />

 

 

 

 

</ItemTemplate>

 

 

 

</telerik:RadRotator>

 

<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetFramePhotos" TypeName="MB.TheBeerHouse.BLL.Albums.Photo">  

 

 

<SelectParameters>

 

 

 

 

 

<asp:ControlParameter ControlID="FrameIODTag" DefaultValue="" Name="FrameID" PropertyName="Value" Type="Int32" />

 

 

 

</SelectParameters>

 

 

 

</asp:ObjectDataSource>

 

 

 

 

</

ContentTemplate>

 

 

</cc1:TabPanel 

 

 

<cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Loose Photos">

 

 

</cc1:TabPanel>

 

 

<cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="Loose Photos">

 

 

 

<ContentTemplate>

 

 

 

</ContentTemplate>

 

 

 

 

</cc1:TabPanel>

 

 

 

 

 

 

</cc1:TabContainer>

this does not work. It will occupy the spacce on screen but will not display any picture or data at all.

 

 

 

 

Nebras
Top achievements
Rank 1
 answered on 08 Feb 2012
8 answers
676 views
Hi,

On radmaskedtextbox, I noticed that after setting the mask as Phone Number, it accepts numeric entries of 9 or less and won't throw that as an error, even though it's not a valid phone number length. Is there a way to set this on the control's properties? Or should I have to use a regular expression validator to achieve this? And also have the error message appear inside the radmaskedtext box like radinputmager does? (see 2nd scenario)

        <telerik:RadMaskedTextBox ID="RadMaskedTextBox1" Runat="server"
            DisplayMask="(###) ###-####" Mask="(###) ###-####"
            ValidationGroup="vgTest" ZeroPadNumericRanges="False"
            AllowEmptyEnumerations="False" DisplayPromptChar="#" RoundNumericRanges="False"
            Width="125px" NumericRangeAlign="Left">

Another way I tried is to create a radinputmanager and set regular expression to phone number, this will validate on single numeric entries and we like the dynamic error messages appearing inside the textbox, however, the problem with this is we don't want the users to enter the ()- characters and we only want to grab the numeric entries to store in the database.

            <telerik:RegExpTextBoxSetting BehaviorID="Phone" ErrorMessage="Invalid Phone" ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}" Validation-ValidateOnEvent="Submit" Validation-IsRequired="true" Validation-ValidationGroup="vgTest">
                <TargetControls>
                    <telerik:TargetInput ControlID="txtPhone" />
                </TargetControls>

Let me know which approach would achieve this. Sample codes appreciated. Thanks.
Shif
Top achievements
Rank 1
 answered on 08 Feb 2012
1 answer
135 views
I'm working on a project where they want us to prevent any of the users from pasting into the RadEditor, and I was able to get it working in IE and Firefox (finally), but Chrome just lets me paste right into the box and I cant seem to make it stop. The JavaScript I am using to prevent Pasting is as follows.

<script type="text/javascript" language="javascript">
 
    // Prevents pasting into RadEditor
    // from RadEditor menu and Context menu
    function OnClientCommandExecuting(editor, args) {
 
        var commandName = args.get_commandName();
 
        if (commandName == "PasteFromWord"
        || commandName == "PasteFromWordNoFontsNoSizes"
        || commandName == "PastePlainText"
        || commandName == "PasteAsHtml"
        || commandName == "Paste") {
 
            args.set_cancel(true);
        }
        //alert(commandName);
    }
 
    // Prevents pasting into RadEditor
    // by pressing Ctrl + V
    function OnClientLoad(editor) {
 
        editor.attachEventHandler("onkeydown", function (e) {
 
            if (e.ctrlKey && e.keyCode == 86) {
 
                if (document.all) {
                    e.cancelbubble = true;
                    e.returnvalue = false;
                    return false;
                }
                else {
                    e.preventdefault();
                    return false;
                }
            }
 
        });
 
        // Prevents Firefox from loading the context menu.
        editor.attachEventHandler("oncontextmenu", function (e) {
            if (e.preventDefault) e.preventDefault();
            if (e.stopPropagation) e.stopPropagation();
            return false;
        });
    
</script>
Shinu
Top achievements
Rank 2
 answered on 08 Feb 2012
3 answers
228 views
Hi

I'm new to the scheduler and I can't figure out what the RecurrenceParentID is? Then as long as I'm starting a thread, if anyone could explain an eloquent way of calendar filtering. I guess telerik calls it 'Resources'. Basically I want to adapt one the teleril examples where you could see the calendar for different people or all at the same time. I would like to have three check boxes to the side of my calendar that if the the box is checked those calendar appointments will show. Anyone know a good way about accomplishing this?

Thanks

Mike
Shinu
Top achievements
Rank 2
 answered on 08 Feb 2012
3 answers
76 views
Hello. I need to select the row index of the grid by using javascriptfunction .. first get the index of selected then select the next. sorry for bad english .. Help? 
Shinu
Top achievements
Rank 2
 answered on 08 Feb 2012
1 answer
185 views
Hi,
 I have radgrid with column resizing and resize to fit set to true. I want to set max and min width for each column so that it should not shrink less OR expand more than min and max width while both resizing any column and resizing to fit.?

Thanks,
Mahesh
Princy
Top achievements
Rank 2
 answered on 08 Feb 2012
0 answers
98 views
hi everybody, i am trying to reproduce this scenario http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/popupeditform/defaultcs.aspx its working but i have a problem i have a DropDownList that i populate with a different datasource and when i want to add a register or update give an error this is a llittle of my code
<grid..........................
.....
.
.
.
<EditFormSettings  CaptionFormatString="Editar Proveedor: {0}" CaptionDataField="COD_PROVEE" EditFormType="Template" EditColumn-EditText="Editar" EditColumn-UpdateText="Modificar" PopUpSettings-Width="780px" PopUpSettings-Height="300px" PopUpSettings-Modal="True" PopUpSettings-ZIndex="2000">
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
     <FormTemplate>
<label>CUENTA:</label>
                                      
                                <asp:DropDownList ID="DropDownList5" runat="server" AppendDataBoundItems="true" DataSourceID="SqlDataSource2" SelectedValue='<%# Bind("cuenta") %>'
                    DataTextField="cuenta" DataValueField="cuenta">
                                </asp:DropDownList>
                    
                                </div>
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
                        ConnectionString="<%$ ConnectionStrings:SICI2.0ConnectionString %>"
                        SelectCommand="SELECT * FROM [TBL_PROVEEDOR]"
                        
                        UpdateCommand="UPDATE TBL_PROVEEDOR SET NOMPROVEE = @NOMPROVEE, CONTACTO = @contacto, TELPROVEE = @TELPROVEE, DIRPROVEE = @DIRPROVEE, DIASCREDITO = @DIASCREDITO, CODIGO = @codigo, tipocontribuyente = @tipocontribuyente, nit = @nit, pais = @pais, cuenta = @cuenta, tipo_sociedad = @tipo_sociedad, montocredito = @montocredito WHERE (COD_PROVEE =@COD_PROVEE)"
                        InsertCommand="INSERT INTO TBL_PROVEEDOR(NOMPROVEE, CONTACTO,TELPROVEE,DIRPROVEE,DIASCREDITO, CODIGO, tipocontribuyente,nit,pais,cuentas,tipo_sociedad,montocredito) VALUES (@NOMPROVEE,@contacto ,@TELPROVEE,@DIRPROVEE,@DIASCREDITO,@codigo, @tipocontribuyente, @nit,@pais,@cuenta,@tipo_sociedad,@montocredito)">
                        <UpdateParameters>
                            <asp:Parameter Name="NOMPROVEE" Type="String" />
                            <asp:Parameter Name="contacto" Type="String"/>
                            <asp:Parameter Name="TELPROVEE" Type="String"/>
                            <asp:Parameter Name="DIRPROVEE" Type="String" />
                            <asp:Parameter Name="DIASCREDITO" Type="Int32"/>
                            <asp:Parameter Name="codigo" Type="String" />
                            <asp:Parameter Name="tipocontribuyente" Type="String" />
                            <asp:Parameter Name="nit" Type="String" />
                            <asp:Parameter Name="pais" Type="String" />
                            <asp:Parameter Name="cuenta" Type="String"/>
                            <asp:Parameter Name="tipo_sociedad" Type="String" />
                            <asp:Parameter Name="montocredito" Type="Decimal" />
                            <asp:Parameter Name="COD_PROVEE" Type="Int32" />
                        </UpdateParameters>
                        <InsertParameters>
                            <asp:Parameter Name="NOMPROVEE" />
                            <asp:Parameter Name="contacto" />
                            <asp:Parameter Name="TELPROVEE" />
                            <asp:Parameter Name="DIRPROVEE" />
                            <asp:Parameter Name="DIASCREDITO" />
                            <asp:Parameter Name="codigo" />
                            <asp:Parameter Name="tipocontribuyente" />
                            <asp:Parameter Name="nit" />
                            <asp:Parameter Name="pais" />
                            <asp:Parameter Name="cuenta" />
                            <asp:Parameter Name="tipo_sociedad" />
                            <asp:Parameter Name="montocredito" />
                        </InsertParameters>
                    </asp:SqlDataSource>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConnectionString="<%$ ConnectionStrings:CONTASConnectionString %>"
        SelectCommand="SELECT [ncuenta], [cuenta] FROM [tbl_c_cuenta]">
    </asp:SqlDataSource>
thank u for ur help
Robert
Top achievements
Rank 2
 asked on 07 Feb 2012
1 answer
162 views
I'm following your resource filtering demo here (http://demos.telerik.com/aspnet-ajax/scheduler/examples/resources/defaultcs.aspx) with the latest controls (2011.3.1324.40). The only difference between my code and yours is that I'm binding to a list of objects in my Page_Init and you are binding to a datasource control. Also, your filter controls autopostback, but mine require the user to click an "Apply Filters" button. The click event for the button does the same thing though, it calls ReBind() on the RadScheduler control. Sure enough, I see the DataBound event fire, but the AppointmentDataBound events never do. That's where your code (and mine, by extension) hides certain appointments based on the filters selected, so it kind of needs to be firing on Rebind. Any ideas what would prevent that event from firing?
ATS
Top achievements
Rank 1
 answered on 07 Feb 2012
3 answers
133 views
Hi

I am writing a web appication rather than a web site so I have information available to me that I would not normally know.
For instance in this case, I have got 4 files on a client disk - 3 images and 1 video.

On the web page I already know where the files are stored and what the filenames are before I draw the page.
All I want to do is to pre-populate the 4 radupload edit boxes with the filenames amd paths so that all the user has to do when they open the page is to click the Upload button and all 4 files can then be uploaded.

I cannot find any obvious way to do this with the radupload control?

Can anybody steer me in the right direction here?

Thanks
Mick
Kevin
Top achievements
Rank 2
 answered on 07 Feb 2012
0 answers
87 views
Hi,

I'm trying to use a RadMenu to select some hierarchical data. I feed the data from a DataTable fine and the hierarchy works when specified, however I would actually like this data to populate at the 3rd tier of the menu. i.e. I'd like the structure as follows:

Category -> Shop -> heirachical data for Shop
-> Fuel -> heirachical data for Fuel

Both shop and fuel data use the ID to ParentID relationship and can be combined into a single DataTable with the differentiating factor being a dummy column with either "shop" or "fuel" (ofc this data could be provided as 2 tables instead). I would like Category to be the root - this is static and does not need to come from the datasource, tho I could add another dummy column "Category" to the query if required.

Is there a way to populate from the 2 data sources at the Shop and Fuel level (shop and fuel are also static and can be specified in advance)?

Any help with this would be greatly appreciated.

Cheers,
Christian
Christian
Top achievements
Rank 1
 asked on 07 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?