Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
74 views
Hello,

I need the localizationfile for the RADTreeList control but I cannot find it in my installfiles (Telerik\RadControls for ASP.NET AJAX Q3 2010\App_GlobalResources). Is it a shared file?

Thx in advance

Daniel
Telerik team
 answered on 14 Jun 2011
1 answer
57 views
I have a RadGrid where multiple rows can be selected.  But whatever 1 Row the user clicks on, that is the one I want to show the details for.  Currently, if I click on a Row that has NOT been selected already, I can get the ID using RadGrid.SelectedValue.  But if I click on a Row that has been ALREADY selected, I get the ID of the Row that was selected BEFORE the currently selected Row.  Should I be getting it some other way? 

thanks

mark

Code:

 

<P>protected void radgridSearchResults_SelectedIndexChanged(object sender, 
EventArgs e)<BR>        
{<BR>            //get 
the Selected Row and populate the 
Details...<BR>            
try<BR>            
{<BR>                
if (radgridSearchResults.SelectedValue != 
null)<BR>                
{<BR>                    
//GridDataItem dataItem = 
(GridDataItem)radgridSearchResults.SelectedItems[radgridSearchResults.SelectedItems.Count 
1];<BR>                    
//int selectedIndex = 
int.Parse(ViewState["CurrentRowIndex"].ToString());<BR>                    
//GridDataItem dataItem = 
(GridDataItem)radgridSearchResults.SelectedItems[selectedIndex];<BR>                    
//var scriptId = dataItem.GetDataKeyValue("id").ToString();</P>
<P>                    
var scriptId = radgridSearchResults.SelectedValue.ToString();</P>
<P>                    
                    
ViewState[Globals.CurrentScriptId] = scriptId;<BR>                    
//Pass Id to another function...
setDetails(
int.Parse(scriptId.ToString()));<BR>                    
}<BR>            
}<BR>            catch 
(System.Exception 
ex)<BR>            
{<BR>                
//Error code removed....
return
;<BR>            
}<BR>        }</P>
Vasil
Telerik team
 answered on 14 Jun 2011
0 answers
100 views

Hi,


I have one rad combo box. I have to fill it with options array in java script.Here is code.

I am using one function for adding options to combo box.here is the function .

   function addOption(selectbox, text, value) {
                var optn = document.createElement("OPTION");
                optn.text = text;
                optn.value = value;
                selectbox.options.add(optn);

            }
And I am looping and adding options to combobox.

 for (var i = 0; i < strArray.length; i++) {

                addOption($find("<%= SavedPresetMenu.ClientID %>"), strArray1[i], strArray[i]);
                } Here SavedPresetMenu is rad combobox Id.In the above function I am getting one javascript error.
selectbox.options is undefined.And if I clear options array also getting same error.

 $find("<%= SavedPresetMenu.ClientID %>").options.length = 0;
In this line also getting  same error. How to use rad combobox in this situation.

Any ideas, suggestions would be greatly appreciated.


Thanks,
Bhagath.






Bhagath Reddy
Top achievements
Rank 1
 asked on 14 Jun 2011
3 answers
705 views
I have experienced lots of problems with the RadCombobox control with trying to bind it while having Enableloadondemand set to true
I'm currently binding on my gridview OnDataBound event by creating a single item and inserting it at index 0.

Now when i need to change te selected Item the enableloadondemand fires correctly and loads items filtered on the text typed in the text area.

after selecting an item the OnSelectedIndexchanged event fires and the radcombobox text is updated to the text of the selected item.
however the Value never gets updated and I will have to perform another query to my recordset to select the value.

Since the text gets updated normally when selecting a different item how come the value doesn't ?
i have a snippet with how i handle the selectedindexchanged event.

protected void RCB1_Selectedindexchanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
    RadComboBox rcb = (RadComboBox)sender; // combobox that fires event
    string hi = rcb.SelectedValue; // combobox value, always old value
    string ha = rcb.Text; // combobox text, always text from newly selected item
    string hu = e.OldValue; // working correctly always value of previously selected item
    string ho = e.OldText; //working correctly always text of previously selected item
    string he = e.Value; // not working as one would expect it to work, always OLD value
    string hy = e.Text; // working as expected always NEW text
    string hiy = rcb.SelectedItem.Value; // Always old value
    string hyi = rcb.SelectedItem.Text; // always old value
    DataView dv = (DataView)SqlDataSource2.Select(new DataSourceSelectArguments());
    string huu; // correct value after looping through intire datasource, would like to avoid this 
    foreach (DataRowView row in dv)
    {
        if (row["Naambedrtot"].ToString() == rcb.Text)
        {
            huu = row["klantnummer"].ToString();
        }
    }
    if (e.OldValue != e.Value) // always the same so selected value never gets changed
    {
        rcb.SelectedValue = e.Value;
    }
}

Is this the correct behavior ?

I would think that if you can send the correct new text , the new value should be simple too.
Carlos Franken
Top achievements
Rank 1
 answered on 14 Jun 2011
5 answers
181 views
Hi,

I am using  grdiview in a radtooltip the problem is that when user click on a checkbox in a radtooltip the tooltip disappears which I really don't want.

                        <telerik:RadToolTip ID="RadToolTipJobStatus" runat="server" CssClass="tooltipBackColor"
                            ManualClose="true" ManualCloseButtonText="Close" TargetControlID="lblJobStatus"
                            RelativeTo="Element" HideDelay="4000" HideEvent="LeaveTargetAndToolTip" ShowCallout="true"
                            Position="TopRight" Width="550px" Height="200px">
                            <asp:GridView ID="gvJobStates" runat="server" AutoGenerateColumns="False" ShowHeader="true"
                                OnRowDataBound="gvJobStates_RowDataBound" Width="100%" OnRowCreated="gvJobStates_RowCreated">
                                <HeaderStyle BackColor="SkyBlue" />
                                <Columns>
                                    <asp:TemplateField SortExpression="JobStateName">
                                        <HeaderTemplate>
                                            <asp:Label ID="lblHeader" Text="Stage" runat="server"></asp:Label>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="lblJobStateName" runat="server" Text='<%# Eval("JobStateName") %>'
                                                Font-Bold='<%# Eval("IsCompleted")%>' />
                                            <asp:HiddenField ID="hidJobStateKey" runat="server" Value='<%# Eval("ID")%>' />
                                            <asp:HiddenField ID="hidJobKey" runat="server" Value='<%# Eval("JobID")%>' />
                                        </ItemTemplate>
                                        <ItemStyle Width="45%" />
                                    </asp:TemplateField>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            <asp:Label ID="Label1" Text="Marked By" runat="server"></asp:Label>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="lblUserName" runat="server" />
                                        </ItemTemplate>
                                        <ItemStyle Width="45%" />
                                    </asp:TemplateField>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            <asp:Label ID="Label2" Text="Completed" runat="server"></asp:Label>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="cbIsCompleted" runat="server" AutoPostBack="true" OnCheckedChanged="cbIsCompleted_CheckedChanged"
                                                Checked='<%# Eval("IsCompleted")%>' ValidationGroup='<%# Eval("ID")%>' />
                                        </ItemTemplate>
                                        <ItemStyle Width="10%" HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </telerik:RadToolTip>

Marin Bratanov
Telerik team
 answered on 14 Jun 2011
2 answers
100 views
Hello ,
i need to put a button that clears all filters in grid's columns so i want to put this button as a filter template in GridClientSelectColumn ,
i tried this but the button doesn't appear in UI.
any ideas ?

Thanks
Karam
Top achievements
Rank 2
 answered on 14 Jun 2011
2 answers
125 views

Hi,

ich have trouble with the RadRibbonBar and the RadSplitter. It seems to me that the combination of both is a little bit tricky.

When I use the RadRibbonBar above the RadSplitter on the MasterPage with 100% height to the RadSplitter the the RadSplitter will use more than 100% of the window size. It looks like the RadSplitter use exactly 100% of the window height plus the height of the RadRibbonBar.

When I put the RadRibbonBar into the RadSplitter (in another RadPade) the height Problem is solved bit I have problems with the RibbonBarMenuItem. When I open a Menue from the RadRibbonBar the MenueItems are behind the lower RadPade of the RadSplitter.

How Can I solve this?

Cheers

   Carsten

 

Carsten
Top achievements
Rank 1
 answered on 14 Jun 2011
4 answers
86 views
Hi guy,

Just want to know if it is possible to have a radGrid with his height set to 100% and with a scrollbar, because everytime I tried, it really don't work. By exemple, I took this example and I put the height of the grid to 100% and it start f*** up. Here is the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<head id="Head1" runat="server">
</head>
<body class="BODY">
    <form runat="server" id="mainForm" method="post">
       <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
 
        <br />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="CheckBox1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="CheckBox2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="CheckBox3">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="CheckBox4">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="DropDownList1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" ShowFooter="True" GridLines="None"
            AllowSorting="True" Width="750px" Height="100%" runat="server" AutoGenerateColumns="false">
            <PagerStyle Mode="NumericPages" />
            <MasterTableView Width="100%">
                <Columns>
                    <telerik:GridBoundColumn UniqueName="ProductID" DataField="ProductID" HeaderText="ProductID"
                        SortExpression="ProductID" Aggregate="Count" />
                    <telerik:GridBoundColumn UniqueName="ProductName" DataField="ProductName" HeaderText="ProductName"
                        SortExpression="ProductName" Aggregate="None" />
                    <telerik:GridBoundColumn UniqueName="QuantityPerUnit" DataField="QuantityPerUnit"
                        HeaderText="Quantity Per Unit" SortExpression="QuantityPerUnit"/>
                    <telerik:GridNumericColumn Aggregate="Avg" DataField="UnitPrice" HeaderText="Unit price"
                        SortExpression="UnitPrice" UniqueName="UnitPrice" DataFormatString="{0:C}"
                        FooterAggregateFormatString="Avg: {0:C}" />
                    <telerik:GridNumericColumn Aggregate="Sum" DataField="UnitsInStock" HeaderText="In Stock"
                        SortExpression="UnitsInStock" UniqueName="UnitsInStock" />
                    <telerik:GridNumericColumn Aggregate="Max" DataField="UnitsOnOrder" HeaderText="Units On Order"
                        SortExpression="UnitsOnOrder" UniqueName="UnitsOnOrder" />
                </Columns>
            </MasterTableView>
            <HeaderStyle Width="200px" />
            <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True">
                </Scrolling>
            </ClientSettings>
        </telerik:RadGrid>
        <br />
        <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            ProviderName="System.Data.SqlClient" SelectCommand="SELECT TOP 20 ProductID, ProductName, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder FROM Products"
            runat="server"></asp:SqlDataSource>
    </form>
</body>
</html>


So, anyone have a solution to correct this problem ?
Thank you

David Lefaivre-B.
Pavlina
Telerik team
 answered on 14 Jun 2011
4 answers
81 views
Hello Every One ,

How To Fire RadGrid1_ItemCreated to RadGrid1_ItemCommand
please reply soon

Thanks,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 14 Jun 2011
1 answer
50 views
Hi,

I have a radgrid on my page. It works fine when there are rows, but whenever there are no rows, it displays the solid line in place of the grid. I want to display header without any rows if there are no rows or if this is not possible then is it possible to make th grid invisible, I mean I don't want to see the solid line either. I am already setting

ShowHeadersWhenNoRecords

 

 

="true"

 

 in my masterTableView.

Thanks.

Pavlina
Telerik team
 answered on 14 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?