Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
175 views
Hello
I have a datagrid which contain combobox. The user can add row by clicking on a button in my form.
So the user can have as many rows as he wants.

I have 2 arrays in javascript. One for the text value and one for the key value.

I would like to populate my combo box (as many as it has in my grid) with the array that I have in javascript.
how can I do that?
Here is my arrays
var correspondance = new Array(2);
            correspondance[0] = ["St-Victor", "Beauceville", "St-Georges", "Notre-Dame-des-Pins", "St-Anges", "Tring-Jonction", "St-Odilon-de-Cranbourne", "Frampton", "St-Frédéric", "St-Joseph", "Vallée-Jonction", "Ste-Marie", "St-Benoit-Labre", "St-Ephrem", "St-Narcisse-de-Beaurivage", "St-Elzéar", "Ste-Hénédine", "St-Isidore", "Ste-Marguerite", "Scott", "St-Bernard", "St-Sylvestre", "St-Patrice-de-beaurivage", "Lac-Etchemin", "St-Camille-de-Lellis", "St-Magloire", "St-Cyprien-des-Etchemins", "Ste-Rose-de-Watford", "St-Benjamin", "St-Prosper", "Ste-Justine", "St-Zacharie", "Ste-Aurélie", "St-Côme-Linière", "St-Honoré-de-Shenley", "St-Théophile", "St-Robert-Bellarmin", "St-Ludger", "St-Gédéon-de-Beauce", "Courcelles", "St-Évariste-de-Forsyth", "La Guadeloupe", "St-Martin"];
            correspondance[1] = ["G0M2B0", "G5X3N9", "G5Y7R7", "G0M1K0", "G0S3E0", "G0N1X0", "G0S3A0", "G0R1M0", "G0N1P0", "G0S2V0", "G0S3J0", "G6E2K9", "G0M1P0", "G0M1R0", "G0S1W0", "G0S2J0", "G0S2R0", "G0S2S0", "G0S2X0", "G0S3G0", "G0S2G0", "G0S3C0", "G0S1B0", "G0R1S0", "G0R2S0", "G0R3M0", "G0R1B0", "G0R4G0", "G0M1N0", "G0M1Y0", "G0R1Y0", "G0M2C0", "G0M1M0", "G0M1J0", "G0M1V0", "G0M2A0", "G0M2E0", "G0M1W0", "G0M1T0", "G0M1C0", "G0M1S0", "G0M1G0", "G0M1B0"];

Here is my grid
<telerik:RadGrid 
                                  ID="RadGrid2" 
                                  Skin="Vista" 
                                  runat="server" 
                                  ShowFooter="true" 
                                  CommandItemStyle-HorizontalAlign="Center">  
                                     <MasterTableView 
                                         ShowFooter="true" 
                                         CommandItemDisplay="bottom" 
                                         EditMode="InPlace" >  
                                         <CommandItemTemplate>
                                             <asp:LinkButton ID="LinkButton1" CommandName="CalculDistance" Runat="server" CssClass="TexteBlanc16">Calculer</asp:LinkButton>
                                         </CommandItemTemplate>
                                         <Columns>                     
                                             <telerik:GridTemplateColumn UniqueName="CodePostal" HeaderText="Code Postal">  
                                                 <ItemTemplate>  
                                                     <asp:DropDownList ID="LstCodePostal" runat="server"  OnBlur="CreerCodePostal()"></asp:DropDownList>
                                                 </ItemTemplate>  
                                             </telerik:GridTemplateColumn>  
                                         </Columns>  
                                      </MasterTableView>  
                              </telerik:RadGrid>

Thank you
Myriam
Top achievements
Rank 1
 answered on 27 Sep 2011
1 answer
102 views
I am successfully able to group by dragging a column name. My problem is, if i want to remove the grouping, i am not getting the close button near that column name. Please help.
Sebastian
Telerik team
 answered on 27 Sep 2011
1 answer
92 views
Hi all.  I have tried numerous ways to do this but cannot.  My goal is SIMPLE...

"To be able to use a RadGrid that I can control formatting on, bind to a SharePoint list and use the internal SharePoint edit dialog commands without writing a bunch of code"

 Things I've tried (some based on correspondence with the Telerik team)...

1. Inheriting from TelerikSPRadGridWebPart and creating my own custom webpart so that I can bind to the events of the Grid.
  PROBLEM:  I can't seem to get the right combination of files perhaps.  I can deploy and load the webpart onto a page,  but there is no data and the Designer doesn't work at all.  I've tried this with and without an associated ascx control.  You'd think without is the way to go.  Then simply have a .dwp and .cs file with the .cs file inheriting from TelerikSPRadGridWebPart.  Again, I can get this on the page, I can even access the Grid (RadGrid) property on the webpart in my .cs file...  But that's about it.  Unless I want to go about doing all of the databinding myself, that's as far as it takes me. 

2. Created a simple webpart using the RadGrid and creating my own datatable from a SharePoint list query.  Bind the datatable to the RadGrid.  I have tried the following with regard to the Edit functionality I described in my goal...

2a. I've tried a GridButtonColumn and then in the item data bound event handler i've tried to set the OnClientClick to the SharePoint showEditInsertForm...

2b. I've tried a Grid LinkButtonColumn and navigation parameters (id) and url format string to match the SharePoint string. 

this last one, the LinkButton...actually works.  but it's not how the client wants it implemented.

Ok...so there you go.  Any help is greatly appreciated.

o'g
Tsvetoslav
Telerik team
 answered on 27 Sep 2011
1 answer
87 views
hi all,
 
 I have created treeview inside combobox.I want my combobox to be filled with the items selected in the treeview . Please tell me how to do this.
Thanks and regards
Prasanna B
Princy
Top achievements
Rank 2
 answered on 27 Sep 2011
1 answer
58 views
Can I change interface like a attachment for week view ?
Please refer attachment.
So, is that possible?
Princy
Top achievements
Rank 2
 answered on 27 Sep 2011
1 answer
105 views
I have a gridview that looks great on my machine but some users that have older smaller monitors are having difficulties seeing things like the filter controls and textboxes have different heights than I would like. What is the best way to develop gridviews so they resize correctly according to the users screen size and resolution? Thanks for any advice.
Pavlina
Telerik team
 answered on 27 Sep 2011
4 answers
612 views
How can I programmatically identify and retrieve the cell value in a column with the highest value for that colum?
So in a grid like:

MyValues
--------
1
2
3
4

I would get "4".

This would happen in the OnItemDataBound event with e.Item being GridFooterItem.

Thanks,
Richard
Sebastian
Telerik team
 answered on 27 Sep 2011
2 answers
284 views
How can I use the Slider to show multiple images in the slideshow?
See attached file.
Slav
Telerik team
 answered on 27 Sep 2011
3 answers
197 views
Hi Telerik,

I am struggling with an unrelated issue, but was exploring my options, and noted something quirky. I wanted to try executing a function on document ready. As such, I did this:

            $(document).ready(function () {
                FixSplitter($find(rightPaneID));
            });

with my script declarations as such:

<telerik:RadScriptManager ID="ScriptManager1" Runat="Server" EnablePageMethods="True" >
    <CompositeScript>
        <Scripts>
            <asp:ScriptReference Path="~/Scripts/jquery-1.3.2.min.js" />
            <asp:ScriptReference Path="~/Scripts/jquery.json-2.2.min.js" />
            <asp:ScriptReference Path="~/Scripts/jquery-ui-1.7.2.custom.min.js" />
            <asp:ScriptReference Path="~/Scripts/Dashboard/Dashboard.js" />
            <asp:ScriptReference Path="~/Scripts/jquery.cookies.min.js" />
            <asp:ScriptReference Path="~/Scripts/jquery.hotkeys-0.7.9.js" />
            <asp:ScriptReference Path="~/Scripts/jquery.updnWatermark.js" />
            <asp:ScriptReference Path="~/Scripts/Master.js" />
        </Scripts>
    </CompositeScript>
    <Scripts>
        <asp:ScriptReference Name="Telerik.Web.UI.Common.Core.js" Assembly="Telerik.Web.UI"  />
    </Scripts>
</telerik:RadScriptManager>

I would like to keep my scripts combined. They should be combined. Loading scripts not combined is inefficient. Yet, when I have my jQuery scripts declared inside of CompositeScripts I am told 

Uncaught TypeError: Property '$' of object [object DOMWindow] is not a function

If I move all my script declarations such that the declaration is like this:

<telerik:RadScriptManager ID="ScriptManager1" Runat="Server" EnablePageMethods="True" >
    <CompositeScript>
        <Scripts>
        </Scripts>
    </CompositeScript>
    <Scripts>
        <asp:ScriptReference Path="~/Scripts/jquery-1.3.2.min.js" />
        <asp:ScriptReference Path="~/Scripts/jquery.json-2.2.min.js" />
        <asp:ScriptReference Path="~/Scripts/jquery-ui-1.7.2.custom.min.js" />
        <asp:ScriptReference Path="~/Scripts/Dashboard/Dashboard.js" />
        <asp:ScriptReference Path="~/Scripts/jquery.cookies.min.js" />
        <asp:ScriptReference Path="~/Scripts/jquery.hotkeys-0.7.9.js" />
        <asp:ScriptReference Path="~/Scripts/jquery.updnWatermark.js" />
        <asp:ScriptReference Path="~/Scripts/Master.js" />
        <asp:ScriptReference Name="Telerik.Web.UI.Common.Core.js" Assembly="Telerik.Web.UI"  />
    </Scripts>
</telerik:RadScriptManager>

Presto! The error disappears. 

Is there a good way to avoid this...? Could I have an explanation of what's going on so that I may fully understand the problem?

Thanks.

Simon
Telerik team
 answered on 27 Sep 2011
1 answer
191 views
Hello,
Do Telerik controls work with Visual Studio Web Developer 2010 Express Edition? In the past I have seen this version listed explicity as being compatible on your website, however now the page has dissappeared. We are interested to purchase RadControls, but not if we must also pay to upgrade Visual Studio as well.
Thanks.
Marin Bratanov
Telerik team
 answered on 27 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?