Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
86 views
Hi,

I've a grid setup like this:

         <ClientSettings>
                <Selecting AllowRowSelect="True"  />
                <ClientEvents OnRowDblClick="RowDblClick" OnRowClick="RowClick" />
            </ClientSettings>


                <Columns>
                    <telerik:GridClientSelectColumn>
                    </telerik:GridClientSelectColumn>
                </Columns>
                <ItemTemplate>
                    <Table......
                </ItemTemplate>

My problem is the "RowClick" & "RowDBClick" events didn't fire if I click the  row content, I need to click the First Column (select checkbox) in order to fire the events.Any advise?

Thanks.

Pavlina
Telerik team
 answered on 06 Aug 2010
1 answer
228 views

I have an issue where the combobox renders without a bottom border (see attached image) and the right down arrow doesn't work (it doesn't cause anything to happen when clicked).  Here's the .aspx:

 

 

<div runat="server" id="pnlAdvancedSearch">

 

 

 

<table width="100%" cellspacing="1" cellpadding="1" border="0">

 

 

 

<tr>

 

 

 

<td valign="middle" style="width: 110px;">

 

 

 

<asp:Label runat="server" ID="lblProject" Text="Project:" />

 

 

 

</td>

 

 

 

<td valign="middle" style="width: 250px;">

 

 

 

<telerik:RadComboBox runat="server" ID="ddProject" NoWrap="True" EmptyMessage="Please enter value"

 

 

 

ShowDropDownOnTextboxClick="true" EnableLoadOnDemand="true" ShowMoreResultsBox="true"

 

 

 

RegisterWithScriptManager="true" AppendDataBoundItems="False" EnableVirtualScrolling="true"

 

 

 

Height="200px" Width="100%" OnItemsRequested="ddProject_ItemsRequested" />

 

 

 

</td>
...

Any suggestions?

 

Simon
Telerik team
 answered on 06 Aug 2010
5 answers
203 views
Does anyone know if it's possible to have the width of the items inside the combobox to extend beyond the combobox itself?  I have a series of string values that are pretty long.  I'd like to use a combo in a limited space but when expanded, be able to show the full string descriptions.

Thanks!

Yana
Telerik team
 answered on 06 Aug 2010
1 answer
401 views
Hi

I have a RadGrid which works fine.
I have now put a textbox and button above the RadGrid and when the button is clicked then a row should be added to the RadGrid.
But it doesn't do it without a postback.

I try to put the RadGrid into an UpdatePanel like this ...
(all I did was add the UpdatePanel control)

<

 

asp:UpdatePanel ID="upInterimComments" runat="server">

 

 

 

<radG:RadGrid

 

......

</

 

radG:RadGrid>

 

 

 

</asp:UpdatePanel>

 


But I get a load of errors ...
Error 1 Type 'System.Web.UI.UpdatePanel' does not have a public property named 'RadGrid'. 
Error 2 Type 'System.Web.UI.UpdatePanel' does not have a public property named 'GroupPanel'. 
etc

Any ideas?

Thanks
Paul
Princy
Top achievements
Rank 2
 answered on 06 Aug 2010
2 answers
134 views
Hello,

I wonder if it is possible to get marked today date in rad grid filtering row on GridDateTimeColumn as it is in Calendar control.

For further information please check pictures in the attachment.

Best regards...

Vasssek
Vasssek
Top achievements
Rank 1
 answered on 06 Aug 2010
1 answer
150 views
Greetings,
I am implementing a grid using the manual crud example shown in your demo at: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/programaticlinqupdates/defaultcs.aspx.  However, for my scenario I have an entity reference key for one of my columns for which I populate a GridDropDownColumn using a DomainDataSource object as shown in the code block below:

        <telerik:RadGrid ID="RadGrid1" runat="server" 
                        OnNeedDataSource="RadGrid1_NeedDataSource" 
                        OnColumnCreated="RadGrid1_ColumnCreated"
                        OnItemCreated="RadGrid1_ItemCreated" 
                        OnItemDataBound="RadGrid1_ItemDataBound"
                        OnInsertCommand="RadGrid1_InsertCommand"
                        OnUpdateCommand="RadGrid1_UpdateCommand"
                        OnDeleteCommand="RadGrid1_DeleteCommand" 
                        AllowFilteringByColumn="True" 
                        GridLines="None"    >
<HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
  
                <MasterTableView HierarchyDefaultExpanded="false" 
                                        HierarchyLoadMode="ServerBind"
                                        AllowSorting="true" 
                                        AutoGenerateColumns="false" 
                                        CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage"
                                        DataKeyNames="SICItemID" >
                 <Columns>  
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                        <telerik:GridBoundColumn DataField="SICItemID" HeaderText="ID" UniqueName="SICItemID"  SortExpression="SICItemID" Visible="false" ReadOnly="true" Display="false" />  
                        <telerik:GridBoundColumn  DataField="ItemName" HeaderText="Question" UniqueName="ItemName" ItemStyle-Wrap="true"  ItemStyle-Width="300"  SortExpression="ItemName" MaxLength="2000" ReadOnly="false" Display="true"   />    
                                             <telerik:GridDropDownColumn FooterText="SIC Code" UniqueName="ddlSICCodes" ReadOnly="false"
                        ListTextField="SICCode1" ListValueField="SICID" DataSourceID="ddsGetSICCodes"
                        HeaderText="SIC Code" DataField="SICCode.SICID" AllowSorting="true" DefaultInsertValue="">
                    </telerik:GridDropDownColumn>
</Columns>  
  
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
</EditFormSettings>
            </MasterTableView>
            <ClientSettings AllowExpandCollapse="true" EnableRowHoverStyle="true" />
        </telerik:RadGrid>
         <cc1:DomainDataSource runat="server" ID="ddsGetSICCodes" 
        DomainServiceTypeName="ID.DomainServices.ListTypesDomainService" 
        SelectMethod="GetSicCodes" EnableUpdate="true" EnableInsert="false" EnableDelete="false" >
            <SelectParameters>
                <asp:SessionParameter Name="Scope" SessionField="MyScope" DefaultValue="" ConvertEmptyStringToNull="true" DbType="Guid" />
            </SelectParameters>
        </cc1:DomainDataSource>

The problem that I am having is that my reference entity for the dropdown list is not been updated when I select a new value during the Update.  During Insert the reference is set correctly to the selected value using the ExtractValues method of the GridEditableItem. Please advise of changes I could make to ensure my reference is updated when using the UpdateValues of the GridEditableItem method as shown below.  I have already included the entity reference (SicCode) when I get the object for update.  I do not understand how the UpdateValues work behind the scense and would appreciate any insight you can share regarding the handling of foreign key columns.
protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)
      {
          GridEditableItem editedItem = e.Item as GridEditableItem;
          try
          {
              ListTypesDomainService lds = new ListTypesDomainService();
              Guid sicItemID = new Guid(editedItem.GetDataKeyValue("SICItemID").ToString());
              var updateSicItem = lds.GetSicItem(sicItemID);
              if (updateSicItem != null)
              {
                  editedItem.UpdateValues(updateSicItem);
                  lds.SaveChanges();
              }
          }
          catch (Exception ex)
          {
              ProcessException(RadGrid1, ex);
              e.Canceled = true;
          }
      }

Thanks!
Martin
Telerik team
 answered on 06 Aug 2010
1 answer
201 views

There doesn't seem to be a good solution for printing the control itself. 

So, one solution would just be to show a pop-up and write the contents of the control out to html.  I would need to do this for Day, Week, Month and Multi-Day views available in the control.  It's not a difficult task but time consuming if you figure in formatting etc.

By any chance did anyone do this already and what to share the code?  

Can someone suggest a better solution?

 

T. Tsonev
Telerik team
 answered on 06 Aug 2010
1 answer
131 views
Hai,

How the grid filtering is working? On which property, the filter text is saving? I want to assign filter text through code behind.

Plz help.
Princy
Top achievements
Rank 2
 answered on 06 Aug 2010
1 answer
309 views
I am building application component with some restrictions. User control contains following:

<

 

rad:RadAjaxManager ID="RadAjaxManager1" runat="server"></rad:RadAjaxManager>

 

<

 

rad:RadAjaxPanel ID="RadAjaxPanel" runat="server" HorizontalAlign="NotSet" LoadingPanelID="AjaxLoadingPanel1" ScrollBars="None">

 

 

<div style="display:none;">

 

 

<asp:Button ID="btnRebind" runat="server" onclick="btnRebind_Click" />

 

 

</div>

 

 

<asp:Repeater ID="lstRefs" runat="server" OnItemDataBound="lstRefs_ItemDataBound" OnItemCreated="lstRefs_ItemCreated"></asp:Repeater>

 

 

<asp:PlaceHolder ID="ph" runat="server"></asp:PlaceHolder>

 

 

<uc:SubWin ID="winRefEdit" runat="server" TargetPage="RefEdit.aspx" />

 

</

 

rad:RadAjaxPanel>

 

<

 

rad:AjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Transparency="0">

 

 

<table style="height:100%;width:100%;" border="0">

 

 

<tr style="vertical-align:middle">

 

 

<td style="text-align:center;">

 

 

<img src='timer.gif' alt='Timer' />

 

 

</td>

 

 

</tr>

 

 

</table>

 

</

 

rad:AjaxLoadingPanel>

When I define ItemTemplate inside component - everything works well. However, there is a special requirement to make template editable by simple tools (texteditor). That is why I am defining template as ITemplate control in code and assign it to Repeater. In aspx page user places something like:

<table>
<uc:SpecialCompoment ID="sp1" runat="server>
   <MyItemTemplate>
      <tr>
         <td>Name:<ItemData Field="Name"></td><td style="font-weight:bold">Last name:<ItemData Field="Surname"></td>
      </tr>
   </MyItemTemplate>
</uc:SpecialCompoment>
</table>

Then I am parsing the content of template at ItemDataBound event and replacing artificial tags <ItemData> with real values.

Now I need to add controls to issue command to update/delete records. I am catching ItemCreated event and parsing the template for <ItemAction Action="Edit"> and <ItemAction Action="Delete"> and replacing them by Button controls, settings unique ID, and CommandName.

Without RadAjaxManager everything works.

With RadAjaxManager it work but result it strange. When loaded it looks like that:

Name:John Last name:Doe Edit Delete
Name:Bill Last name:Smith Edit Delete
Name:Erik Last name:Peters Edit Delete

After editing (by command a subwindow opens and after completion of edit javascript call server to rebind repeater) it looks following:

Name:Joanna Last name:Doe Edit Delete
Name:Bill Last name:Smith Edit Delete
Name:Erik Last name:Peters Edit Delete

Name:John Last name:Doe Edit Delete
Name:Bill Last name:Smith Edit Delete
Name:Erik Last name:Peters Edit Delete


As you can see, it replicated the content (except HTML) of edited repeater ABOVE the original, that stays untouched.

Any idea why it is and how to fix it ?

 

Evgeny Savkhalov
Top achievements
Rank 1
 answered on 06 Aug 2010
2 answers
128 views
Is there a way to not show ALL groups, even when there is no value for that group? Think of a geography example. You have a grid that is grouped by Country, State, County, City. The grouping structure for a row with a value of "Alabama" should be Country: US. Currently it will show as Country: US > State: [blank] > City: [blank]. I don't want the group header to show up if the value is null - in this example, State and City should not show up. How can I accomplish this?

See the attached files for a "before" and doctored "after" screenshot.
Tsvetina
Telerik team
 answered on 06 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?