Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
707 views
I have a DropDownList that appears when my RadGrid is in edit mode or insert mode. 

     <radG:GridTemplateColumn DataField="Covering" HeaderText="Covering"
                        UniqueName="Covering" SortExpression="Covering" >
                        <ItemTemplate>
                               <asp:Label ID="lblCovering" runat="server" Text='<%# Eval("Covering") %>' />
                      </ItemTemplate>

                      <EditItemTemplate>
                               <asp:Label ID="lblCovering2" runat="server" Text='<%# Eval("Covering") %>' Visible="false" />
                               <asp:Textbox ID="txtCovering" runat="server" Text='<%# Eval("Covering") %>' Visible="false" />
                        <asp:DropDownList ID="ddCovering" OnSelectedIndexChanged="ddCovering_SelectedIndexChanged" runat="server" AutoPostBack="true" Visible="True" />
      
                         </EditItemTemplate>
                         </radG:GridTemplateColumn>


As you can see, my dropdownlist has an autopostback set to true and is run by the event called ddCovering_SelectedIndexChanged.  Within the SelectedIndexChanged Event,   the dropdown will change to a textbox based on what the user selects from the dropdownlist WHILE THE RADGRID is in Edit mode.  Here is the code below that drives that event.... 



 Protected Sub ddCovering_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)


        For Each item As GridDataItem In RadGrid_NoReferrals.EditItems

            Dim ddCovering As DropDownList = DirectCast(sender, DropDownList)

            Dim txtCovering As TextBox = DirectCast(item.FindControl("txtCovering"), TextBox)

            If ddCovering.SelectedValue = Nothing Then
                ddCovering.Visible = False
               
                txtCovering.Visible = True
            End If
     
        Next

End Sub


My only problem is that this only happens when the RadGrid is in Edit mode, but not when its in Insert Mode.  I need the DropDownBox to also change to a Textbox in Insert Mode as well.  How would I go about doing this....?  Please Help!
Aret
Top achievements
Rank 1
 answered on 08 Aug 2012
3 answers
418 views
Hi, 

I am generating dynamic controls (RadTextBox) on a page. 
Set of 3 Rad TextBox in 5 rows. 

txtFirstName_1     txtLastName_1    txtEmail_1
txtFirstName_2     txtLastName_2    txtEmail_2 
txtFirstName_3     txtLastName_3    txtEmail_3 
txtFirstName_4     txtLastName_4    txtEmail_4 
txtFirstName_5     txtLastName_5    txtEmail_5 

Now I want to Validate for first Row ->  It should contain value for all three text boxes. (mandatory)
for next 4 rows I  want to validate if any of the 3 text box is filled by the User, I need to force him to fill all three for that row.
If all blank then its valid.

for first row I added RequiredFieldValidator dynamically. but for next 4 rows I need client end validation like some generic JavaScript function that can validate all 3 controls value. If all 3 txtboxes are blank then no error other wise all 3 needed.

Please help.

Thanks
Kostadin
Telerik team
 answered on 08 Aug 2012
1 answer
172 views
This is my source code:

telerik:RadPanelBar runat="server" ID="RadPanelBarProperties" Width="100%" Skin="Default" ExpandMode="MultipleExpandedItems" Height="190px">
    <Items>
        <telerik:RadPanelItem Expanded="True" Text="Desciprtion" runat="server" Selected="true">
            <Items>
                <telerik:RadPanelItem Value="Description" runat="server">
                    <ItemTemplate>
                        <div style="text-align: center;">
                            <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine"></asp:TextBox>
                        </div>
                    </ItemTemplate>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelItem>
    </Items>
</telerik:RadPanelBar>

and I added from codebehind new RadPanelItem(this is part of code not all :) )
RadPanelItem firstStep = new RadPanelItem("NewGenerated");
RadPanelBarProperties.Items.Add(firstStep);
 
RadPanelItem secondStep = new RadPanelItem();
secondStep.Value = "SomeValue"
firstStep.Items.Add(secondStep);
 
Label lblProperty = new Label();
lblProperty.Text = "Test";
secondStep.Controls.Add(lblProperty);

after this how can i  find this label(or may be TextBox) in code behind, because if is Textbox i want to catch textbox.Text value.
Helen
Telerik team
 answered on 08 Aug 2012
1 answer
263 views
Hi

I'm trying to left align the series lines and labels on a line chart up to the Y-axis but I can't figure out which properties I should be setting. I want the series lines and labels to appear like example 2 in my attachment but at the moment whichever values I change I seem to be stuck with example 1.

Can anyone shed any light on which properties I should be setting on the chart to get this appearance.

Thanks

Slav
Telerik team
 answered on 08 Aug 2012
2 answers
75 views
Hi:

I am trying to collapse an already expanded item.  It doesn't seem to work?
<script type="text/javascript">
    function OnClicking(sender, eventArgs) {
        var item = eventArgs.get_item();
        if (item.get_expanded()) {
            item.set_expanded(false);
            item.set_selected(false);
        }
    }
</script>

Phil
Phil
Top achievements
Rank 2
 answered on 08 Aug 2012
1 answer
98 views
The thread for this is from 2009 .. some of the links are bad in it.. is there an update on how to  create Individual instances of a recurring appointment
Plamen
Telerik team
 answered on 08 Aug 2012
1 answer
107 views
Hi Everybody !!!!

Somebody can give me a hand with this please !

I have a radscheduler binded from database, and it works fine. I need clic on each appointement and display a custom template with a radtextbox, radeditor and a save button that allow me call and store procedure.
I know how radscheduler's custom templates works, but i don't know where i can include some hiddenfields, and then find it in code behind ? and i dont know also if the save button can have a commandname like a radgrid.

I can't achieve this scenario, i've tried to include in a edit or insert advance template binded hiddenfields from database and then finding it in a form create event, but it isn't working for me. I hope somebody can help me.
I don't need inline templates.

Thanks in advance.

Steve.


Plamen
Telerik team
 answered on 08 Aug 2012
1 answer
127 views
We are running SharePoint 2010 and the version of the editor is 6.1.6.0. The web part is in Page Content. The issue crops up when I try to edit the page. When I go into edit the page in the browser (doesn't matter which, happens in Chrome, Firefox, IE) the page loads the content, however, the telerik editor web part does not load the text that is already in the field.  Also the ribbon is totally grayed out when I enter the edit mode. On a side note, when I enter the Edit Properties from the ribbon I get a duplication of the Page Content section. But, the second one is the one that I can edit. The first does nothing.

I would like to know if this is a Sharepoint issue or if this is something to do with the webpart. If it is sharepoint then perhaps you can point me in the right direction. Same thing for the webpart, if there is something that I can do, please let me know. Thanks in advance, and if this is all ready addressed in another thread let me know.
Rumen
Telerik team
 answered on 08 Aug 2012
1 answer
124 views
I'm using editForm template and I have a Cancel button on my edit form. This cancel button has CancelCommand name. All is well if I click the Cancel button in normal condition and it closes the edit form as expected. However, if I have validation errors on the editForm, clicking the Cancel button does not close the editForm and I suspect that it causes validation to be fired.

Can anyone tell me how to close the editForm regardless whether I have validation errors on the form or not?

Thanks.
Princy
Top achievements
Rank 2
 answered on 08 Aug 2012
7 answers
95 views

Hello Telerik Team,

i found  a strange behavior in my RadGrid.
While GridEditMode.InPlace and GridCellSelectionMode.SingleCell both are active, i can not click in editable cells. I reproduced this bahavior in Firefox and IE 8 and higher.

To my Testpage: It is a single RadGrid with following parameters:  

RadGrid1.ClientSettings.Selecting.CellSelectionMode = GridCellSelectionMode.SingleCell
RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace

The datasource is a simple table bound in NeedDataSource event.

Protected Sub getData(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
        RadGrid1.DataSource = GetTable()
    End Sub
    Function GetTable() As DataTable
        ' Create new DataTable instance.
        Dim table As New DataTable
        ' Create four typed columns in the DataTable.
        table.Columns.Add("FELD1", GetType(String))
        table.Columns.Add("FELD2", GetType(String))
        table.Columns.Add("FELD3", GetType(String))
        table.Columns.Add("FELD4", GetType(String))
        ' Add five rows with those columns filled in the DataTable.
        table.Rows.Add("11", "12", "13", "14")
        table.Rows.Add("21", "22", "23", "24")
        table.Rows.Add("31", "32", "33", "34")
        table.Rows.Add("41", "42", "43", "44")
        table.Rows.Add("51", "52", "53", "54")
        Return table
    End Function

The last step is the PreRender event.
Private Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.PreRender
Dim i As Integer
For i = 0 To RadGrid1.PageSize - 1
RadGrid1.EditIndexes.Add(i)
Next i
RadGrid1.Rebind()
End Sub

It looks good, but the open cells are inaccessable on mouse click... the only thing i can do to access them is to tab in.

Without "RadGrid1.ClientSettings.Selecting.CellSelectionMode = GridCellSelectionMode.SingleCell" everything is working fine. But this setting is needed in the real page to execute js on Clientside in OnCellSelected event.
The InPlace-Editmode is required too.

i hope i provided enough informations so you can help me to find my error.

Kind regards,
Ilja Resch
Ilja
Top achievements
Rank 1
 answered on 08 Aug 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?