Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
670 views
Hello, I'm having issues with the order index of my grid's columns.
I am saving the grid settings in a session variable, with the class provided here. I added a debug to see what is happening.
During the save, after i moved some column, i get this output:
Protected Overridable Sub SaveColumnSettings()
  Settings.ColumnSettings.Clear()
  Dim i = 0
  For Each column As GridColumn In Grid.MasterTableView.Columns
    Debug.Print("column no " + i.ToString() + " with OrderIndex " + column.OrderIndex.ToString())
     i += 1
    Settings.ColumnSettings.Add(GetColumnSettings(column))
  Next
.....
Output:
column no 0 with OrderIndex 2
column no 1 with OrderIndex 3
column no 2 with OrderIndex 4
column no 3 with OrderIndex 5
column no 4 with OrderIndex 6
column no 5 with OrderIndex 7.....

My grid have those settings:
<ClientSettings EnableRowHoverStyle="true"
  AllowColumnsReorder="true"
  ReorderColumnsOnClient="true"
  AllowDragToGroup="false"
  ColumnsReorderMethod="Reorder"
  AllowColumnHide="true"
  Selecting-AllowRowSelect="false">
 and my masterTableView has those settings:
<MasterTableView AllowMultiColumnSorting="false" AllowNaturalSort="true" AllowCustomSorting="true" AllowCustomPaging="true" .... >.....

Is it normal to get OrderIndex always in the same order? Does that explain why i load my grid settings i always get default order?
I save column slection too, that works really well, saved in session and saved in database. But OrderIndex... always in this order.

Anything im missing?


EDIT: i missed something... wether you hide or show a column, the order Index is always in order.
Then, any idea on how am i going to save the indexOrder of the column in my database?
Daniel
Telerik team
 answered on 29 Jan 2013
1 answer
86 views
Dear Team,
i encounter a strange behaviour of the RAD Editor within an aspdnsf Portal.
The UI looks like it's shown in the attached pictures.
Any idea if that might be Version related?
It's a cross browser issue...show in IE as well as in FF.
Rumen
Telerik team
 answered on 29 Jan 2013
1 answer
243 views
Hi,

I have a RadListView where I am dynamically creating the layout template and insert template at runtime.  Also just to let you know, I have the RadListView inside of a RadPanelBar whose ContentTemplate I am also creating at runtime.  This RandPanelBar is within a NestedGridView of a RadGrid.  All that is just an FYI as to the situation :)  I have all of this working, but I am having an issue with inserting a value into my RadListView.  I have a button that resides in the layouttemplate, where when I click it I am rebinding my listview and calling the ShowInsertItem command.  This is correctly showing my Inserttemplate items, where I have a radcombobox and radnumerictextbox. 

At this point after the user fills these things in, I have a save button that is clicked.  This is where my problems lies. I need to be able to get the values of the radCombobox and radnumerictextbox from the edit template.  I tried to access them using FindControl within the save click, but that only finds controls in the layouttemplate.  So I wanted to implement the OnItemInserting event to be able to access the insert template.  At first, I just performed a PerformInsert() call.  But that gave me an error that the list view wasn't in insert mode.  To get around this, I had to call ShowInsertItem again.  By doing that, I can call PerformInsert.  But the event isn't firing, even if I reattach the event to the list view (just to be sure, since it is a dynamic control).  I tried changing my save button's CommandName to 'PerformInsert', but it seems to trigger an insert on the RadGrid and gives an error about it not being in insert mode.  Below is the code in my btnSave_Click event, could someone tell me what I'm doing wrong? Or is there a way within my btnSave_Click event to access the controls in the InsertTemplate?

Thank you!
Richard
rlv.DataSource = rlv.Page.Session[rlv.UniqueID + "_MyItems"]List<MyItem>;
 
rlv.InsertItemTemplate = new CustomTemplate();
rlv.ShowInsertItem(RadListViewInsertItemPosition.LastItem);
 
rlv.PerformInsert(); // calls without error, but no event fired.
rlv.InsertItemPosition = RadListViewInsertItemPosition.None;

Angel Petrov
Telerik team
 answered on 29 Jan 2013
1 answer
56 views
I have a radgrid with a details table. Both the master table and the details table are using usercontrols for the edit/insert capbilities. Below is the code of the main grid page (I have stripped out unrelated sections):

<telerik:RadGrid ID="grdLibraryGlobalRates" runat="server"  DataSourceID="dsLibraryGlobalRateManager"
                                                                    AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True">
     <MasterTableView CommandItemDisplay="Top" DataSourceID="dsLibraryGlobalRateManager"  
            DataKeyNames="_LibraryGlobalRateScheduleID">

                <DetailTables>
                    <telerik:GridTableView Name="grdGlobalRateScheduleEvent"
                                DataKeyNames="_LibraryGlobalRateScheduleEventID"                 
                                DataSourceID="dsLibraryGlobalRateManagerEvent" Width="100%"
                                 runat="server" AutoGenerateColumns="False"  CommandItemDisplay="Top">
                                 <ParentTableRelation>
                                        <telerik:GridRelationFields DetailKeyField="_LibraryGlobalRateScheduleID"         
                                            MasterKeyField="_LibraryGlobalRateScheduleID"></telerik:GridRelationFields>
                                 </ParentTableRelation>
                                 .............. Columns here
                                <EditFormSettings EditFormType="WebUserControl"     
                                            UserControlName="UserControls_EditUpdate/LibraryGlobalRateEvents.ascx">
                                                <EditColumn FilterControlAltText="Filter EditCommandColumn1 column"     
                                                UniqueName="EditCommandColumn1">
                                                </EditColumn>
                                </EditFormSettings>
                     </telerik:GridTableView>
             </DetailTables>
            ............Columns here
        <EditFormSettings EditFormType="WebUserControl" UserControlName="UserControls_EditUpdate/LibraryGlobalRates.ascx">
             <EditColumn FilterControlAltText="Filter EditCommandColumn1 column" UniqueName="EditCommandColumn1">
            </EditColumn>
         </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>


I have put command names on the update (LibraryGlobalRateEventUpdate) and insert (LibraryGlobalRateEventInsert) buttons on the usercontrol for the details table update. on the main grid item command event I evaluate for the command name and proceed accordingly in the code behind:

 

Protected Sub grdLibraryGlobalRates_ItemCommand(sender As Object, e As GridCommandEventArgs) Handles grdLibraryGlobalRates.ItemCommand

If e.CommandName = "LibraryGlobalRateEventUpdate" Then

Try

Dim MyUserControl As UserControl = CType(e.Item.FindControl(Telerik.Web.UI.GridEditFormItem.EditFormUserControlID), UserControl)

End If

 

If e.CommandName = "LibraryGlobalRateEventInsert" Then

 Try

  Dim MyUserControl As UserControl = CType(e.Item.FindControl(Telerik.Web.UI.GridEditFormItem.EditFormUserControlID), UserControl)

End If

End Sub

 

On the LibraryGlobalRateEventInsert command, e.item evaluates to

{Telerik.Web.UI.GridEditFormInsertItem} and MyUserControl gets set to the usercontrol I am using for the EditFormSettings

On the LibraryGlobalRateEventUpdate command, e.item evaluates to

{Telerik.Web.UI.GridDataItem} and MyUserControl gets set to Nothing

At this point I am unable to update values when edit is selected.

Please help me resolve this or point me to a post that will explain the update process for details tables as it pertains to UserControls for editing.

Thanks,
Marty

 

 

 

 

 

 

 

 

 

 

 

Maria Ilieva
Telerik team
 answered on 29 Jan 2013
4 answers
103 views
In my grid  there is a column contains a usercontrol and a checkbox , when I export the grid to pdf, the column is empty. When   grid exports to pdf , not support  usercontrol or checkbox? Thanks in advance.
William
Top achievements
Rank 1
 answered on 29 Jan 2013
2 answers
99 views
Hello,

I added "AllowEdit = false" on DataBound of the RadScheduler and added an appointment. It made the appointment unresizable, but I am able to drag it (See attachment). I am attaching both ASP and SharePoint version of the example. ASP version does not have the problem, only the sharepoint version is having the problem. I do not want to make the whole calendar readonly.

*Removed download links*
Hemika
Top achievements
Rank 1
 answered on 29 Jan 2013
2 answers
201 views
Hello
I am having issues with the RadButton checkbox. 
I have this code:
<div style="width:200px;">
    <p>This div has a width of 200px only:</p>
    <dl>
        <dt>
            <telerik:RadButton runat="server" ID="MyButton1" ButtonType="ToggleButton"
             ToggleType="CheckBox" AutoPostBack="false"
             Text="This text should be long enough to create a second line and maybe a third line because the next checkbox will overlaps with this one and maybe more."  />
        </dt>
        <dt>
            <telerik:RadButton runat="server" ID="RadButton1" ButtonType="ToggleButton"
             ToggleType="CheckBox" AutoPostBack="false" Text="Might be one line." />
        </dt>
        <dt>
            <telerik:RadButton runat="server" ID="RadButton2" ButtonType="ToggleButton"
             ToggleType="CheckBox" AutoPostBack="false" Text="A word." />
        </dt>
        <dt>
            <telerik:RadButton runat="server" ID="RadButton3" ButtonType="ToggleButton"
            ToggleType="CheckBox" AutoPostBack="false"
            Text="This text should be long enough to create a second line and maybe a third line because the next checkbox will overlaps with this one and maybe more." />
        </dt>
        <dt>
            <telerik:RadButton runat="server" ID="RadButton4" ButtonType="ToggleButton"
             ToggleType="CheckBox" AutoPostBack="false"
              Text="This text should be long enough to create a second line and maybe a third line because the next checkbox will overlaps with this one and maybe more." />
        </dt>
    </dl>
</div>

And i get diferent behavior in Chrome IE and Firefox.
My problem is that when i populate those dt, it comes from the database so it might be a long phrase or a word so i can't set a fixed height property. (see the picture attached)

The ideal output i get is from firefox, but in IE and Chrome its a complete desaster....
Any way i could fix this?

Thanks!
I'm using telerik v. 2012.1.215.35
Sophie
Top achievements
Rank 2
 answered on 29 Jan 2013
2 answers
267 views
Hi, 

I have following masked textbox =>

<telerik:RadMaskedTextBox id="txtFlightNumber" runat="server" width="70px" SelectionOnFocus="SelectAll"
    Mask="<C|D|E>L ####<E|F>"  />

Mask works correctly and allow me to insert either C, D or E, but when the control is loaded, it displayes "C_ ____E" . What attribute should I set to hide those enumeration characters ? I want to display empty control. I tried EmptyMessage, DisplayMask and nothing worked. Maybe I used it wrong way... 

And there is also another thing... When those characters are displayed, during gathering the data I get txtFlightNumber.Text = "CE", but user didn't insert any data there... I want to get empty message...

Do you have any idea?

Thanks in advance

Peter
Peter
Top achievements
Rank 1
 answered on 29 Jan 2013
5 answers
329 views
Hi,

I am trying to show RadAjaxLoadingPanel on a client side event of checkbox control, What i am trying to achieve is that when i tick the checkbox value to true, using Ecmascript i update the value on a sharepoint server, since this is an async process i need to show the loading panel. I have already tried the below mentioned code but it is not working for some reason. Can you please point me in the right direction
<telerik:RadGrid ID="RadGrid" ...
  <Columns>
      <telerik:GridTemplateColumn HeaderText="ClickMe" UniqueName="ClickMe" ShowFilterIcon="false"
                                                    AllowFiltering="false" ItemStyle-HorizontalAlign="Center">
                                                    <HeaderStyle HorizontalAlign="Center" Font-Bold="true" />
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="chkClickMe" runat="server" Checked='<%# Eval("ClickMe") %>'
                                                            Visible='<%# Eval("ClickMe") %>' OnClick='<%# Eval("ID", "ClickMe(this,{0});") %>'
                                                            EnableViewState="true" />
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>
</Columns>
</telerik:RadGrid>


<script type="text/javascript">
 
 
        var currentLoadingPanel = null;
        var currentControl = null;
 
        function ShowLoading() {
            currentLoadingPanel = $find('<%= loadingPanel.ClientID %>');
            currentControl = $find("<%= RadGrid.ClientID %>");
            currentLoadingPanel.show(currentControl);
        }
 
        function HideLoading() {
            if (currentLoadingPanel != null) {
                currentLoadingPanel.hide(currentUpdatedControl);
            }
            currentUpdatedControl = null;
            currentLoadingPanel = null;
        }
 
var sender_id;
        function ClickMe(sender, id) {
            ShowLoading();
}
</script>

Thanks and Regards,
Abhijit Narvekar
Kostadin
Telerik team
 answered on 29 Jan 2013
1 answer
105 views
Hi,
On an Advanced Form I have a RadComboBox that holds a list of Contact records which is populated using a SqlDataSource. The problem is that this list contains thousands of records, each of which are supposed to be displayed in the RadComboBox - but this crashes the application with a JSON error (because this list is probably too long for the RadComboBox).

Is there a way that a more graceful solution be implemented such as the following:

1. User double-clicks an empty slot in Scheduler to create new appointment
2. This opens up a special popup form (like the advanced form) where they can search and select the Contact record they want (using search text box, RadGrid, checkboxes). Click a 'Select' button
3. This then opens the Advanced Form with the selected Contact record details in it.

Please let me know if there is a way to do this or some examples that may point me in the right direction.

Many thanks.
Plamen
Telerik team
 answered on 29 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?