Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
147 views

Hi,

           I have a problem in my page that is in my aspx page  contains RadTextbox, RadComboBox and RadEditor.  In the top of the  I have  placed radtextbox  and placed the radcombox below to the radtextbox then placed the radeditor.  

   

     My problem is if radtextbox is at top then radcombo and rad editor is not working also it will displayed without skin. If radeditor is at top then combo will not works also displayed without style.

 

      Then I have removed the radtextbox.  Radcombo is at top now radeditor will not works. If i placed  the radeditor in top of the page then radcombo will not works. I have attached the image of the radeditor, which displays without skin when radcombo is at top.

Thanks

Velkumar  

Rumen
Telerik team
 answered on 02 Jul 2012
2 answers
191 views
I have two radgrid controls in a window. Both of the grids initially utilize the same data and both are bound to the underlying data.
In grid1 the last column is a checkbox to which I have attached a click event. What I need to do, because of the way the underlying data will be used, when the checkbox in grid1 is clicked, the corresponding row checkbox in grid2 becomes checked, and I need this to be client-side.

What I have done is use javascript to get the checkbox id, change the reference from grid1 to grid2 and update the related checkbox in grid2 to the checked state of the item in grid1. This works as expected for only the first item in grid1. After some digging, I have found that the checkboxes in grid2 are not numbered in the same fashion as those in grid1, despite having the same columns, data and controls.

For example, the checkbox ID in row0 is grid1_ctl00_ctl04_cbxConfirm. The checkbox in the second grid is grid2_ctl00_ctl04_cbxConfirm. When I look at row1, the source ID is grid1_ctl00_ctl05_cbxConfirm, but the destination is grid2_ctl00_ctl06_cbxConfirm. It seems that checkboxes in grid1 are incremented by 1 for each row, while in grid2, the checkbox ID is being incremented by 2 for each row.

I am not creating any other controls (both grids are identical)

Is there a better way to handle this update?
Is there something I need to look at regarding the control incrementing?

Thanks
Keith
Top achievements
Rank 2
 answered on 02 Jul 2012
0 answers
97 views
Hello.

My grid bound column contains html markup like <table><tr><td>MyText</td></tr></table>
If i right click on this cell i see browser context menu.  Can i do that i see context menu?

Best Regards,
Alexandr.
Петряков
Top achievements
Rank 1
 asked on 02 Jul 2012
2 answers
410 views

The text in my radgrid is bleeding into the next field. I have tried fixing the issue using CSS, but, I'm not getting the desired results. Here is my code.
<script type="text/css">
.RadGrid .rgHeader, 

.RadGrid .rgEditRow td,

.RadGrid .rgRow td,

.RadGrid .rgAltRow td

{

white-space : nowrap !important;

overflow : hidden !important;

text-overflow : ellipsis !important;

table-layout : fixed !important;

}

</script>

 

<telerik:RadScriptManager ID="ScriptManagerAggressiveMatches" runat="server" EnableTheming="True">

 </telerik:RadScriptManager>

 

<telerik:RadGrid ID="RadGridAggressiveMatches" runat="server" DataMember="Aggressive Members" AutoGenerateEditColumn="True" GridLines="None" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" ShowFooter="True" Skin="Office2007" PageSize="50">

<ItemStyle Width="20px" />

<PagerStyle Mode="NumericPages" NextPageText="Next" PrevPageText="Previous" />

<MasterTableView Width="98%" TableLayout="Fixed">

<
RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>  

</RowIndicatorColumn

<
ExpandCollapseColumn>

 <HeaderStyle Width="20px"></HeaderStyle>

 </ExpandCollapseColumn>

 

 </MasterTableView
 

<ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">

<Selecting AllowRowSelect="True" />  

<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings
 

<FilterMenu EnableTheming="True">  

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>  

</FilterMenu>

</telerik:RadGrid>

 



Jayesh Goyani
Top achievements
Rank 2
 answered on 02 Jul 2012
1 answer
116 views
I would like to get the value of the DataValueField on Item Click and use that value for the Items Expanded. Something like below.
Protected Sub RadPanelBar1_ItemClick(sender As Object, e As Telerik.Web.UI.RadPanelBarEventArgs) Handles RadPanelBar1.ItemClick
 
    Dim Extend = RadPanelBar1.DataValueField
 
    RadPanelBar1.Items(Extend).Expanded = True
 
End Sub


Is this possible?
Kate
Telerik team
 answered on 02 Jul 2012
1 answer
668 views
Hi,

I need to check if a GridButtonColumn was clicked client-side and I also need to know for which row this was.
Getting the event was easy, I subscribed to the OnCommand client event and check if it is my button:

function OnCommand(sender, args) {
   if (args.get_commandName() == "MyCommand") {
      args.set_cancel(true);
      // need to get the current row
   }
}

But how can I access the row in which the button was clicked?

Thanks!

Edit: I just saw how to acccess the row index:
var rowIndex = args.get_commandArgument();

But how can I access the dataKeyValue of this row?
Shinu
Top achievements
Rank 2
 answered on 02 Jul 2012
1 answer
79 views
hi
i have created a recurrence event say on 6/29/2012 that is weekly so it will also occur on next week 7/6/2012 .But in database i have only one entry with a single ID. So how can i differentiate between both appointment in the terms of any unique id or whatever being is possible.
Plamen
Telerik team
 answered on 02 Jul 2012
5 answers
290 views
Hi,

I can't force following code to work, meaning the values of the decimals are multiplied by 100 and no combination of DecimalSeparator nor DecimalDigits nor Culture setting renders 5.19m as 5,19 (or 5.19 for that matter) - the result is always 519

<%@ Page Language="C#" AutoEventWireup="true"  %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager runat="server" ID="ScriptManager1">
    </asp:ScriptManager>
    <script type="text/C#" runat="server">
     
        protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            System.Data.DataTable table = new System.Data.DataTable();
            table.Columns.Add("ID", typeof(int)); 
                       
            table.Columns.Add("pct", typeof(decimal));
            table.Rows.Add(1, 5.19m);
            table.Rows.Add(2, 99.49m);
            table.Rows.Add(3, 19.69m);
            table.Rows.Add(4, 5.99m);
  
            RadGrid1.DataSource = table;
        }
      
    </script>
      <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" OnNeedDataSource="RadGrid1_NeedDataSource">
        <MasterTableView>
            <Columns>
                <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID" UniqueName="ID">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn UniqueName="perComplete" HeaderText="Percent Complete"
                    AllowFiltering="false">
                    <ItemTemplate>
                        <telerik:RadNumericTextBox ID="pct"  runat="server" Text='<%#Eval("pct") %>'  Width="70px">
                            <NumberFormat AllowRounding="false" />                           
                        </telerik:RadNumericTextBox>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
    </div>
    </form>
</body>
</html>
Vasil
Telerik team
 answered on 02 Jul 2012
2 answers
543 views
I watched the following demo (  RadGrid for ASP.NET AJAX - Declarative Client-Side Binding, Pt. 1 )

What I am trying to figure out is the best approach for a loading spinner icon... I found an example: (  Grid / Programmatic Binding   )
But I can't get the Loading panel to show on mine. 

I build the exact same demo (northwind) in the Demo  RadGrid for ASP.NET AJAX - Declarative Client-Side Binding, Pt. 1,   I just not sure how to get the loading Spinner to show up via client side code....


Daniel
Telerik team
 answered on 02 Jul 2012
1 answer
133 views
I am having my design with radtabstrip and RadMultiPage as follows
<telerik:RadTabStrip ID="rdtabEmployee" runat="server" MultiPageID="rdmpPersonal"
            UnSelectChildren="True" Skin="WebBlue" EnableEmbeddedSkins="False" ClickSelectedTab="True"
            SelectedIndex="0" OnTabClick="tabClick">
            <Tabs>
                <telerik:RadTab runat="server" Text="Personal" PageViewID="rdpgPersonal">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Contact" PageViewID="rdpgContact">
                </telerik:RadTab>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="rdmpPersonal" runat="server">
            <telerik:RadPageView ID="rdpgPersonal" runat="server" Selected="true">
                <telerik:RadPanelBar runat="server" ID="rdpnlPersonal" ExpandMode="FullExpandedItem"
                    Skin="Vista" EnableEmbeddedSkins="false" Width="880px">
                    <Items>
                        <telerik:RadPanelItem Expanded="true" Text="Employee Personal Information" runat="server"
                            Selected="true">
                            <Items>
                                <telerik:RadPanelItem Value="AccountInformation" runat="server">
                                    <ItemTemplate>
                                        <label>
                                            Demop
                                        </label>
                                        <telerik:RadDatePicker ID="RadDatePicker1" Width="200px" runat="server" MinDate="1900-01-01"
                                            TabIndex="5">
                                            <Calendar ID="Calendar1" RangeMinDate="1900-01-01" runat="server">
                                            </Calendar>
                                        </telerik:RadDatePicker>
                                        <telerik:RadDatePicker ID="radDtHiredate" Width="200px" runat="server" MinDate="1900-01-01"
                                            TabIndex="5">
                                            <Calendar ID="calHire" RangeMinDate="1900-01-01" runat="server">
                                            </Calendar>
                                        </telerik:RadDatePicker>
                                        <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="validatehiredate"
                                            SetFocusOnError="true" ControlToValidate="RadDatePicker1" ValidationGroup="accountValidation"
                                          ForeColor="Red"  Display="Dynamic">Can not Hire Guy less than 18 yrs</asp:CustomValidator>
                                        <br />
                                        <button onclick="javascript: NextDay(event); return false">
                                            Move to next day</button>
                                        <telerik:RadButton ID="rdbtnpersonalSaveNext" ValidationGroup="accountValidation"
                                            OnClick="rdbtnpersonalSaveNext_Click" TabIndex="11" runat="server" Text="Save & Next">
                                        </telerik:RadButton>
                                    </ItemTemplate>
                                </telerik:RadPanelItem>
                            </Items>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelBar>
            </telerik:RadPageView>
            <telerik:RadPageView ID="rdpgContact" runat="server">
                <telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="FullExpandedItem"
                    Skin="Vista" EnableEmbeddedSkins="false" Width="880px">
                    <ItemTemplate>
                        <asp:TextBox ID="txtDemo" runat="server">
                        </asp:TextBox>
                    </ItemTemplate>
                </telerik:RadPanelBar>
                <label>
                    Demo Contact
                </label>
            </telerik:RadPageView>
</telerik:RadMultiPage>

When I click on second Tab and came back to first tab the custom validation which i had written fails, can some one help me..

<telerik:RadCodeBlock runat="server" ID="radcb">
            <script type="text/javascript" language="javascript">
                function monthDiff(d1, d2) {
                    var months;
                    var date1 = new Date(d1);
                    var date2 = new Date(d2);
                    return (date1 - date2) / (1000 * 60 * 60 * 24);
                    return months;
                }
 
                //function getLeapYear
 
                function difference(d1, d2) {
                    var diff = 18 * 12;
                    var Age = monthDiff(d1, d2);
 
                    var compareVal = 365 * 18; //getCompareVal(hiredate,dob);
 
                    if (Age >= compareVal) {
                        return true;
                        //true
                    } else {
                        return false; //false
                    }
                }
                function validatehiredate(value, arg) {
                    var datePicker = $find('<%= rdpnlPersonal.FindItemByValue("AccountInformation").FindControl("radDtHiredate").ClientID %>');
                    var datePicker1 = $find('<%= rdpnlPersonal.FindItemByValue("AccountInformation").FindControl("RadDatePicker1").ClientID %>');
 
                    var date = datePicker.get_selectedDate();
                    var date1 = datePicker1.get_selectedDate();
                    arg.IsValid = (difference(date, date1));
                }
            </script>
        </telerik:RadCodeBlock>
Dimitar Terziev
Telerik team
 answered on 02 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
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?