Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
77 views

Hello everyone,

I need to use a RadPanelBar in telerik in a way that when it is collapsed it must show a 2-3 details of a person. And when expanded, it shows complete details in its panelbaritem. I am using ItemClick event to read the expand/collapse state and update the header text. But after i implement this event, on every click (to expand/collapse), the whole page flickers. I tried couple of options, but could not avoid it.

Can someone please help? or suggest another control option option?

thanks

Shinu
Top achievements
Rank 2
 answered on 19 Jun 2013
1 answer
637 views
I have a need to set the top and bottom borders for a specific row in a grid. As I can't see how to set just the top and bottom borders, I've tried item.BorderColor, item.BorderWidth, item.BorderStyle and all three show in the generated markup but none actually show on the screen. I'm setting item.Font.Bold also in code behind and this is the only style that is taking effect at the row level.  The styling shows on the screen if I set it on the item cell, but I don't want side borders on the cells.
Is there a way to achieve what I want?
Princy
Top achievements
Rank 2
 answered on 19 Jun 2013
0 answers
37 views
hello,
 Please provide Ajax RadScheduler resource grouping - Client side code samples.
Mohammed
Top achievements
Rank 1
 asked on 19 Jun 2013
1 answer
125 views
Hi,

I have faced a problem in trying to do date-wise sorting in date field in radgrid.It is not happening. Is this feature available? Plz. let us know.

Thanks
Purojit

Princy
Top achievements
Rank 2
 answered on 19 Jun 2013
2 answers
85 views
I have a grid where one column contains a link button. Clicking on this button takes user to a new page.
The grid also has an edit column and an edit form template.
The edit does not fire when clicked.
What do I do to get the edit form to work?
This is the column definition
<MasterTableView CommandItemDisplay="Top" DataKeyNames="Unit_code" AllowMultiColumnSorting="True"
              EditMode="PopUp" InsertItemPageIndexAction="ShowItemOnCurrentPage" HierarchyDefaultExpanded="False">
            
              <Columns>
                  <telerik:GridEditCommandColumn HeaderText="Edit" HeaderStyle-Width="50px" ItemStyle-Width="50px"
                      HeaderStyle-HorizontalAlign="Left" ButtonType="LinkButton" UniqueName="unit_edit">
                  </telerik:GridEditCommandColumn>
                  <telerik:GridButtonColumn UniqueName="ColumnLinkCode" DataTextField="Unit_code"
                      HeaderText="Unit code" ButtonType="LinkButton">
                  </telerik:GridButtonColumn>
                  <telerik:GridBoundColumn HeaderText="Name" HeaderButtonType="TextButton" DataField="Unit_name"
                      UniqueName="Unit_name">
                  </telerik:GridBoundColumn>
                  <telerik:GridBoundColumn HeaderText="Description" HeaderButtonType="TextButton" DataField="unit_description"
                      UniqueName="unit_description">
                  </telerik:GridBoundColumn>
                  <telerik:GridNumericColumn HeaderText="Credits" DecimalDigits="0" DataField="num_credits"
                      UniqueName="num_credits">
                  </telerik:GridNumericColumn>
              </Columns>
 
These are the client settings
<ClientSettings EnablePostBackOnRowClick="false" EnableRowHoverStyle="false">
              <Selecting AllowRowSelect="True" CellSelectionMode="SingleCell" />
               <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true">
              </Scrolling>
          </ClientSettings>
Simon Channell
Top achievements
Rank 1
 answered on 19 Jun 2013
4 answers
256 views

my radgrid had 2 level (use Course_ID as a key to link)

Code as follows:

<telerik:RadGrid ID="RadGrid_TrainingProviderCourse" DataSourceID="LDS_Course" ShowStatusBar="True"
          AutoGenerateColumns="False" AllowSorting="True" runat="server"
          AllowPaging="True" GridLines="None" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
          AllowAutomaticUpdates="True" CellSpacing="0" Width="80%" Skin="Windows7">
          <PagerStyle Mode="NumericPages"></PagerStyle>
          <MasterTableView DataSourceID="LDS_Course" DataKeyNames="Course_ID" AllowMultiColumnSorting="True"
              Width="100%" CommandItemDisplay="Top" Name="Parent"
              AllowAutomaticDeletes="False" AllowAutomaticInserts="False"
              AllowAutomaticUpdates="False">
              <DetailTables>
                  <telerik:GridTableView DataKeyNames="ID"
                      DataSourceID="LDS_TrainingProviderCourse" Width="100%"
                      runat="server" CommandItemDisplay="Top" Name="SubLevel" >
                      <ParentTableRelation>
                          <telerik:GridRelationFields DetailKeyField="Course_ID"
                              MasterKeyField="Course_ID" />
                      </ParentTableRelation>
                      <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                      <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                      <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
 
                      <Columns>
                          <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn2">
                              <HeaderStyle Width="20px"></HeaderStyle>
                              <ItemStyle CssClass="MyImageButton"></ItemStyle>
                          </telerik:GridEditCommandColumn>
 
                          <telerik:GridBoundColumn SortExpression="Course_Fee_USD" HeaderText="Course_Fee_USD"
                              HeaderButtonType="TextButton" DataField="Course_Fee_USD"
                              UniqueName="Course_Fee_USD"  HeaderStyle-Width="200px"
                              FilterControlAltText="Filter Course_Fee_USD column">                                                              
                              <HeaderStyle Width="200px" />
                          </telerik:GridBoundColumn>                             
                                     
                          <telerik:GridBoundColumn SortExpression="Course_Fee_IDR"
                              HeaderText="Course_Fee_IDR" HeaderButtonType="TextButton"
                              DataField="Course_Fee_IDR" UniqueName="Course_Fee_IDR"
                              HeaderStyle-Width="200px" FilterControlAltText="Filter Course_Fee_IDR column">                                                                                                       
                              <HeaderStyle Width="200px" />
                          </telerik:GridBoundColumn>
 
                          <telerik:GridBoundColumn SortExpression="Course_ID" Visible="false"
                              HeaderText="Course_ID"
                              DataField="Course_ID" UniqueName="Course_ID"
                              HeaderStyle-Width="200px" FilterControlAltText="Filter Course_ID column">                                                                                                                                                                           
                          </telerik:GridBoundColumn>
 
                          <telerik:GridButtonColumn ConfirmText="Delete this record?" ButtonType="ImageButton"
                              CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                              <HeaderStyle Width="20px"></HeaderStyle>
                              <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                          </telerik:GridButtonColumn>
 
                      </Columns>
 
                     <EditFormSettings EditFormType="Template">
                      <EditColumn FilterControlAltText="Filter EditCommandColumn1 column"
                                      UniqueName="EditCommandColumn1">
                       </EditColumn>
                       <FormTemplate>
 
                  <table id="Table2" cellspacing="2" cellpadding="1" width="50%" border="1" rules="none"
                      style="border-collapse: collapse;">
                      <tr class="EditFormHeader">
                      <td style="width:150px">
                      <asp:Label ID="Label5" Text="Training Provider" runat="server"></asp:Label>                                                           
                      </td>
                      <td>
                          <telerik:RadDropDownList ID="rdl_TrainingProvider" runat="server" DataSourceID="LDS_TrainingProvider" DefaultMessage="Please select..."
                           DataValueField="Training_Provider_ID" DataTextField="Internal_Name" >
                          </telerik:RadDropDownList>
                          <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="rdl_TrainingProvider"
                              InitialValue="Please Select..." ErrorMessage="Please select a Training Provider."></asp:RequiredFieldValidator>  
                      </td>
                      </tr>
                      <tr >
                      <td >
                      <asp:Label ID="lb" Text="Course Fee (USD)" runat="server"></asp:Label>                                                           
                      </td>
                      <td>
                      <asp:TextBox ID="tb_Course_Fee_USD" runat="server" Text='<%# Bind("Course_Fee_USD") %>' TabIndex="2"></asp:TextBox>                                                           
                      <asp:RegularExpressionValidator ID="RegularExpressionValidator8" runat="server" Display="Dynamic"
                      ErrorMessage="Please, enter valid number." ValidationExpression="^(\d|,)*\.?\d*$" ControlToValidate="tb_Course_Fee_USD">
                      </asp:RegularExpressionValidator>
                      </td>
                      </tr>
                      <tr >
                      <td >
                      <asp:Label ID="Label2" Text="Course Fee (IDR)" runat="server"></asp:Label>                                                           
                      </td>
                      <td>
                      <asp:TextBox ID="tb_Course_Fee_IDR" runat="server" Text='<%# Bind("Course_Fee_IDR") %>' TabIndex="2"></asp:TextBox>                                                           
                      <asp:RegularExpressionValidator ID="RegularExpressionValidator9" runat="server" Display="Dynamic"
                      ErrorMessage="Please, enter valid number." ValidationExpression="^(\d|,)*\.?\d*$" ControlToValidate="tb_Course_Fee_IDR">
                      </asp:RegularExpressionValidator>
                      </td>
                      </tr>
                         <tr>
                          <td align="right" colspan="2">
                              <asp:Button ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>'
                                  runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>' >
                              </asp:Button
                              <asp:Button ID="btnDelete" Text="Delete" runat="server" CausesValidation="False"
                                  CommandName="Delete"></asp:Button>
                              <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                  CommandName="Cancel"></asp:Button>
 
                          </td>
                      </tr>
 
                              </table>
                          </FormTemplate>
                      </EditFormSettings>
 
                      <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                  </telerik:GridTableView>
              </DetailTables>
 
  <CommandItemSettings ExportToPdfText="Export to PDF" ShowAddNewRecordButton="False"></CommandItemSettings>
  <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
  <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
              <Columns>
                  <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                      <HeaderStyle Width="20px"></HeaderStyle>
                      <ItemStyle CssClass="MyImageButton"></ItemStyle>
                  </telerik:GridEditCommandColumn>
 
                  <telerik:GridBoundColumn DataField="Course_ID"
                      FilterControlAltText="Filter Course_ID column" HeaderButtonType="TextButton"
                      HeaderText="Course_ID" ReadOnly="True" SortExpression="Course_ID" HeaderStyle-Width="200px"
                      UniqueName="Course_ID" Visible="false">
                      <HeaderStyle Width="200px" />
                  </telerik:GridBoundColumn>
 
                  <telerik:GridBoundColumn SortExpression="Course_Name" HeaderText="Course Name" HeaderButtonType="TextButton"
                      DataField="Course_Name" UniqueName="Course_Name"
                      FilterControlAltText="Filter Course_Name column" >
                  </telerik:GridBoundColumn>
 
                  <telerik:GridBoundColumn SortExpression="Course_Name_Ind"
                      HeaderText="Course Name (Ind)" HeaderButtonType="TextButton"
                      DataField="Course_Name_Ind" UniqueName="Course_Name_Ind"
                      HeaderStyle-Width="200px" FilterControlAltText="Filter Course_Name_Ind column">
                      <HeaderStyle Width="200px"></HeaderStyle>
                  </telerik:GridBoundColumn>
 
              </Columns>
 
              <EditFormSettings>
              <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
              </EditFormSettings>
 
              <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                      </MasterTableView>
              <FilterMenu EnableImageSprites="False"></FilterMenu>
                  </telerik:RadGrid>
                   
          <asp:LinqDataSource ID="LDS_Course"
              runat="server" ContextTypeName="dcLRDBDataContext" EntityTypeName=""
              TableName="db_Courses">
          </asp:LinqDataSource>
                  <asp:LinqDataSource ID="LDS_TrainingProviderCourse"
              runat="server" ContextTypeName="dcLRDBDataContext" EntityTypeName=""
              TableName="db_Training_Providers_Course_Lists"
              Where="Course_ID == @Course_ID">
                      <WhereParameters>
                          <asp:Parameter Name="Course_ID" Type="Int32" />
                      </WhereParameters>
          </asp:LinqDataSource>

How can I get the Course_ID from master/parent when perform insert ?

my code behind:

Protected Sub RadGrid_TrainingProviderCourse_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid_TrainingProviderCourse.ItemCommand
    RadGrid_TrainingProviderCourse.MasterTableView.ClearEditItems()
 
 
 
    If e.CommandName = RadGrid.InitInsertCommandName Then   'Click Add New Record button           
        Dim editColumn As GridEditCommandColumn = CType(RadGrid_TrainingProviderCourse.MasterTableView.GetColumn("EditCommandColumn"), GridEditCommandColumn)
        editColumn.Visible = False
    ElseIf (e.CommandName = RadGrid.RebindGridCommandName AndAlso e.Item.OwnerTableView.IsItemInserted) Then
        e.Canceled = True
    Else
        Dim editColumn As GridEditCommandColumn = CType(RadGrid_TrainingProviderCourse.MasterTableView.GetColumn("EditCommandColumn"), GridEditCommandColumn)
        If Not editColumn.Visible Then  'Click Cancel button (both Insert and Update mode)
            editColumn.Visible = True
        End If
 
        Dim ddlTrainingProvider As RadDropDownList = DirectCast(e.Item.FindControl("rdl_TrainingProvider"), RadDropDownList)
        Dim txt_Course_Fee_USD As TextBox = DirectCast(e.Item.FindControl("tb_Course_Fee_USD"), TextBox)
        Dim txt_Course_Fee_IDR As TextBox = DirectCast(e.Item.FindControl("tb_Course_Fee_IDR"), TextBox)
        Dim dc As New dcLRDBDataContext
 
        If e.CommandName = "PerformInsert" Then
 
            Dim newRecord1 As New db_Training_Providers_Course_List
            dc.db_Training_Providers_Course_Lists.InsertOnSubmit(newRecord1)
 
            If ddlTrainingProvider.SelectedValue <> ddlTrainingProvider.DefaultMessage Then
                newRecord1.Training_Provider_ID = ddlTrainingProvider.SelectedValue
            End If
           
            newRecord1.Course_Fee_USD = txt_Course_Fee_USD.Text
            newRecord1.Course_Fee_IDR = txt_Course_Fee_IDR.Text
            newRecord1.LastUpdateDate = DateTime.Now
            newRecord1.LastUpdateBy = HttpContext.Current.Session("UserID")
            dc.SubmitChanges()
 
            RadGrid_TrainingProviderCourse.MasterTableView.ClearEditItems()
            RadGrid_TrainingProviderCourse.DataBind()
 
        ElseIf e.CommandName = "Update" Then
            Dim lid As Integer = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("ID")
 
            Dim rec = (From p In dc.db_Training_Providers_Course_Lists Where p.ID = lid).FirstOrDefault
            If Not rec Is Nothing Then
                If ddlTrainingProvider.SelectedValue <> ddlTrainingProvider.DefaultMessage Then
                    rec.Training_Provider_ID = ddlTrainingProvider.SelectedValue
                End If
                rec.Course_Fee_USD = txt_Course_Fee_USD.Text
                rec.Course_Fee_IDR = txt_Course_Fee_IDR.Text
                rec.LastUpdateBy = HttpContext.Current.Session("UserID")
                rec.LastUpdateDate = DateTime.Now
                dc.SubmitChanges()
            End If
 
            RadGrid_TrainingProviderCourse.MasterTableView.ClearEditItems()
            RadGrid_TrainingProviderCourse.DataBind()
        ElseIf e.CommandName = "Delete" Then
            Dim lid As Integer = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("ID")
            Dim rec2 = (From p In dc.db_Training_Providers_Course_Lists Where p.ID = lid).FirstOrDefault
            If Not IsNothing(rec2) Then
                dc.db_Training_Providers_Course_Lists.DeleteOnSubmit(rec2)
                dc.SubmitChanges()
            End If
 
            RadGrid_TrainingProviderCourse.MasterTableView.ClearEditItems()
            RadGrid_TrainingProviderCourse.DataBind()
        End If
 
        dc.Dispose()
    End If
End Sub

Thanks

Joe
Top achievements
Rank 1
 answered on 19 Jun 2013
1 answer
112 views
Whenever a user attempts to open a submenu on a touchscreen device it triggers the onClick event of item rather then openning the submenu.  In there a way to correct this bahavior possilby in a clientClicking event?
Kate
Telerik team
 answered on 19 Jun 2013
1 answer
120 views
Guys,

I've just migrated a solution to .NET4.0 to take advantage of the newer HTML5 support.
After some jigging around and updating, I finally got the input controls happy being rendered with type="email".

Problem is, this input control is returning NULL or blank when accessed through a button click event inside a RadAjaxPanel.
I have two other input tags, with type set to "text" and "password" right next to it, and they work just fine.
On further investigation, if call request.form[clientId] - the result is also null.

If I remove the RadAjaxPanel, the full postback works just fine, and the input field's value is read ok.

How weird is this?  It sounds like the async postback is filtering input tags with type="email" as used in HTML5?

Any help appreciated.

Thanks.
Vasil
Telerik team
 answered on 19 Jun 2013
0 answers
38 views
Hi Telerik team,

I've upgraded my project to 2013-Q2 and I've a problem with AutoCompleteBox control.
My page have 3 form: 1 main form and 2 form that is generated by a jquery plugin.

In Q1 everything is OK because only 1 <div class='racSlide'> is generated for main form but in Q2 every form in page is generated the div.
I think it's a change from inside AutoCompleteBox control engine.

I can't solve this problem by replacing form tag in the jquery plugin = div tag but it's seem not the best solution.

Are there any solution better than mine?

Thanks
tungnt185
Top achievements
Rank 2
 asked on 19 Jun 2013
3 answers
62 views
Hi
I've used a GroupFooterTemplate with  grid.ClientSettings.Scrolling.UseStaticHeaders = true.
If UseStaticHeaders is set to true i have a problem with visualization of GroupFooterTemplate
For more explanation i attached  two images of my problem.
Milena
Telerik team
 answered on 19 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?