Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
389 views
Dear Telerik-Staff,

I want to make my RadGrid occupy 100% of a RadPane's height, the grid is in.

I have taken the WebMail-Demo: The relevant part looks like this:
<telerik:RadPane runat="server" ID="contentPane" Scrolling="none">               
                <telerik:RadSplitter runat="server" ID="RadSplitter2" BorderStyle="None" PanesBorderSize="0">
                    <telerik:RadPane runat="Server" ID="leftPane" Width="240px" MinWidth="240" MaxWidth="240" Scrolling="None">
                        <telerik:RadSplitter runat="server" ID="RadSplitter3" BorderStyle="None" PanesBorderSize="0" Height="100%" Orientation="Horizontal">
                            <telerik:RadPane runat="server" ID="topLeftPane">
                                <div class="contentBorders">
                                    <asp:ContentPlaceHolder ID="ContentPlaceHolderNavigationModules" runat="server" />
                                </div>
                            </telerik:RadPane>
                            <telerik:RadSplitBar runat="server" ID="RadSplitBar3" CollapseMode="Backward" EnableResize="false"  />
                            <telerik:RadPane runat="server" ID="bottomLeftPane" Height="68px">
                                <telerik:RadPanelBar runat="server" ID="panelBarBottomLeft" Width="100%">
                                    <Items>
                                        ---The Items
                                    </Items>
                                </telerik:RadPanelBar>
                            </telerik:RadPane>
                        </telerik:RadSplitter>
                    </telerik:RadPane>
                    <telerik:RadSplitBar runat="server" ID="RadSplitBar1" CollapseMode="Forward" />
                    <telerik:RadPane runat="Server" ID="rightPane" CssClass="right-pane" Scrolling="Both" OnClientResized="ClientResized" Height="100%">
                        <asp:ContentPlaceHolder ID="MainContent" runat="server" />           
                    </telerik:RadPane>
                </telerik:RadSplitter>
            </telerik:RadPane>
        </telerik:RadSplitter>

The AJAX-Code for the OnClientResized-Event looks like this:
<telerik:RadCodeBlock ID="codeBlock" runat="server">
<script type="text/javascript">
function ClientResized(sender, eventArgs) {
$find("<%= AjaxManagerMasterPage.ClientID %>").ajaxRequest('ChangePageSize');
}
</script>
</telerik:RadCodeBlock>

I have a site containing my RadGrid (it is not nested into any other controls except the contentplaceholder) and on this site I add the following in the PageLoad-Event:
AjaxManager = (RadAjaxManager)this.Master.Master.FindControl("AjaxManagerMasterPage");
AjaxManager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(AjaxManager_AjaxRequest);
AjaxManager.AjaxSettings.AddAjaxSetting(AjaxManager, MyRadGrid, RadAjaxLoadingPanel1);

And finally the AjaxRequest-Event looks like this:

void AjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            switch (e.Argument.ToString())
            {
                case "ChangePageSize":
                    //Make the grid fit the full pane size
                    Unit masterPaneWidth = ((RadPane)this.Master.Master.FindControl("rightPane")).Width;
                    Unit masterPaneHeight = ((RadPane)this.Master.Master.FindControl("rightPane")).Height;
                     
                    MyRadGrid.Width = new Unit(masterPaneWidth.Value - 2);                  
                    MyRadGrid.Height = new Unit(masterPaneHeight.Value - 2);  
                 
                    break;
            }
        }

Now to my problem:

When I access the page the RadGrid doesn't occupy the total height of the rightPane. When clicking on the splitbar, the grid is resized properly in its height and width. So this perfectly works.

But I can't get it to run on the initial page load. When I call the RaisePostbackEvent of the AjaxManager the page crashes saying that a negative value for the width and height of the pane is not allowed (caused in the AjaxRequest-Event when subtracting 2 from the rightPane's width).

Then I did the following: Set the leftPane to Collapsed (Collapsed="true"). When accessing the page with this setting, the leftPane is collapsed and the Resized-Event is raised on initial page load. This works as expected but not if I have the leftPane set to Collapsed="false" on the initial PageLoad.

I hope that you can help me. I've spent the entire day trying to fix this. Do you have any idea for me??

Best regards,
Marco
Maria Ilieva
Telerik team
 answered on 27 Oct 2014
0 answers
96 views
I have gantt chart Its work fine in chrome browser but in Firefox and IE its not show correctly. Please check attached screen shot. I tried to set MonthView-SlotWidth but its not fix my issue.
Programmer
Top achievements
Rank 1
 asked on 27 Oct 2014
1 answer
217 views
Hi Team,

I am having three text boxes in the form.
I need to populate the other two text box values based on the value in the first text box value.
These values are coming from database.
ASPX FILE:

  <tr class="FormContainer">
                    <td style="white-space: nowrap;">
                        Terminal ID:
                    </td>
                    <td>
                        <telerik:RadTextBox ID="txtTerminalId" runat="server" >
                             
                        </telerik:RadTextBox>
                        <asp:RequiredFieldValidator ID="txtTerminalIdValidator" runat="server" Display="Dynamic"
                            ControlToValidate="txtTerminalId" ErrorMessage="TerminalId can not be empty!"></asp:RequiredFieldValidator>
                       
                    </td>
                </tr>                <tr class="FormContainer">
                    <td style="white-space: nowrap;">
                        Terminal Name:
                    </td>
                    <td>
                        <telerik:RadTextBox ID="txtTerminalName" runat="server"></telerik:RadTextBox>
                       
                    </td>
                </tr>                <tr class="FormContainer">
                    <td style="white-space: nowrap;">
                        Terminal Address:
                    </td>
                    <td>
                        <telerik:RadTextBox ID="txtTerminalAddress" runat="server"></telerik:RadTextBox>
                       
                    </td>
                </tr>
When i Type Terminal Id in the textbox,Terminal name and terminal address needs to populate automatically.
These values are coming from the database.

protected void plantIdChanged(object sender, EventArgs e)
    {
       
        Int64 plant_id = Convert.ToInt64(txtTerminalId.Text);        var depots = loadingManager.GetLoadingSite(plant_id).FirstOrDefault(x => x.Plant_ID == plant_id);
        if (depots != null)
        {
            txtTerminalName.Text = depots.PlantText;
            txtTerminalAddress.Text = depots.Street + " " + depots.Zipcode;
        }
       
    }
   
plantIdChanged m
ethod is used for get terminal name and terminal address from database based on the terminalid(plant_id).
Need to implement it in Onblur event of the text box.

Can any one please help,how to implement this.


Viktor Tachev
Telerik team
 answered on 27 Oct 2014
5 answers
181 views
Hi Team,

i have a grid which is having some rows in it.I need to implement editing functionality for each row in the grid.
i am using the editmode=batch properity for this to achieve.
once edit has completed i need to update the changes  in the database when i click on the save changes button.
and also cancel changes by clicking on the cancel button.
i am also need to implement add a new record and update the new record in to the database.

ASPX File:
<telerik:RadGrid ID="RadGrid1" OnItemDataBound="RadGrid1_OnItemDataBound"
runat="server" AutoGenerateColumns="false" CssClass="TransferGridPanel" Height="375px"
Width="500px" OnNeedDataSource="RadGrid1_NeedDataSource" AllowAutomaticUpdates="True" AllowAutomaticInserts="True" onItemUpdated="RadGrid1_ItemUpdated"
OnBatchEditCommand="RadGrid1_BatchEditCommand" OnItemInserted="RadGrid1_ItemInserted"
 OnItemCommand="RadGrid1_ItemCommand" OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged">
   <MasterTableView ShowHeadersWhenNoRecords="true" CommandItemDisplay="Top" EditMode="Batch">
    <BatchEditingSettings EditType="Cell" />
<Columns>
          <telerik:GridBoundColumn UniqueName="Id" DataField="Loading_ID">
          </telerik:GridBoundColumn>
          <telerik:GridBoundColumn UniqueName="TerminalId" DataField="Plant_ID">
          </telerik:GridBoundColumn>
          <telerik:GridBoundColumn UniqueName="TerminalName" DataField="TerminalName">
          </telerik:GridBoundColumn>
         <telerik:GridBoundColumn UniqueName="StartTime" dataField="LoadingStartTime">
         </telerik:GridBoundColumn>
         <telerik:GridBoundColumn UniqueName="EndTime" DataField="LoadingEndTime">
         </telerik:GridBoundColumn>
</Columns>

How to achieve the above operations  in codebehind file.
​
Viktor Tachev
Telerik team
 answered on 27 Oct 2014
4 answers
332 views
I want to hide a RadNumericTextBox and later make it visible by javascript:

tbNumPeriodos.set_visible(show);

However, it does not work fine when after hiding RadNumericTextBox in code behind

I have tried several options in code behind:

tbNumPeriodos.Style.Add("display", "none");
If I set visibility to true by javascript, only down arrow is shown and the place when the textbox is not shown.

tbNumPeriodos.Style.Add("visibility", "hidden");     
If I set visibility to true by javascript, up & down arrows are shown and the place when the textbox should appear is reservated but it is not shown.

Any idea on how to achieve that?

Sonia
Top achievements
Rank 1
 answered on 27 Oct 2014
2 answers
105 views
I have a grid kind of similar the demo at:
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/hierarchy-with-templates/defaultcs.aspx

I am using NestedViewTemplate.
My problem is that the same as the url above,
I have no issues to have a page size combobox for the nested view,
But cannot make have page size to the parent grid.

Is it a grid limit - or is there are way?
I am trying to use:
           <PagerStyle Mode="NextPrevAndNumeric" PageSizeLabelText="Page Size: "PageSizes="5,10,25,50,100,250" />
but see no combobox.
Jayesh Goyani
Top achievements
Rank 2
 answered on 26 Oct 2014
2 answers
405 views
Yes, this is a common problem. The foreign key stored in a field is no longer valid.

Not all legacy applications use declared referential integrity. Sometimes, on some records, foreign keys are broken.

In other languages, how comboboxes deal with this situation is they simply remain blank.

Not with a RadComboBox. Instead, it throws an error.

Now, combine this with an online web application which uses a RadMultiPage and dozens of RadComboBoxes.

How many hours do you have to spend when one of these situations pop up attempting to find which Combobox is the source of the error?

Well, its been 4 thusfar this morning, and I'm no closer to finding which RadComboBox is throwing the error.

Do you think, maybe.... just maybe... you could print the name of the control throwing the error in the error message to aid people in tracking down specifically which control is tossing its cookies? Rather than

Selection out of Range
Parameter Name: value

maybe make it read:

Selection out of Range
Parameter Name: value
Control: Whatever id= name my control has?

?
mathieu
Top achievements
Rank 1
 answered on 24 Oct 2014
3 answers
148 views
I have installed ASP.NET AJAX with Visual Studio 2013 on Windows 8.1 Pro 64.  I did have DevCraft, but I removed it all and only have ASP.NET AJAX now.

On my own already existing project, I added the Bin4.5/Telerik.Web.UI for the Toolbox and the Telerik toolbox items show up and can be used.

I also ran Telerik.Web.UI.VSPackage.vsix from C:\Program Files (x86)\Telerik\UI for ASP.NET AJAX Q2 2014\VSExtensions hoping it would help. That caused the About under Help to include Telerik to be shown in Installed products which it was not before which seems good.

If I open one the RadControlsAJAXCourseware project .sln files the Telerik toolbox items are disabled. If I try to run on Google I get compile errors and warnings saying Visual Studio does not know about the Telerik tools:

Error 1 The type or namespace name 'Telerik' could not be found in the global namespace (are you missing an assembly reference?) C:\Program Files (x86)\Telerik\AJAXDocumentation\Projects\Chart\CS\GettingStarted1\GettingStarted1\Default.aspx.designer.cs 50 27 GettingStarted1
Warning 2 Could not resolve this reference. Could not locate the assembly "Telerik.Charting, Version=2.0.4.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. GettingStarted1
Warning 3 Could not resolve this reference. Could not locate the assembly "Telerik.Web.UI". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. GettingStarted1

I have looked through the Visual Studio looking for some why to add a Telerik reference.  The Web.config file does not contain any Telerik references.

What do I need to do so the Courseware projects can be used on Visual Studio 2013?

Thanks,
George












George
Top achievements
Rank 2
 answered on 24 Oct 2014
6 answers
236 views
I am trying switch to Telerik from obout because of perceived support for VS 2013 and obout seems to be not going forward.  I developing in ASPs. I told Telerik to use my Visual Studio 2013 when I installed it.  The install sure messed up my Visual Studio settings. 

I tried to run the ASP.NET AJAX sample and get the error " C:\Program Files\...\HtmlSampleTests.csproj cannot be opened because it project type is not supported by the version of the application."   It is opening VS2010 (which I installed for obout) and giving the error.

I opened it with VS 2013 using "open with..." and it opened fine.

Both VS2010 and VS2013 use a .sln extension but somehow 2010 verses 2013 is determined.  The tootip on the Sample .sln says 2010, while the tooltip on my own .sln says 2013.  I have no idea how the systems is determining the difference.   Telerik should make the .sln open 2013 for the 2013 install.

In the end I am not quite sure what this sample is for, I was hoping form implementation samples.  Start just gives an error.

Cheers,
George
George
Top achievements
Rank 2
 answered on 24 Oct 2014
1 answer
631 views
Height of the Rad Grid increases when user resizes a column that has two or more words in the header text, since the header text is wrapped. This is evident in the demo provided by telerik:
http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/column-row-resize-reorder/defaultcs.aspx

Can we disable this wrapping for header texts through some css or anything? Wrapping can be disabled for cell data, but i didn't find anything for header text. Setting Wrap='false' in HeaderStyle does not work. I need to keep the height fixed during resize without explicitly mentioning grid height, so resizing should not result in wrapping in header or cell data.
Please help me out.

Thanks.
Kostadin
Telerik team
 answered on 24 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?