Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
306 views
Hello, 

Along with this post you will find a screen shot of my user control made with the RadMenu.

Basically, I need each items from the RadMenu to be the same width and also, to use all the width available.
The RadMenu consists of the grey bar that contains Quote, Purchase Order, Ready for delivery and Delivered quantity.

I also want to keep a little bit of padding on the left and right. 

I found a solution to this problem using javascript but I can't apply it to my situation because everything present in the screenshot is in a user control 
(i.e: The control contains: Picture under the blue rectangle and hom/about/logout, plus the RadMenu).

So I can't really access to the RadMenu with Javascript. 

Solution using Javascript: http://www.telerik.com/support/kb/aspnet-ajax/menu/details/stretching-menu-items-to-fill-the-entire-width-of-radmenu

Thanks for helping me out, I can provide more information if needed.
Mark
Top achievements
Rank 1
 answered on 05 Sep 2014
1 answer
240 views
Hi,
this is my code and i want old value along with new value to update record,i am done with new value but not getting idea @ old value

<telerik:RadGrid ID="RadGridTaskActivity" runat="server"
    OnNeedDataSource="RadGridTaskActivity_NeedDataSource"     onupdatecommand="RadGridTaskActivity_UpdateCommand" >
    <MasterTableView EditMode="EditForms" AutoGenerateColumns="true"
        CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="true" >
        <EditFormSettings FormMainTableStyle-HorizontalAlign="Center" EditColumn-ButtonType="PushButton"             InsertCaption="Add New Activity" >
            <FormStyle Width="100%" BackColor="LightCyan"></FormStyle>
        </EditFormSettings>
        <Columns>
            <telerik:GridEditCommandColumn HeaderStyle-Width="80px" ButtonType="ImageButton" UniqueName="EditColumn" HeaderText="Edit">
            </telerik:GridEditCommandColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

protected void RadGridTaskActivity_UpdateCommand(object sender, GridCommandEventArgs e)
       {
           GridEditableItem EditItem = e.Item as GridEditableItem;
           RadTextBox txtTestName = (RadTextBox)EditItem["ActiVityName"].FindControl("txtTestName");
           Hashtable newValues = new Hashtable();
           e.Item.OwnerTableView.ExtractValuesFromItem(newValues, EditItem);
           string NewActivityName = newValues["ActivityName"].ToString();
          //I WANT OLD ACTIVITY NAME ALSO WHICH I CAN SEE IN "GridEditableItem"
       }

Thanks.
Angel Petrov
Telerik team
 answered on 05 Sep 2014
1 answer
219 views
Hello,

I've a grid with Batch Edit Mode enabled, In this grid I have a Template column that contains a RadComboBox with Checkboxes enabled, The issue is once the save changes button is cliked and the page posts back, I cannot find a way to get the Checked checkboxes collection. Im trying to achieve this by using BatchEditCommand method.

Is there anyway to achieve this??

My grid looks like this:

<telerik:RadGrid runat="server" ID="gv_ItemGrid" PageSize="50" Skin="Office2007" AllowSorting="true" AllowMultiRowSelection="true" AllowMultiRowEdit="true" AllowPaging="True" ShowGroupPanel="false" HeaderStyle-HorizontalAlign="Center" ClientSettings-AllowKeyboardNavigation="true" AutoGenerateColumns="false" AllowAutomaticDeletes="false" AllowAutomaticInserts="false" AllowAutomaticUpdates="false" OnNeedDataSource="gv_ItemGrid_NeedDataSource"  OnItemDataBound="gv_ItemGrid_ItemDataBound" OnBatchEditCommand="gv_ItemGrid_BatchEditCommand">
<PagerStyle Mode="NextPrevAndNumeric"/>
<ClientSettings AllowRowsDragDrop="False" AllowColumnsReorder="false" ReorderColumnsOnClient="false" EnableRowHoverStyle="true">
<Resizing AllowColumnResize="false" />
<Selecting AllowRowSelect="false" EnableDragToSelectRows="false"/>
<Scrolling AllowScroll="false" UseStaticHeaders="false"/>
<ClientEvents OnBatchEditOpening="batchEditOpening" OnBatchEditOpened="batchEditOpened" />
</ClientSettings>
<MasterTableView Name="gv_Items" CommandItemDisplay="Top" EditMode="Batch" DataKeyNames="PK">
<Columns>
<telerik:GridBoundColumn UniqueName="PK" DataField="PK" HeaderText="PK" Display="false"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn UniqueName="ItemCode" DataField="ItemCode" HeaderText="Item Code" SortExpression="ItemCode" HeaderStyle-Width="70px"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn UniqueName="Locations" DataField="Locations" HeaderText="Allocated to" HeaderStyle-Width="100px" Display="false"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn UniqueName="ItemDescription" HeaderText="Item Name" DataField="ItemDescription" HeaderStyle-Width="200px" ></telerik:GridBoundColumn>
    <telerik:GridBoundColumn UniqueName="ManufactureDescription" HeaderText="Manufacture Description" DataField="ManufactureDescription" HeaderStyle-Width="100px" ></telerik:GridBoundColumn>
    <telerik:GridNumericColumn UniqueName="Cost" HeaderText="Cost" DataField="Cost" NumericType="Currency" DecimalDigits="2" AllowRounding="false" HeaderStyle-Width="60px" ></telerik:GridNumericColumn>
    <telerik:GridTemplateColumn UniqueName="CategoryIDs" HeaderText="Category Allocation" HeaderStyle-Width="300px" >
    <ItemTemplate>
        <asp:Label ID="lblCategoryLine" runat="server" Text='<%# Eval("CategoryIDs") %>' ></asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadComboBox runat="server" EnableLoadOnDemand="true" ID="RadComboBox1" OnItemsRequested="RadComboBox1_ItemsRequested" DataTextField="LineCatDesc" DataValueField="seq" Skin="Office2007" MaxHeight="120px" Width="400px" CheckBoxes="true" EnableCheckAllItemsCheckBox="true"></telerik:RadComboBox>
    </EditItemTemplate>
        </telerik:GridTemplateColumn>
    <telerik:GridCheckBoxColumn UniqueName="active" HeaderText="Active" DataField="active" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="30px" ></telerik:GridCheckBoxColumn>
    <telerik:GridCheckBoxColumn UniqueName="isFilter" Display="false" HeaderText="Reports Filter" DataField="isFilter" ItemStyle-HorizontalAlign="Center"></telerik:GridCheckBoxColumn>
    <telerik:GridButtonColumn Visible="true" ConfirmText="Delete this Item?" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
    <HeaderStyle Width="30px" />
    <ItemStyle HorizontalAlign="Center"/>
    </telerik:GridButtonColumn>
    </Columns>
        <CommandItemSettings ShowRefreshButton="false"  />
</MasterTableView>
</telerik:RadGrid>


and below my code behind scenes :D

protected void gv_ItemGrid_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
        {
            foreach (GridBatchEditingCommand command in e.Commands)
            {
 
                if (command.Type == GridBatchEditingCommandType.Update)
                {
                    Hashtable newValues = command.NewValues;
                    Hashtable oldValues = command.OldValues;
                    RadComboBox ddlDesc = gv_ItemGrid.FindControl(gv_ItemGrid.MasterTableView.ClientID + "_CategoryIDs").FindControl("RadComboBox1") as RadComboBox;
 
                    string selectedValues = String.Empty;
                    if (ddlDesc.CheckBoxes) {
                        for (int i = 0; i < ddlDesc.CheckedItems.Count; i++)
                        {
                            selectedValues += (selectedValues == String.Empty)?(ddlDesc.CheckedItems[i] as RadComboBoxItem).Value:"," + (ddlDesc.CheckedItems[i] as RadComboBoxItem).Value;
                        }
                    }
 
                    for (int i = 0; i < ddlDesc.Items.Count; i++)
                    {
                        selectedValues += (selectedValues == String.Empty) ? ((ddlDesc.Items[i].Checked)?ddlDesc.Items[i].Value:string.Empty) : ((ddlDesc.Items[i].Checked)?"," + (ddlDesc.CheckedItems[i] as RadComboBoxItem).Value:string.Empty);
                        selectedValues += ddlDesc.Items[i].Checked.ToString();
                    }
                     
                    UBGlobal.SendEmail("Checkboxes Count", ddlDesc.Items.Count.ToString());
                }
 
                 
            }
 
        }


for statements are never happening since Item.checked and CheckedItems count is always Zero.

Any help would be greatly appreciated.

Thks in advance.
Angel Petrov
Telerik team
 answered on 05 Sep 2014
4 answers
115 views
I'm in the process of creating a custom email client using the Telerik grid and treeview controls. I have modeled some of the UI on the Telerik WebMail sample, in that the grid of email headers allows single selection in order to display the message body below. However, I also need to support multiple selection of rows and to be able to drag and drop those selected rows. I am able to do this, but there is a disturbing side effect when multiple rows are selected (via ctrl-click or select-click - no drag to select, that is turned off). Whenever additional rows are selected, it looks as if the grid is selected in much the same way as an HTML table would be if the user had clicked and dragged on the rows. The functionality of dragging and dropping works, but the highlighting of other rows that were not meant to be selected is very distracting to the user. I don't notice this behavior on other Telerik samples that demonstrate multiple selection and/or drag-drop, so I'm at a loss as to what is causing the problem on my end. Perhaps the combination of single selection and multiple selection is causing the behavior.

In any case, I have included a screenshot of what the grid looks like after the multiple selections are made in order to illustrate the problem. The rows that have a green background are the ones that I've actually meant to select, yet all of the other rows are "selected" as well - as if the user had intentionally dragged to select them.

Here is code related to the way the grid is set up in the ASPX file.
<telerik:RadGrid runat="server" ID="rgrdEmails" Height="100%" BorderWidth="0"
    AutoGenerateColumns="false" GridLines="Both" ShowGroupPanel="true"
    OnNeedDataSource="rgrdEmails_NeedDataSource" AllowMultiRowSelection="True"
    OnRowDrop="rgrdEmails_RowDrop" OnSelectedIndexChanged="rgrdEmails_SelectedIndexChanged">
    <ClientSettings AllowDragToGroup="True" EnableRowHoverStyle="true" AllowRowsDragDrop="True" EnablePostBackOnRowClick="true">
        <Selecting AllowRowSelect="true" EnableDragToSelectRows="False" />
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        <ClientEvents OnRowDblClick="grdDblClick" OnRowDropping="onRowDropping" />
    </ClientSettings>
    <MasterTableView TableLayout="Fixed" Width="100%" GroupLoadMode="Client"
        DataKeyNames="EmailId" ClientDataKeyNames="EmailId,Subject" AdditionalDataFieldNames="Date">
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="DateResult" HeaderValueSeparator=":" SortOrder="Descending" />
                </GroupByFields>
                <SelectFields>
                    <telerik:GridGroupByField FieldName="DateResult" HeaderText="Date" FormatString="{0:d}" />
                </SelectFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <Columns>
            <telerik:GridDragDropColumn runat="server" HeaderStyle-Width="18px"/>
            <telerik:GridBoundColumn DataField="From" HeaderText="From" HeaderStyle-Width="120px"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Received" HeaderText="Date" HeaderStyle-Width="150px"
                GroupByExpression="DateResult Date GROUP BY DateResult">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="EmailId" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridCalculatedColumn UniqueName="Date" DataType="System.DateTime" DataFields="Received"
                Expression="Received.ToShortDateString()" HeaderText="Date" Visible="false">
            </telerik:GridCalculatedColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Notice that I also allow double clicking a row to bring up a pop-up window. Finally, the grid is inside of a RadPane which is inside of a RadSplitter. Hopefully, that doesn't make any difference in this case.

Does anyone know a way around this issue? Any help will be appreciated.
Shark75
Top achievements
Rank 2
 answered on 05 Sep 2014
1 answer
67 views
Hai i want to open the Radwindow when i  clcik on scheduler on server side  will u please help me i am not getting the server side event
Hristo Valyavicharski
Telerik team
 answered on 05 Sep 2014
4 answers
190 views
Hello.  The RadSearchBox control doesn't seem to be registering the last few inputs on devices that are not on super fast connections.  Within the office on a T1, the control works beautifully fast.  Outside of the office, it seems to miss 1 or 2 of the last letters that were input.  Is there any way to code the control to look for any text chanaged event and to resend the filter request to the server before displaying the results or cancel the search if a keypress is detected and restart the search?  The photo is a screenshot of what is displayed after typing in "Grey", you'll noticed it missed the "y".  On slower mobile devices, it can get worse and miss entire words while it's searching.
Dimitar
Telerik team
 answered on 05 Sep 2014
1 answer
110 views
Case: In place radgrid editing.

When that grid opens, the edit form (WebUserControl) opens automatically for the last edited (saved or cancelled) row.
Please look at the attached screen and let me know the possible places in the code which initiates the opening of that edit form.

Thanks
Viktor Tachev
Telerik team
 answered on 05 Sep 2014
5 answers
216 views
Hi,

i have one problem regarding the new gantt chart and its task collection. I copied the online example "Gantt - XML Provider" and everything works fine. But when I want to get all the created tasks inside the gantt chart e.g. for saving purposes, at a server side event, the task collection is empty. It doesn't matter if I call Radgantt1.Tasks or the mehtod GetAllTasks(). I hope somebody can solve my problem as soon as possible.

Beside of that the reason why I used the the example with the XMLGanttProvider is that at first i tried to use a ObjectDatasource to populate, update and insert my gantt chart. But when i tried to insert new tasks with the integrated "Add Task" -Button nothing happend and I've got the javascript error: "w[x] is null" when I set the property  "DataObjectTypeName" to a certain object. Updating and selecting worked fine.
When i try to use explicit update and insert parameters my attached update and insert methods don't even get invoked...
So you can see that I've tried a lot of things to accomplish my goals.

Thanks,
Felix
Bozhidar
Telerik team
 answered on 05 Sep 2014
6 answers
203 views

Hi,


I had a small RadGrid with 25 columns and 17 rows.
It took 11.5 secounds for the .databind to complete after the data sourse selected event fired.

The grid has 17 coulms set to not visible.

Konstantin Dikov
Telerik team
 answered on 05 Sep 2014
0 answers
185 views
Hi
 I am use RadToolBar in my website,and below is source code


                                                                    <telerik:RadToolBar ID="Searchbar"  OnClientButtonClicking="Searchbar_OnClientButtonClicked"   style="z-index:90001"         runat="server">
                                                                    <Items>
                                                        
                                                                        <telerik:RadToolBarDropDown     ImageUrl="images/buttons/icon_search content.png">
                                                                        <Buttons>
                                                                                <telerik:RadToolBarButton Width="135px" ImageUrl="images/buttons/icon_document name.png"    Text="Document Name" ></telerik:RadToolBarButton>
                                                                                <telerik:RadToolBarButton ImageUrl="images/buttons/icon_search content.png"   Text="Content Search" ></telerik:RadToolBarButton>
                                                                                <telerik:RadToolBarButton ImageUrl="images/buttons/icon_search keyword.png"   Text="Keyword Search" ></telerik:RadToolBarButton>
                                                                                <telerik:RadToolBarButton ImageUrl="images/buttons/icon_profile search.png"   Text="Profile Search" ></telerik:RadToolBarButton>
                                                                           </Buttons>
                                                                        </telerik:RadToolBarDropDown>
                                                         
                                                        

                                                                       <telerik:RadToolBarButton   Value="TextBtn"  >
                                                                       <ItemTemplate>
                                                                           <telerik:RadTextBox ID="mainSearchTxt" onkeyup="mainSearchTxt_keyup(event,id)" EmptyMessage="Content Search" Width="220px" runat="server">
                                                                           </telerik:RadTextBox>
                                                                       </ItemTemplate>
                                                                       </telerik:RadToolBarButton>

                                                                       <telerik:RadToolBarButton    Text="Search"   ></telerik:RadToolBarButton>
                                                                    </Items>
                                                                    </telerik:RadToolBar>


And below is javascript code mainSearchTxt_keyup(event,id) function 

 function mainSearchTxt_keyup(e, id) {

//alert("Hai")

 var rtbar = $find("ctl00_ContentPlaceHolder1_Searchbar");
                var tbarbtn = rtbar.findItemByValue("TextBtn");
                var rtbox = tbarbtn.findControl("mainSearchTxt");
 
var txtval =rtbox.get_value()

}

In txtval i didnt get vlaue,but if i enable alert msg then i get value in txtval


Pls reply asap
Aravind




Aravind
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 05 Sep 2014
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?