Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
95 views
In our project scenario, we have two tabs in a tab strip. A rad popup window is to be displayed when user navigates from one tab to another through tab click. But a javascript error stating radwindow is undefined is displayed. 

We have mentioned the RadTab as "runat="server"". Also mentioned the tab id in the ajax update panel.

Please let us know if we need to add any other configuration to rad tab for using the rad window.
Princy
Top achievements
Rank 2
 answered on 20 Jan 2012
1 answer
219 views
I am unable to manage the padding (space inside the control) for Rad Grid and Rad Combobox. Please refer the attached image displaying space (marked red) inside row of Rad Grid control.

Any suggestions?

Princy
Top achievements
Rank 2
 answered on 20 Jan 2012
1 answer
113 views
i am using vs2010.
i need to add rad combo box dynamically using java script.
i already add some html controls dynamically in java script.
my code is below.
if (!objPropertyInsp.hasOwnProperty("sctid"))
           {
               contentHTML += "<tr><td>sctid</td><td><input type='text' style='width:100%;' id='txtsctid'" + "' value ='' /><td><div id='dvcombo'></div><img src='Images/find.png' alt='Pick' width='16px' height='16px' onclick='openSearchAttributes(); ' /> </td></td></tr>";
           }
           else if (objPropertyInsp.hasOwnProperty("sctid"))
           {           
                   contentHTML += "<tr><td>sctid</td><td><input type='text' style='width:100%;' id='txtsctid' value ='" + objPropertyInsp["sctid"] + "' /><td><img src='Images/find.png' alt='Pick' width='16px' height='16px' onclick='openSearchAttributes();' /></td></td></tr>";                                                     
           }
i added two td in table. i need to add rad combo next to text box.

how to add radcombo box and how to bind the values to radcombo.

thanks,
uma
Shinu
Top achievements
Rank 2
 answered on 20 Jan 2012
0 answers
73 views
Hi,


I have created one webapplication to insert items in sharepoint site i added sharepoint dll also but wen i debug it showing error that is

Could not load file or assembly 'Microsoft.Sharepoint.Sandbox, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Stack Trace is

[BadImageFormatException: Could not load file or assembly 'Microsoft.Sharepoint.Sandbox, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
   System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
   System.Reflection.Assembly.Load(String assemblyString) +28
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Sharepoint.Sandbox, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
   System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
   System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +232
   System.Web.Compilation.BuildManager.CompileGlobalAsax() +51
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Sharepoint.Sandbox, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Sharepoint.Sandbox, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8913739
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259

After i deleted that dll from bin folder and i debug its working but wen i try to insert an item it throwing error

The Web application at http://cisb-orion:8437 could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application

i given platform is x64 and framework is 3.5

please tell me wat is the problem

Abu
Top achievements
Rank 1
 asked on 20 Jan 2012
3 answers
153 views
Hi all,
I use radcombobox with treeview like this,
<telerik:RadComboBox ID="cmb_category" Skin="Black" EmptyMessage="xxx"
                                AllowCustomText="true" runat="server" Height="100%" Width="90%" ShowToggleImage="True"
                                OnClientDropDownOpened="OnClientDropDownOpenedHandler" ExpandAnimation-Type="None"
                                CollapseAnimation-Type="None">

                                <ItemTemplate>
                                    <telerik:RadTreeView Skin="Black" ID="treecategory" runat="server" Width="100%" Height="100%"
                                        DataFieldID="id" DataFieldParentID="fk_up_category_id" OnClientNodeClicking="nodeClicking"
                                        DataValueField="id" DataTextField="name" DataSourceID="SqlDataSourceCategory">
                                    </telerik:RadTreeView>
                                </ItemTemplate>

                                <Items>
                                    <telerik:RadComboBoxItem Text="" />
                                </Items>
</telerik:RadComboBox>

But now i need it in radgrid , but i cant add itemtemplate,

<telerik:GridDropDownColumn DataField="fk_up_category_id" HeaderText="Üst Kategori"
                        DataSourceID="SqlDataSourceCategory" ListTextField="name" ListValueField="id"
                        ColumnEditorID="ce_fk_up_category_id" UniqueName="fk_up_category_id" Visible="True">
</telerik:GridDropDownColumn>

My category table ;
-id
-fk_up_category_id
-name
-short_text
-long_text
-picture

Sorry for my english :( ... i hope you understnd me ..
Shinu
Top achievements
Rank 2
 answered on 20 Jan 2012
1 answer
195 views
This is my scenario I have a grid that within one column I added a second grid So far i have populated both of them and the editing in place is working awesome for both grids when performing Insert and Delete actions.

This is my Code (aspx file)

<telerik:RadGrid runat="server" ID="gv_EmployeesObjectives" Width="100%" Font-Names="Arial" Font-Size="12px" Skin="Office2007"
                        AutoGenerateColumns="false"
                        OnItemCreated="gv_EmployeesObjectives_ItemCreated" OnItemDataBound="gv_EmployeesObjectives_ItemDataBound"
                    >
                        <MasterTableView Name="gv_Objectives" DataKeyNames="ID">
                            <Columns>
                                <telerik:GridEditCommandColumn ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel" EditText="Edit" HeaderStyle-Width="90px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridEditCommandColumn>
                                <telerik:GridTemplateColumn HeaderStyle-Width="150px">
                                    <HeaderTemplate><asp:Label runat="server" ID="lbl_01" Text="Copy Data from Week"></asp:Label></HeaderTemplate>
                                    <ItemTemplate>
                                        <telerik:RadComboBox ID="copyDataDDL" runat="server" AutoPostBack="true" Height="100px" OnSelectedIndexChanged="copyDataDDL_SelectdIndexChanged"></telerik:RadComboBox>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn UniqueName="FY" SortExpression="FY" HeaderText="FY" HeaderButtonType="TextButton" DataField="FY"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="FiscalWeek" DataField="FiscalWeek" HeaderText="Week"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ObjStopBys" DataField="ObjStopBys" HeaderText="# of Stop Bys" Visible="false"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ObjStopByContacts" DataField="ObjStopByContacts" HeaderText="# of Contacts from Stop Bys" Visible="false"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ObjAppels" DataField="ObjAppels" HeaderText="# of<br />Calls"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ObjContacts" DataField="ObjContacts" HeaderText="# of<br />Contacts"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="Objr_v" DataField="Objr_v" HeaderText="# of<br />Appts."></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ObjPres" DataField="ObjPres" HeaderText="# of<br />Pres."></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ObjVentes" DataField="ObjVentes" HeaderText="# of Contracts" Visible="false"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ObjRVSP" DataField="ObjRVSP" HeaderText="ANW"></telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn UniqueName="ProductsList">
                                    <HeaderTemplate></HeaderTemplate>
                                    <ItemTemplate>
                                        <telerik:RadGrid runat="server" ID="gv_ProductsList" AutoGenerateColumns="false" Skin="Office2007" ShowHeader="false"
                                            AllowAutomaticDeletes="false" AllowAutomaticInserts="false" AllowAutomaticUpdates="false"
                                            OnNeedDataSource="gv_ProductsList_NeedDataSource" OnItemCommand="gv_ProductsList_ItemCommand"
                                            OnItemCreated="gv_ProductsList_ItemCreated" OnInsertCommand="gv_ProductsList_InsertCommand"
                                            OnItemDataBound="gv_ProductsList_ItemDataBound"
                                        >
                                            <MasterTableView Name="gv_Products" CommandItemSettings-ShowRefreshButton="false" CommandItemDisplay="Top" DataKeyNames="ID" EditMode="InPlace">
                                                <Columns>
                                                    <telerik:GridEditCommandColumn ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel" EditText="Edit"></telerik:GridEditCommandColumn>
                                                    <telerik:GridTemplateColumn UniqueName="EmployeesObjectivesID">
                                                        <ItemTemplate></ItemTemplate>
                                                        <EditItemTemplate><asp:HiddenField runat="server" ID="hfEmployeesObjectivesID" Value='<%# Eval("EmployeesObjectivesID") %>' />
                                                            <asp:Label runat="server" ID="lblID" text='<%# Eval("ID") %>'></asp:Label>
                                                        </EditItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn UniqueName="ProductID">
                                                        <ItemTemplate><asp:Label runat="server" ID="lblProductDescription" Text='<%# Eval("Product") %>'></asp:Label></ItemTemplate>
                                                        <EditItemTemplate><telerik:RadComboBox runat="server" ID="rcb_Products" DataTextField="Product" DataValueField="ProductID" EmptyMessage="Select" ></telerik:RadComboBox></EditItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn UniqueName="ObjTotal">
                                                        <ItemTemplate><asp:Label runat="server" ID="lblObjTotal" Text='<%# Eval("ObjTotal") %>'></asp:Label></ItemTemplate>
                                                        <EditItemTemplate><telerik:RadTextBox runat="server" ID="txtObjTotal" Text='<%# Eval("ObjTotal") %>'></telerik:RadTextBox></EditItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                </Columns>
                                            </MasterTableView>
                                        </telerik:RadGrid>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>



Everything works perfect, the problem I'm facing is when editing the inner grid....Which is the best method to be able to access the controls within the editTemplate and populate the drop down list i have there.
So far I've tried inner grid's methods OnItemDataBound, OnItemCreated; and it seems the EditTemplate controls aren't there I can only get the ones inside the item template.

any ideas??

Thks in advance...
Shinu
Top achievements
Rank 2
 answered on 20 Jan 2012
11 answers
377 views
hi everybody

how can multuply 2 columns in a radgrid, i have to show the total in a 3 column(no footer)  i have this code

For Each dataItem As GridDataItem In RadGrid1.Items
           Dim txt1 As Integer = Val(dataItem("Template1").FindControl("txtunidades"))
            Dim txt2 As Integer = Val(dataItem("Template2").FindControl("txtcunitario"))
            dataItem("Template3").FindControl("txtvtotal") = txt1 * txt2
        Next
Robert
Top achievements
Rank 2
 answered on 20 Jan 2012
1 answer
79 views
Hello all,

I have a require for some custom functionality, and I think the RadGrid will work for me based on the examples, however I'm not sure how start coding or setting it up. Below is a brief example of the functionality and layout...

//Initial Row State
[Read Only Label] [Empty Textbox] [ Default Dropdown] [ Default Dropdown] [Add Button]

When the [Add Button] is clicked, I'd like to take the values entered for the textbox and two dropdown menues, and "push" them down. At that point, the top row will be blank, and the bottom row will have the delete button like this.

//After item is added
[Read Only Label] [Empty Textbox] [Default Dropdown] [Default Dropdown] [Add Button]
[Read Only Label] [New Text Value] [New Dropdown Choice] [New Dropdown Choice] [Delete]

As mentioned, the examples give the add/delete functionality, but not in this manner. I'm not actually pulling data from anywhere, it would be more like a data entry form. I can't figure out how to keep the add button at the top and push the top row down when the add button is clicked. Thanks  for any suggestions, examples etc..

-Chris
Richard
Top achievements
Rank 1
 answered on 19 Jan 2012
2 answers
143 views
Hi,

Can you please tell how I can remove the 'Upload' option from the right click context menu in the FileExplorer control?

Thank you very much!

Kind regards,
Randy Sullivan
Randy
Top achievements
Rank 1
 answered on 19 Jan 2012
5 answers
117 views
Hello there,
I have a listbox inside a RadToolBar as below I want to do something only if the user confirms to do it, otherwise I want to just cancel.

What I need (Is there an example for this?):
1. Ideally I would like to use a RadWindow.Confirm to get a response and process based on Confirm or Cancel (popup using client script only).
2. I don't want a postback to happen if the user selects cancel on the popup.

(with the below code the postback happens even if args.set_cancel(result) and result is the Cancel response from the window.confirm) Is it because one of the container of the listbox is causing the postback?

Can you please help?

        <telerik:RadToolBar runat="server" ID="RadToolBar1" Width="100%" Skin="Windows7">
            <Items>
                <telerik:RadToolBarDropDown ImageUrl="~/app_themes/default/images/Check.png">
                    <Buttons>
                        <telerik:RadToolBarButton>
                            <ItemTemplate>
                                <telerik:RadListBox runat="server" ID="lbDoSomething" Skin="Windows7" SelectionMode="Single"
                                    OnClientSelectedIndexChanging="ConfirmDo" OnSelectedIndexChanged="lbDoSomething_OnSelectedIndexChanged"
                                    AutoPostBack="True" />
                            </ItemTemplate>
                        </telerik:RadToolBarButton>
                    </Buttons>
                </telerik:RadToolBarDropDown>
            </Items>
        </telerik:RadToolBar>
 
 
 <script type="text/javascript">
....
        function ConfirmOverride(sender, args) {
            var msg = "Are you sure you want to do something?";
            var result = !window.confirm(msg);
            args.set_cancel(result);
 
        }
</script>

Thank you,
Manas
Manas
Top achievements
Rank 1
 answered on 19 Jan 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?