Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
156 views
Hi,

I need to add our own sorting to tree list.

Is it possible?

I need to sort the tree list value by alphabetical order.

i need to show the alphabetical letters(a to z).with link.

when the user click the a button, it sort the tree list with starting letter of a values.

Is there any way to achieve this?

Thanks,
Uma
Tsvetina
Telerik team
 answered on 08 Feb 2012
0 answers
33 views
HI

this is my grid tag
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false">
                          <ClientSettings>
                              <Selecting AllowRowSelect="true" />
                          </ClientSettings>
                          <MasterTableView>
                              <Columns>
                                  <telerik:GridBoundColumn DataField="ID" HeaderText="شماره" UniqueName="ID">
                                  </telerik:GridBoundColumn>
                                  <telerik:GridBoundColumn DataField="GeneralDate"
                                      HeaderStyle-Font-Names="Tahoma" HeaderText="تاریخ"
                                      ItemStyle-Font-Names="Tahoma" DataFormatString="{0:yyyy/MM/dd}">
                                  </telerik:GridBoundColumn>
                                  <telerik:GridBoundColumn DataField="time" HeaderStyle-Font-Names="Tahoma"
                                      HeaderText="ساعت" ItemStyle-Font-Names="Tahoma" UniqueName="time" >
                                  </telerik:GridBoundColumn>                                   
                              </Columns>
                          </MasterTableView>
                      </telerik:RadGrid>


and this is my function that bind my grid on client side:
var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
           tableView.set_dataSource(result);
           tableView.dataBind();

after data bind the time colum show [object Object] for every rows?
why? and how can i solve this problem ?

Best regards,
mohammad
Mohammad sadegh
Top achievements
Rank 1
 asked on 08 Feb 2012
9 answers
124 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
607 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
101 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
186 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
62 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
159 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
74 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
117 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
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?