Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
129 views
Hi,

I would like to show only 2 appointments in each time-slot for  Week-view. If  the number of appointments exceeds 2,  I want it to show more button as in Month View.

In Day-view, I want the time-slot to expand vertically/show scroll bars  within time-slot  as in time-line view. I want  the time-slot to expand vertically to fit all appointments rather than squeezing the appointments.

I would also like to give a bright orange border to  whole column  representing today's date in month and view . Is it possible to acomplish above objectives, if yes, how can I do it?

Thanks,
Prava
Plamen
Telerik team
 answered on 09 Sep 2011
4 answers
197 views
Okay, i'm doing something very simple, so i must not be understanding something.

Goal: Show a Table Row when the checkbox is checked, hide it when it's unchecked.

Javascript =
function toggleRelationshipRow(sender, args) {
            var row = getElementById("ctl00_ContentPlaceHolder1_rowRelationship");
            if(args.get_checked())
                row.style.display = '';
            else
                row.style.display = 'none';
}
The row i'm referencing exists with that ID. Gives me the same id if I use

<%=rowRelationship.ClientID%>

 


TelerikRadButton Code:

<telerik:RadButton ID="cbIsLeaker" runat="server" 
       ToggleType="CheckBox" ButtonType="ToggleButton" 
        ToolTip="Flag as Leaker" AutoPostBack="False" Checked="false"  
        OnClientCheckedChanged="toggleRelationshipRow" >
  </telerik:RadButton>

The event is firing, but i'm getting an Object Expected error on the getElementById call, which I don't understand, the Row exists with the id.

Thanks for any help, (and i wouldn't be surprised if there is something i'm not doing right w/ my javascript)
Kevin
Top achievements
Rank 2
 answered on 09 Sep 2011
7 answers
311 views
I've looked around the forums a bit and can't find an issue that relates exactly to my scenario.

I've got a Radwindow, with 2 buttons on,

A cancel button (OnClientClick = 'CancelEdit')
and a save button (iniates postback, runs some server side code then calls the CloseAndRebind method with ClientScript.RegisterStartupScript. )

This all works, however, when i click the 'save and close button' it closes the radwindow, refereshes the control on the page below (in this case a listview) but then the radwindow reopens, and i'm not sure why.

function GetRadWindow() {
    var oWindow = null;
    if (window.radWindow) {
        oWindow = window.radWindow; //Will work in Moz in all cases, including classic dialog
    }
    else if (window.frameElement.radWindow) {
        oWindow = window.frameElement.radWindow; //IE (and Moz as well)
    }
    return oWindow;
}
 
function CloseAndRebind() {
    try {
        GetRadWindow().BrowserWindow.refreshAddresses();
    }
    catch (err) {
    }
    GetRadWindow().Close();
}
 
function CancelEdit() {
    GetRadWindow().Close();
}

Alan T
Top achievements
Rank 1
 answered on 09 Sep 2011
0 answers
94 views
Hello,

I have a question, currently I am working to add new clients. I created a button on the Advanced form for this. When the button is clicked there opens a new window with the windowmanager. The Window manager is in Agendacontrol and not in advancedform.

When they submit the client I want to add the data to the advanced form via Javascript. 

function OnClientClose(oWnd, args) {
             
                
            var arg = args.get_argument();
 
            var cityName = arg.achternaam;
}

Currently I have this. The agendacontrol execute this when the user has finished creating the new client. So, what I need now is to add that 'cityname' to the advanced form. Does anyone of you know how to do this? For example, I want the cityname to the subjectbox in the advanced form. 

Thanks in advance

Edit: 
I fixed it , solution: e._formElement.getElementsByTagName("INPUT")[0]; Thnx for the help :)





Sander
Top achievements
Rank 1
 asked on 09 Sep 2011
17 answers
267 views
Hello,
I have all my columns built runtime using TemplateColumns. Now I want to implement in-place editors and I can't do EditorItemTemplate. Forum search refers 2-3 years old solutions which I cannot implement. Can you please help?
Thank you.
Dmitry
Top achievements
Rank 1
 answered on 09 Sep 2011
1 answer
56 views
My application is very simple, it has login, registeration and schedular control.

Every thing was working fine, without any error.  then all of sudden

Radscriptmanager started throwing error as seen in below screen shot.

I restart VS2010, Empty Browser Cache, restarted PC.   but stil its the same error.

What went wrong ?
Simon
Telerik team
 answered on 09 Sep 2011
1 answer
104 views
Hello,

I have a telerik:radgrid which contains the following column
<telerik:GridBoundColumn DataField="LITIGATE_PERSON_CIF" DataType="System.String"
                    HeaderText="CIF Καθού" UniqueName="LITIGATE_PERSON_CIF" DataFormatString="{0}">
                    <HeaderStyle Width="70px" />
                </telerik:GridBoundColumn>

The type of LITIGATE_PERSON_CIF column in DB is varchar(50). An example of data at this column is "9999940374268002".

When i export to excel this grid, i get the value 9999940374268000 at this field.

Should I use another format?

I thing that somehow it rounds the data. How could I avoid that?

Regards,
Peny
Daniel
Telerik team
 answered on 09 Sep 2011
1 answer
118 views
Hi,
    We have been using Telerik contols in our projects. In one of the aspx pages I am using RadGrid, it loads the data on IE8 but on IE9 it displays blank data. Is there any specific property which I need to set.
The following is my grid code

<

 

radG:RadGrid ID="grdVBList" runat="server" GridLines="None" Skin="Vista" height="96%" width="99%" AllowAutomaticUpdates="True" AllowSorting="True"

 

 

AllowPaging="false" PageSize="17" EnableAJAX="True" CellPadding="0" CellSpacing="0"

 

 

EnableAJAXLoadingTemplate="True" OnSortCommand="grdVBList_SortCommand"

 

 

BorderWidth="1px" ItemStyle-Wrap = "False" >

 

 

<MasterTableView AutoGenerateColumns="False" TableLayout="Fixed">

 

 

<ExpandCollapseColumn Resizable="False" Visible="False">

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

</ExpandCollapseColumn>

 

 

<RowIndicatorColumn Visible="False">

 

 

<HeaderStyle />

 

 

</RowIndicatorColumn>

 

 

<Columns>

 

 

<radG:GridTemplateColumn ItemStyle-HorizontalAlign="Left" UniqueName="Icon">

 

 

<HeaderStyle Width="8%"/>

 

 

<ItemTemplate>

 

 

<asp:CheckBox ID="chkSelected" runat="server" onclick="enabledisablebutton(this.checked);"></asp:CheckBox>

 

 

</ItemTemplate>

 

 

</radG:GridTemplateColumn>

 

 

<radG:GridBoundColumn DataField="lVBID" HeaderText="VBID" ReadOnly="True"

 

 

UniqueName="lVBID" Display="False">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="sSAPNO" HeaderStyle-Width="12%" HeaderStyle-HorizontalAlign="Left"

 

 

ReadOnly="True" UniqueName="sSAPNO" ItemStyle-HorizontalAlign="Left">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="sVBName" ReadOnly="True" HeaderStyle-Width="15%" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign = "Left"

 

 

SortExpression="sVBName" UniqueName="sVBName">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="lUnits" ReadOnly="True" HeaderStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign = "Left"

 

 

SortExpression="lUnits" UniqueName="lUnits">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="lBonus" ReadOnly="True" HeaderStyle-Width="12%" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign = "Left"

 

 

SortExpression="lBonus" UniqueName="lBonus">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="lQuantity" ReadOnly="True" HeaderStyle-Width="12%" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign = "Left"

 

 

SortExpression="lQuantity" UniqueName="lQuantity">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="lMinQuantity" ReadOnly="True" HeaderStyle-Width="15%" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign = "Left"

 

 

SortExpression="lMinQuantity" UniqueName="lMinQuantity">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridTemplateColumn ItemStyle-HorizontalAlign="Left" UniqueName="Qty" HeaderStyle-HorizontalAlign="Left" DataField="lMinQuantity">

 

 

<HeaderStyle />

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

<ItemTemplate>

 

 

<asp:TextBox ID="txtQty" Width="70px" height="14px" MaxLength="4" runat="server" onKeyPress="return checkNumeric(event)"></asp:TextBox>

 

 

</ItemTemplate>

 

 

</radG:GridTemplateColumn>

 

 

<radG:GridTemplateColumn ItemStyle-HorizontalAlign="Left" UniqueName="Qty" HeaderStyle-HorizontalAlign="Left" Display="false">

 

 

<HeaderStyle Width="0px" />

 

 

<ItemStyle width="0px" />

 

 

<ItemTemplate>

 

 

<asp:HiddenField ID="hdnQty" runat="server" value='<%#DataBinder.Eval(Container.DataItem,"lMinQuantity") %>'></asp:HiddenField>

 

 

</ItemTemplate>

 

 

</radG:GridTemplateColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings>

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="true" ScrollHeight="200px" />

 

 

</ClientSettings>

 

 

</radG:RadGrid>

Regards,
Preethi D

 

Preethi
Top achievements
Rank 1
 answered on 09 Sep 2011
0 answers
103 views
Hi Team,
I have a radgrid with a radcombobox in EditItemTemplate.
When for the first time I click the mouse on RadCombo, ItemRequest event fires and shows me tha data.
But when I input the Text in it, it doesnt fire the event again.

This is my aspx :
<telerik:RadGrid ID="rgCSTaskComponents" runat="server" 
            OnNeedDataSource="rgCSTaskComponents_NeedDataSource"
            OnInsertCommand="rgCSTaskComponents_InsertCommand"
            OnUpdateCommand="rgCSTaskComponents_UpdateCommand"
            OnDeleteCommand="rgCSTaskComponents_DeleteCommand"
            OnItemCommand="rgCSTaskComponents_ItemCommand"
            OnItemDataBound="rgCSTaskComponents_OnItemDataBound"
            OnItemCreated="rgCSTaskComponents_ItemCreated"
            AutoGenerateColumns="False" PageSize="15" AllowFilteringByColumn="true"
            PagerStyle-AlwaysVisible="true" PagerStyle-Mode="NextPrevAndNumeric">
           <MasterTableView  AutoGenerateColumns="False" DataKeyNames="CSTaskComponentID" DataMember="CSTaskComponents"
                            CommandItemDisplay="Top">
             <ExpandCollapseColumn Visible="False">
                <HeaderStyle Width="20px" />
             </ExpandCollapseColumn>
             <EditFormSettings>
                 <EditColumn UniqueName="EditCommandColumn">
                </EditColumn>
            </EditFormSettings>
            <Columns>
            <telerik:GridTemplateColumn HeaderText="Part Item" UniqueName="PartItem"  DataField="DisplayName"
                      DataType="System.String"  AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                                                         FilterControlWidth="80%">
                    <ItemTemplate>
                        <asp:Label ID="lbl_DisplayName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DisplayName")%>'>
                        </asp:Label>
                    </ItemTemplate>                   
                    <EditItemTemplate>
                             <telerik:RadComboBox ID="rcbSKU" runat="server"
                                             AutoPostBack="true"
                                             Width="180px"
                                             MarkFirstMatch="true"
                                             DataTextField="DisplayName"
                                             DataValueField="PartItemID"
                                             OnItemsRequested="rcbSKU_ItemsRequested"
                                             EnableLoadOnDemand="true"
                                             ShowMoreResultsBox="true"
                                             ItemRequestTimeout="5"
                                             AllowCustomText="true" >
                           </telerik:RadComboBox>   
                    </EditItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" Width="40%" />
                    <ItemStyle HorizontalAlign="Left" Width="40%" />                   
                </telerik:GridTemplateColumn>          
         
        </Columns>
                </MasterTableView>
            </telerik:RadGrid>

and this is my cs side :
protected void rcbSKU_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
      {
          LoadSKUForDropDown();
          //RadComboBox rcbSKU = rgCSTaskComponents.MasterTableView.Items[0].FindControl("rcbSKU") as RadComboBox;
          RadComboBox rcbSKU = (RadComboBox)o;
          rcbSKU.Items.Clear();
          string text = e.Text;
 
          try
          {
              DataRow[] rows = mSKUDataTable.Select("DisplayName LIKE '" + text + "*'", "DisplayName");
 
              int itemsPerRequest = 10;
              int itemOffset = e.NumberOfItems;
              int endOffset = itemOffset + itemsPerRequest;
              if (endOffset > rows.Length)
              {
                  endOffset = rows.Length;
              }
 
              for (int i = itemOffset; i < endOffset; i++)
              {
                  rcbSKU.Items.Add(new RadComboBoxItem(rows[i]["DisplayName"].ToString(), rows[i]["PartItemID"].ToString()));
              }
              if (rows.Length > 0)
              {
                  e.Message = String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset.ToString(), rows.Length.ToString());
              }
              else
              {
                  e.Message = "No matches";
              }
          }
          catch (Exception ex)
          {
              ex.Source = this.AppRelativeVirtualPath;
              e.Message = "No matches";
          }
      }

Waiting for your positive and quick reply,
Regards,
Lok..

Lokesh
Top achievements
Rank 1
 asked on 09 Sep 2011
2 answers
151 views


Hi,

I am using Radgrid with Hierarchy concept. The Main Table has a Total amount and the detail table also have another total amount. In the Footer i need to get the sum of both tables. For eg: i have given the grid sample below

SNo      Item Name        Unit        Qty      Price       Total
1.          Item1                Nos        10       100          1000             ----> Main Table
             SNo        Item Name     Unit         Qty         Total
              1.           ItemDetail1      Nos        10          500              --->Detail Table
              2.           ItemDetail2      Nos         5           250
2.        Item2               Nos            20        100        2000          
 
                                                               Total :     3750             ----> Footer Total

Please guide me in this regards

Thanks
Kannan. S




Kannan
Top achievements
Rank 1
 answered on 09 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?