Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
121 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
143 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
112 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
112 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
81 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
5 answers
92 views
How do you prevent a row from appearing as selected when you check the checkbox on a selection column.  Basically I don't want the row to become highlighted I want it to appear as a standard row would appear.    I tried setting <SelectedItemStyle CssClass="rgRow"/> but that  has no effect. 
Radoslav
Telerik team
 answered on 14 Jun 2011
2 answers
422 views
Hi,

I'm new to Rad Controls, can any one please help me to resolve this issue

I have one RadGrid, in this I placed one gridtemplatecolumn which contains one panel. This panel contains two buttons and one label. I'm using this panel as popup.

My problem is when i click on fist button(Delete) the row should delete and when I click on link(Cancel) the panel should hide.
I'm not getting how to access this button and link in code behind.

this is my code..

<Code>
<telerik:GridTemplateColumn UniqueName="DeletePopup">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="PopupImgButton" CssClass="useredit" Text="Delete"
                                                runat="server" OnClientClick="this.disabled=true;__doPostBack(this.name,'');return false;" />
                                            <asp:Panel ID="PopUpPanel" runat="server" BackColor="White" BorderColor="Red" BorderStyle="Solid"
                                                BorderWidth="1px" Width="809px" Height="25px" CssClass="edit">
                                                <div>
                                                <asp:Button ID="Button1" runat="server" Text="Delete" CommandName="Deletebtn" OnClientClick="this.disabled=true;__doPostBack(this.name,'');" />
                                                    <asp:Label ID="Label1" runat="server"  Text="Are you sure you want to delete [John Smithfield]? This cannot by undone."></asp:Label>
                                                    <a href="#" class="NormalCloseLink" style="padding-left:300px;color:Blue">CANCEL</a>
                                                </div>
                                            </asp:Panel>
                                            <asp:PopupControlExtender ID="ImgPopupControlExtender" runat="server" TargetControlID="PopupImgButton"
                                                PopupControlID="PopUpPanel" Position="Top" OffsetX="-745" OffsetY="7">
                                            </asp:PopupControlExtender>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
 </Code>

please give me some solution for this...
Naresh
Top achievements
Rank 1
 answered on 14 Jun 2011
0 answers
251 views
i am having a similar problem, i am binding my radgrid to a datatable created manually after converting an xml to datatable, but update command doest give updated values,

here is my grid code

<telerik:RadGrid runat="server" ID="gvTable" AllowPaging="True" Skin="Vista" PageSize="100"
            AllowSorting="True" ClientSettings-DataBinding-EnableCaching="true" GridLines="None"
            AutoGenerateEditColumn="True" AutoGenerateDeleteColumn="True"
            AllowAutomaticUpdates="False" OnUpdateCommand="gvTable_UpdateCommand"
            OnInsertCommand="gvTable_InsertCommand"
             AllowAutomaticDeletes="True"
            AllowAutomaticInserts="True" onneeddatasource="gvTable_NeedDataSource">
            <ExportSettings FileName="Order Details" IgnorePaging="True" ExportOnlyData="true">
            </ExportSettings>
            <ClientSettings EnableRowHoverStyle="True" Selecting-AllowRowSelect="true">
                <DataBinding EnableCaching="True">
                </DataBinding>
                <Selecting AllowRowSelect="True"></Selecting>
            </ClientSettings>
            <MasterTableView InsertItemPageIndexAction="ShowItemOnCurrentPage" EnableHeaderContextMenu="True"
                CommandItemDisplay="Top" EditMode="InPlace" DataKeyNames="">
                <CommandItemSettings ShowExportToExcelButton="true" AddNewRecordText="" ShowAddNewRecordButton="False" />
                <Columns>
                </Columns>
                <HeaderStyle Font-Bold="False" />
            </MasterTableView>
            <PagerStyle Mode="NextPrevAndNumeric" />
        </telerik:RadGrid>

here is where i am assigning the datatable to grid on button click

        this.gvTable.DataSource = dataTable;
        Session["DataSource"] = dataTable;
        this.gvTable.MasterTableView.DataKeyNames = GetColNames(dataTable); // Gets the column names of the datatable and returns as string[]
        this.gvTable.DataBind();

here is the pageload event, its empty

protected void Page_Load(object sender, EventArgs e)
    {
}

here is the need datasource

protected void gvTable_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    DataTable dt = this.GridSource;
    this.gvTable.DataSource = dt;
    this.gvTable.MasterTableView.DataKeyNames = GetColNames(dt);
}

here is the gvTable_UpdateCommand
protected void gvTable_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
 
        GridEditableItem editedItem = e.Item as GridEditableItem;
        DataTable ordersTable = this.GridSource;
        //Locate the changed row in the DataSource
        DataRow[] changedRows = ordersTable.Select("col1 = " + editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["col1"].ToString());
        //editedItem["Item"].Controls[0]
        if (changedRows.Length != 1)
        {
            this.Label1.Text += "Unable to locate the Order for updating.";
            e.Canceled = true;
            return;
        }
        //Update new values
        Hashtable newValues = new Hashtable();
        e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);
        changedRows[0].BeginEdit();
        try
        {
            foreach (DictionaryEntry entry in newValues)
            {
                changedRows[0][(string)entry.Key] = entry.Value;
            }
            changedRows[0].EndEdit();
            Label1.Text = "Successfully updated";
        }
        catch (Exception ex)
        {
            changedRows[0].CancelEdit();
            Label1.Text += "Unable to update Orders. Reason: " + ex.Message;
            e.Canceled = true;
        }
    }

PROBLEM:
editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["col1"].ToString()
this line in the above function always gives old values, cant figure out why, please help, thanks


i have used the code from this page
http://www.telerik.com/help/aspnet-ajax/grid-updating-inplace-and-editforms.html
sohaib
Top achievements
Rank 1
 asked on 14 Jun 2011
2 answers
97 views
Hi friends

i am Srinivas

In my project i am using RadGrid. in my RadGrid i have a Asp label for Displaying a data form Backend tables. now i want to get the value from Asp label when i am click on RadDatePicker using Java Script.

I tried to get the Label Value in Java script like the Following Way but returns null value.

function dateselect(sender, args) {


        var rdgrid = $find("<%=RadGrid1.ClientID %>");
        var cell = sender.get_element().parentNode.parentNode;
        var index = cell.parentNode.rowIndex;
        var MasterTable = rdgrid.get_masterTableView();
        var row = MasterTable.get_dataItems()[index - 3]; //getting row
        var textbox = document.getElementById("lot_id");
        alert(textbox);
       

i want to get the label value in the current row.. 

Please help me

Thanks 

D.Srinivasa

D.SRINIVASA
Top achievements
Rank 2
 answered on 14 Jun 2011
6 answers
98 views
Hi !

I have the latest (Q1 2011) Version of Telerik WebUI.

When i create a Scheduler with Appointments, with very long subject Texts, i have this issue:

- I add an Background Color to each Appointment (Appointment.BackColor), because the appointments are delivered from an
existing windows based system, and need to be shown in Telerik with the same colors. If the subject text is very long, it will be line breaked, and outlined outside the appointmentment, directly in the radscheduer (see attached ScreenShot)

- As long as the Appointments have an CSS Style other than rsCategorySilver and no special backgroundcolor they are displayed correctly (Text is cutted before the end of the appointment)

Do you know, how to solve this issue ? I need many kind of different Background Colors.

with best regards
Markus



Ivan Zhekov
Telerik team
 answered on 14 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?