Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
152 views
I have a RadGrid...
 
<telerik:RadGrid ID="RadGrid_1" runat="server" DataSourceID="EntityDataSource_1"
CellSpacing="0" GridLines="None"
AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True"
AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
AllowAutomaticUpdates="True" Width="970px">

Im using the EditFormTemplate to show a table with various controls. some are simple text boxes others (dropdownlists) are bound to a different datasource to get predefined values form the DB. 

Everything is working well, I can display a list of records, page, sort, filter, and edit a single record without a problem. 
however, when I try to insert a new record i get a YSOD sayiing the selected value is not in the datasource 
. in the case of the ddl the initial selected value would be "" and since that value does not exist in the datasource I can see why the error is thrown. I have mitigated this by adding in a bank listitem and appending databound items but this seems like a workaround and not a solution.

In the case of a telerik:RadDateInput...
<telerik:RadDateInput ID="RadDateInput44" runat="server" SelectedDate='<%# Bind("effectivedate")%>'   />

 im setting the selected date to a value from the radgrids datasource, again all of the features work until i try to insert a new record.  Because the control is bound the selecteddate will be "" which cant be converted to a real date so i get a {"Specified cast is not valid."} exception.

How can this situation avoided on the insert and still have data bound controls on the edit/update
i was thinking of some kind of conditional binding expression but im not familiar with how to do that

Thanks, Scott


Princy
Top achievements
Rank 2
 answered on 22 Nov 2013
9 answers
338 views
  1. Generally, the disabled text is far too pale; darken it.
  2. In RadMenu, the border used for the hovered over item is indistinct; cnsider something else (a colour change?)
  3. In RadMenu, the upper and lower border used for the selected item gets lost background; consider a better method of highlighting the item.
  4. In RadGrid, the borders of the Pager buttons are too pale; consider using a darker colour.
  5. In RadToolBar, the icons seem to ride higher in Metro than other skins (see ToolbarIcons-*.png)
  6. In RadTreeView the expand node icon is too faint; consider making it darker.
Magdalena
Telerik team
 answered on 22 Nov 2013
5 answers
259 views
Hi,

Please read my scenario described below.

Scenario: I have a RadGrid with approx. 10 GridTemplateColumns where in 9 template columns consists of RadTextBox and one template column has RadComboBox. The scenario is that this RadGrid is bound by more than 100 rows every time. Currently am using the client side programmatic binding method to bind the RadGrid.

Problem: I have observed that it is taking 2-3 minutes to bind the grid with more than 90 rows.

Can anyone suggest me on how to improve the performance? I want the RadGrid to be loaded in very quick time, say in around 5-10 seconds.
Any help would be greatly appreciated.

Thanks,
Sandeep
Jayesh Goyani
Top achievements
Rank 2
 answered on 22 Nov 2013
2 answers
93 views
My RadScheduler is bound to a LinqDataProvider and automatically inserts, updateds and deleted appointments.  Is there a way to perform inserts manually via a server side event?  I have a custom field that I would like saved with each appointment which never needs editing.  Thanks.
Michael
Top achievements
Rank 1
 answered on 22 Nov 2013
3 answers
247 views
Hi All,

I have C# code-behind RadGrid that uses SQLDataSource and Databinds in NeedDataSource();

I have set
radGrid.AllowSorting = true;
radGrid.MasterTableView.AllowMultiColumnSorting = true;
radGrid.MasterTableView.AllowNaturalSort = true;

I have also set AllowSorting= true; on the columns themselves, but nothing seems to work.  The columns refuse to sort, even though I can see the Arrow Up, Arrow Down and revert to default.  Can you please help?

Thanks,
Mark
Princy
Top achievements
Rank 2
 answered on 22 Nov 2013
1 answer
173 views
Hi,
We have a RadDatePicker control. User can enter/edit manually date in the associated date input box. Then on a save button click we need to perform some validation. The problem is when user manually edits the date and presses enter key while still in the date text box, we do not get the selected date from the raddatepicker control. We need this new date value in the validation function. How can we resolve this ?
Princy
Top achievements
Rank 2
 answered on 22 Nov 2013
3 answers
140 views
Hi ,

I need to show the count along with the name of the bound column.The grid has only master table view and the bound column is getting the values of a list.
ex:
Category:Doc1(2) 
Catgeory:Doc2(4)
Categroy:Doc3(5).....

I tried with Pre-render event but it is adding the count in the child items only. please help me to get the count of the values of the bound column.
Below
<ad:adGrid ID="grdAttachments" runat="server" Width="100%" AllowPaging="false"
    GroupingEnabled="true" ShowGroupPanel="false" MasterTableView-GroupsDefaultExpanded="true" >
        <MasterTableView  HierarchyLoadMode ="Client" >
        <Columns>
    <tel:GridBoundColumn UniqueName="Name" DataField="Name" HeaderText="Category" />
    <tel:GridHyperLinkColumn UniqueName="Subject" DataTextField="Subject" HeaderText="Subject"
    DataNavigateUrlFormatString="ts/disp.aspx?id={0}" DataNavigateUrlFields="ID"
    SortExpression="Subject">
    <ItemStyle CssClass="gridhyperlink" />
    </tel:GridHyperLinkColumn>
<tel:GridHyperLinkColumn UniqueName="FileName" DataTextField="FileName" HeaderText="Attachment"
DataNavigateUrlFormatString="{0}" DataNavigateUrlFields="AttachmentUrl" SortExpression="FileName"
        Target="_blank">
<ItemStyle CssClass="gridhyperlink" />
</tel:GridHyperLinkColumn>
<tel:GridDateTimeColumn UniqueName="CreatedDate" DataField="CreatedDate" HeaderText="Date" />
<tel:GridBoundColumn UniqueName="CreatedBy" DataField="CreatedBy" HeaderText="Author" />
    </Columns>
<GroupByExpressions>
<tel:GridGroupByExpression>
    <SelectFields>
<tel:GridGroupByField FieldName="Name" FieldAlias="Category"  />
</SelectFields>
<GroupByFields>
<tel:GridGroupByField FieldName="Name" />
</GroupByFields>
</tel:GridGroupByExpression>
    </GroupByExpressions>
</MasterTableView>
   <ClientSettings AllowExpandCollapse="true">
   </ClientSettings>
</ad:adGrid>
----------------------------------------------------------------
 
 
 
 
Private Sub grdAttachments_NeedsDataSource(ByVal sender As Object, ByVal e As GridNeedDataSourceEventArgs) Handles grdAttachments.NeedDataSource
        Dim types As ADAttachmentTypeList = CMClient.GetAttacntTyps()
        Dim attachments = types.Aggregate(
         New List(Of Object)(),
         Function(acc As List(Of Object), type As ADAttachmentType)
             Dim typeAttachments As ADAttachmentList = Document.GetAttachments(type.ID)
             typeAttachments.Aggregate(
              acc,
              Function(acc2 As List(Of Object), attachment As ADAttachment)
                  Dim extension = attachment.Extension.ToLower()
                  Dim navigationUrl As String = String.Empty
 
                  If CurrentTADClient.CCV Then
                      navigationUrl = String.Format("ts/view.aspx?id={0}&path={1}&aid={2}", attachment.Document.ID, attachment.FileName, attachment.ID)
                  ElseIf EnableCommentsWithAttachments Then
                      navigationUrl = String.Format("reviews/dispyReadOnlyOpt.aspx?id={0}&type=ATTACHMENT&path={1}&aid={2}", attachment.Document.ID, attachment.FileName, attachment.ID)
                  Else
                      If (extension = "docx" _
                       OrElse extension = "doc" _
                       OrElse extension = "dotx" _
                       OrElse extension = "dot" _
                       OrElse extension = "rtf" _
                      ) Then
                          navigationUrl = String.Format(
                           "rev/dispyreadonly.aspx?id={0}&type=ATTACHMENT&path={1}",
                           attachment.Document.ID,
                           attachment.FileName
                          )
                      Else
                          navigationUrl = attachment.VirtualPath
                      End If
                  End If
 
                  acc2.Add(New With {
                   Key .Name = type.Name,
                 .ID = attachment.ID,
                 .Subject = attachment.Subject,
                 .FileName = attachment.FileName,
                 .CreatedDate = String.Format("{0} {1}", attachment.CreatedDate.ToString(CurrentCulture.DateTimeFormat.ShortDatePattern, CurrentCulture), attachment.CreatedDate.ToString(CurrentCulture.DateTimeFormat.ShortTimePattern, CurrentCulture)),
                 .CreatedBy = attachment.CreatedBy,
                  .AttachmentUrl = navigationUrl
                  })
                  Return acc2
              End Function
             )
             Return acc
         End Function
        )
 
        DirectCast(grdAttachments.Columns(1), GridHyperLinkColumn).DataNavigateUrlFormatString = String.Format("{0}hj/ts/displ.aspx?id={1}0{2}", Captions.VirtualRoot, Chr(123), Chr(125))
 
        grdAttachments.DataSource = attachments.ToArray()
 
         
    End Sub
is the Grid and the Databinding
.Thanks in Advance
Jose
Shinu
Top achievements
Rank 2
 answered on 22 Nov 2013
1 answer
90 views
I have two radio buttons on my aspx page, and when I click one, it does a full page submit. I need to implement Ajax functionality. How can I do that?  

On my html page, I have a reference to the AjaxToolkit. Any suggestion?

The html code is:    

<asp:Panel ID="pnlSelectAllItemsClearAllItems" Visible="true" runat="server" ScrollBars="None">
    <table border="0">
        <tr>
            <td width="50%" style="height:2%;">
        <asp:RadioButtonList ID="rbSelectAllItemsClearAllItems" runat="server" AutoPostBack="true"
            RepeatDirection="Horizontal"  Enabled="true"
            OnSelectedIndexChanged="rbSelectClearAllItems_OnSelectedIndexChanged" >
            <asp:ListItem Value="SelectAllItems">Select All Items</asp:ListItem>
            <asp:ListItem Value="ClearAll">Clear All</asp:ListItem>
        </asp:RadioButtonList>
            </td>
            <td style="text-align: center; height:2%;" width="50%">
                <asp:Button runat="server" Text="Archive Selected Items"
                    ID="btnArchiveSelected" onclick="btnArchiveSelected_Click" />    
            </td>
        </tr>
    </table>
</asp:Panel>
Shinu
Top achievements
Rank 2
 answered on 22 Nov 2013
1 answer
55 views
Hello friends of telerik. I want to pass tha data cells from a row to textboxs by client-side.
I try to follow this tutorial but I only have the same result with the object undefinided. How i can do this? what is the real name of the column?
Here is my code (Don't worry If you can't understand the name, it's on spanish) and a screen shoot of the table.
<telerik:RadGrid ID="dgv_usuarios" runat="server">
    <ClientSettings>
        <Selecting AllowRowSelect="true" />
        <Animation AllowColumnReorderAnimation="true" />
        <ClientEvents OnRowClick="rowUsuario" />
    </ClientSettings>
</telerik:RadGrid>

function rowUsuario(sender, eventArgs) {
      var grid = sender;
      var MasterTable = grid.get_masterTableView(); var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
      var cell = MasterTable.getCellByColumnUniqueName(row, "Nombre");
      alert("Su dato es: " + cell.innerHtml);
}

Princy
Top achievements
Rank 2
 answered on 22 Nov 2013
0 answers
101 views
Hi, I am trying to implement this demo http://demos.telerik.com/aspnet-ajax/tooltip/examples/usingwithimagemap/defaultcs.aspx but the problem is when I am using an image too big. Is there a way to put the imagemap inside some container and make it zoomable?

Thanks.
Julio
Top achievements
Rank 1
 asked on 21 Nov 2013
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?