Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
244 views
I have 2 grids:

The first one displays tasks and the other one displays tasks settings.

I want to bind data to the second grid based on the selected task id (selected row of the first grid).

Is there any way to implement this functionality?
Eyup
Telerik team
 answered on 17 Sep 2014
1 answer
153 views
Hi all, 
I am using radgrid to display some information. 
In my UI, I need to do some client side javascript checking when the user try to sort a column. 
In order to capture the sorting event, I add the following lines into the radgrid: 
<ClientSettings>
      <ClientEvents OnCommand="RaiseCommand"/>
</ClientSettings>
such that user command could be captured by the javascript function "RaiseCommand".
This works successfully with <telerik:GridBoundColumn>, but not with <telerik:GridTemplateColumn>.
When I do sorting on a <telerik:GridBoundColumn> column, the function "RaiseCommand" was triggered. 
However, when I do sorting on a <telerik:GridTemplateColumn> column, the function "RaiseCommand" wasn't triggered. 
For some reason, <telerik:GridTemplateColumn> need to be used in my grid.

As a illustration, here is my sample code:

Javascript:

        function RaiseCommand(sender, eventArgs) {
            var commandNameLowerCase = eventArgs.get_commandName().toLowerCase();
            if (commandNameLowerCase == "sort") {
                 //do some checking....
            }
        }

Here is aspx:
<telerik:RadGrid ID="radGridTesting" runat="server" AllowFilteringByColumn="True"
AllowPaging="true" AllowSorting="True" GridLines="None" ShowGroupPanel="True"
Skin="WebBlue" AutoGenerateColumns="False" EnableViewState="true"
PageSize="15">
    <GroupingSettings CaseSensitive="false" />
    <PagerStyle AlwaysVisible="true"/>
    <MasterTableView ClientDataKeyNames="TestID" EnableViewState="true" CommandItemDisplay="None" AllowPaging="true">
        <Columns>
            <telerik:GridBoundColumn UniqueName="StockCode" DataField="StockCode" AutoPostBackOnFilter="true" SortExpression="StockCode"     HeaderText="StockCode" ItemStyle-Wrap="false" />
        <telerik:GridTemplateColumn UniqueName="StockName" DataField="StockName" AutoPostBackOnFilter="true" SortExpression="StockName">
            <HeaderTemplate>
                <asp:linkbutton id="lnkStockName" runat="server" Text="StockName" CommandName="Sort" CommandArgument="StockName"/>
            </HeaderTemplate>
            <ItemTemplate>
                <asp:Label ID="lblStockName" runat="server" />
            </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>
    </MasterTableView>
    <ClientSettings>
        <ClientEvents OnCommand="RaiseCommand"/>
    </ClientSettings>
</telerik:RadGrid>

Could anyone advise me of what the problem is?
Any help will be greatly appreciated.

Regards,
Xavier
Eyup
Telerik team
 answered on 17 Sep 2014
4 answers
375 views
Based on input of GridBoundColumn A I would like to do the following

if greater than 0
1) Set GridBoundColumn B value to 0 and to readonly
2) Set a RadComboBox value to one of the options and to readonly (this RadComboBox is one of the columns in the Grid)

If 0
1) remove readonly status from GridBoundColumn B
2) Set a RadComboBox value to one of the options and remove readonly attribute (this RadComboBox is one of the columns in the Grid)

Prefer to do this with no postback


Konstantin Dikov
Telerik team
 answered on 17 Sep 2014
3 answers
56 views
That is a terrible decision on your part. Breaking functionality for such a ridiculous concept of 'opimization'..

In large part, the hidden fields and values are what people WANT to persist in the viewstate.. They are usually ID fields.. 

ReadOnly, Display, and Visible ... which of these properties should NOT be removing labels and textboxes from the default EditTemplate?? The answer is: the ONLY that Telerik uses to do just that 'ReadOnly'.. 

What sort of counter-initative developers are you guys?.. people actually have to add special settings to their controls to have them behave the intuitive way?.. 
Brett
Top achievements
Rank 1
 answered on 16 Sep 2014
1 answer
106 views
Hi,
How to provide data to visual template dynamically using data source created at server side. I am using visual template similar as shown in below link. I want data source to be created at server side and data to be placed in TextBlock (multiple) in template. I need hyperlink in one of the text field in shape. The href value for the hyperlink will come from above data source.

Also I want to provide different colors to the shape and those color values should come from above data source. I will have three categories of shape for example category1, category2 and category3. Depending on the category, I will decide the color for the shape. Categories will come from above data source.

http://dojo.telerik.com/uZeN/6


Many Thanks
Slav
Telerik team
 answered on 16 Sep 2014
3 answers
374 views
Hello,
I want to use Client Template in RadHtmlChart but my data's column name has a special character.
My sample is here (in rune time in c#),
TooltipsAppearance.ClientTemplate = "#=dataItem."+variableX+"#";
VariableX value is "T-001" or "T - 001".

How can i define it?
ahmet
Top achievements
Rank 1
 answered on 16 Sep 2014
1 answer
63 views
Hi,
I use radgrid to create a grid and GridBoundColumn was used to display some field.
Everything works fine except sorting. When I do sorting, there is a grey button-alike image appears in the header of the column. A screen-shot was attached. 
The grey "button" just appears for less than 1 second and then disappears.
I search for a while and I can't find someone having the same problem. Could you please advise me on how I can have that removed?

Regards,
Xavier
Maria Ilieva
Telerik team
 answered on 16 Sep 2014
7 answers
777 views
I have the below code, data is bound to the grid. All the filters work great except GridDateTimeColumn filters - for some reason the filters do not respect the values that I feed into the text box. eg: if I put in 6/10/2009 and choose equal to - I get no rows. Can Someone please tell me why ? I used to use GridBoundColumn for the date , the filter seemed to work but the problem was when users enter 06/10/2009 , it would not convert it back to 6/10/2009. For this reason I changed it to GridDateTimeColumn and now the filters do not work at all. My version of the controls is 2008.3.1314.35.

  <telerik:RadGrid ID="gridInvoices" DataSourceID="odsInvoices" AllowSorting="true" 
        AllowPaging="true" AllowFilteringByColumn="true" AutoGenerateColumns="false" 
        runat="server" EnableLinqExpressions="false" Skin="Office2007" PageSize="15"   
         OnItemDataBound="gridInvoices_ItemDataBound"  OnInit="gridInvoices_Init" 
         AllowAutomaticDeletes="true" >  
        <PagerStyle Mode="Slider"    />  
 
        <MasterTableView DataKeyNames="TRX_NUMBER" ClientDataKeyNames="TRX_NUMBER" CommandItemDisplay="Top">  
            <Columns>  
                    <telerik:GridHyperLinkColumn  HeaderStyle-Width="30px"  NavigateUrl="NonContract.aspx"  UniqueName="Edit" 
                    Text="Edit">  
                      
                    <FilterTemplate>  
                    <asp:LinkButton ID="btnShowAll" runat="server" OnClick="btnShowAll_Click" Text="Clear Filters"></asp:LinkButton>  
                      
                    </FilterTemplate>  
                      
                    </telerik:GridHyperLinkColumn>  
 
                <telerik:GridHyperLinkColumn AllowFiltering="false" ShowFilterIcon="false" HeaderStyle-Width="30px" 
                    NavigateUrl="NonContract.aspx" UniqueName="Copy" HeaderText="" Text="Copy">  
                </telerik:GridHyperLinkColumn>  
                  
                <telerik:GridNumericColumn HeaderStyle-Width="50px" FilterControlWidth="50px" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="right"  DataField="INVOICE_AMOUNT" DataFormatString="{0:c}" HeaderText="Amount" 
               
                <telerik:GridDateTimeColumn HeaderStyle-Width="60px" FilterControlWidth="60px" HeaderStyle-HorizontalAlign="center" DataField="CREATION_DATE" DataFormatString="{0:d}" 
                    CurrentFilterFunction="EqualTo"  ShowFilterIcon="true" HeaderText="Creation Date"  DataType="System.DateTime" PickerType="None" HtmlEncode="false"      />  
       
              </Columns>  
        </MasterTableView>  
        <PagerStyle AlwaysVisible="true" />  
        <ClientSettings>  
            <ClientEvents OnFilterMenuShowing="filterMenushowing" />  
        </ClientSettings>  
    </telerik:RadGrid>  
   
Pavlina
Telerik team
 answered on 16 Sep 2014
1 answer
228 views

Hi 

We design a radlistview in a radlistview item tamplate and thats all in a rad grid (radgrid > radlistview1 > radlistview2)
so when we update grid , we have to access radlistview2's contents but we couldn't find radlistview2 in radgridupdate_command 



our asp code 

   <telerik:RadGrid runat="server" AllowMultiRowSelection="true" AutoGenerateColumns="false" AllowFilteringByColumn="true"
                        AllowPaging="true" PageSize="10" AllowSorting="true"  ID="kategorilerGrid" AllowAutomaticInserts="true" EnableLinqExpressions="false"
                        OnItemDataBound="kategorilerGrid_ItemDataBound"
                        OnUpdateCommand="kategorilerGrid_UpdateCommand" OnDeleteCommand="kategorilerGrid_DeleteCommand"
                        OnNeedDataSource="kategorilerGrid_NeedDataSource" CssClass="RadGrid_gg RadGridRTL_gg">
                        <ClientSettings EnablePostBackOnRowClick="false">
                            <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                        </ClientSettings>
                        <MasterTableView CommandItemDisplay="Top" DataKeyNames="ID">
                            <EditFormSettings InsertCaption="Add new item" CaptionFormatString="Edit Item: {0}"
                                CaptionDataField="ID" PopUpSettings-Modal="true">
                            </EditFormSettings>
                            <Columns>
                                <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                                <telerik:GridBoundColumn FilterControlWidth="90%" DataField="ID" UniqueName="ID" AllowFiltering="false"
                                    HeaderText="ID" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                                    Visible="false" ShowFilterIcon="false">
                                </telerik:GridBoundColumn>
                                
                                <telerik:GridButtonColumn ConfirmText="Kayıt Silinsin Mi?" ConfirmDialogType="RadWindow"
                                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
                            </Columns>
                            <EditFormSettings EditFormType="Template">
                                <EditColumn ButtonType="ImageButton" />
                                <FormTemplate>
                                    <div style="height: 300px; width: 100%;">
                                        <div class="KategoriLeftEditColumn" style="margin-top: 1%;">
                                            <div class="KategoriEditRow">
                                            <div class="KategoriEditLeftRow">
                                                <asp:Label runat="server" ID="KategoriKodLabel">Kategori Kodu :</asp:Label>
                                            </div>
                                            <div class="KategoriEditRightRow">
                                                <telerik:RadTextBox runat="server" ID="KategoriKodTexBox" Width="100%" Text=' <%# Eval("KOD") %>'>
                                                </telerik:RadTextBox>
                                            </div></div>
                                           
                                            <div style="width: 100%; height:35%">
                                                <telerik:RadListView ID="radKategoriDilListView" Width="100%" DataKeyNames="ID" runat="server"
                                                    GroupItemCount="2" VirtualItemCount="2">
                                                    <ItemTemplate>
                                                        <div class="KategoriEditRow">
                                            <div class="KategoriEditLeftRow">
                                                            <asp:Label runat="server" ID="KategoriDegerLabel"><%# Eval("ISIM") %> :</asp:Label>
                                                        </div>
                                                         <div class="KategoriEditRightRow">
                                                            <telerik:RadTextBox runat="server" ToolTip=' <%# Eval("ID") %>' ID="KategoriDegerTextBox"
                                                                Width="100%" Text=' <%# Eval("DEGER") %>'>
                                                            </telerik:RadTextBox>
                                                          
                                                        </div></div>
                                                    </ItemTemplate>
                                                </telerik:RadListView>
                                            </div>
                                       
                                            <div class="KategoriEditRow">
                                               <div class="KategoriEditLeftRow">
                                                <asp:Label runat="server" ID="Label1">Kategori Sınıfı :</asp:Label>
                                            </div>
                                            <div class="KategoriEditRightRow">
                                              <telerik:RadComboBox runat="server" ID="KategoriSinifCombo" EmptyMessage="Kategori Sınıfı Seçiniz.." DataSourceID="SqlDataSource2" DataTextField="DEGER" DataValueField="ID" Width="100%"></telerik:RadComboBox>
                                            </div></div>
                                        </div>
                                        <div class="KategoriRightEditColumn" style="margin-top: 1%">
                                            <div style="width: 100%; height:100%">
                                                <telerik:RadListView ID="KategoriSlaListView" Width="100%" DataKeyNames="ID" runat="server"
                                                    GroupItemCount="2" VirtualItemCount="2">
                                                    <ItemTemplate>
                                                        <div class="KategoriEditRow">
                                            <div class="KategoriEditLeftRow">
                                                            <asp:Label runat="server" ID="KategoriSlaDegerLabel"><%# Eval("PARAMETREDEGER") %> :</asp:Label>
                                                        </div>
                                                         <div class="KategoriEditRightRow">
                                                             <telerik:RadListView ID="radKategoriSlaDilListView" Width="100%" DataKeyNames="ID" runat="server" DataSourceID="SqlDataSource3"
                                                    GroupItemCount="2" VirtualItemCount="2">
                                                    <ItemTemplate>
                                                        <div class="KategoriListEditRow">
                                            <div class="KategoriEditLeftRow">
                                                            <asp:Label runat="server" ID="KategoriDegerLabel"><%# Eval("ISIM") %> :</asp:Label>
                                                        </div>
                                                         <div class="KategoriEditRightRow">
                                                            <telerik:RadTextBox runat="server" ToolTip=' <%# Eval("ID") %>' ID="KategoriDegerTextBox"
                                                                Width="100%" Text=' <%# Eval("DEGER") %>'>
                                                            </telerik:RadTextBox>
                                                          
                                                        </div></div>
                                                    </ItemTemplate>
                                                </telerik:RadListView>
                                                              <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:TYS20DEVConnectionString %>"
            SelectCommand="(SELECT ID, ISIM, NULL AS DEGER FROM DIL)">
        </asp:SqlDataSource>
                                                        </div></div>
                                                    </ItemTemplate>
                                                </telerik:RadListView>
                                            </div>
                                           
                                        </div>
                                        <div style="width: 15%; padding-left: 85%; height: 30px; margin-bottom:0">
                                            <telerik:RadButton runat="server" ID="ParametreUpdateButton" Height="26px" Width="26px"
                                                CommandName="Update" CommandArgument=' <%# Eval("ID") %>'>
                                                <Image ImageUrl="../Images/chk.gif" IsBackgroundImage="true" />
                                            </telerik:RadButton>
                                            <telerik:RadButton runat="server" ID="RadButton1" CommandName="Cancel" Height="26px"
                                                Width="26px">
                                                <Image ImageUrl="../Images/cncl.gif" IsBackgroundImage="true" />
                                            </telerik:RadButton>
                                        </div>
                                    </div>
                                </FormTemplate>
                            </EditFormSettings>
                        </MasterTableView>
                    </telerik:RadGrid>



Konstantin Dikov
Telerik team
 answered on 16 Sep 2014
4 answers
103 views
Is there a way to make the ajax swirl appear via code?  In my case I have a "main" page.  If a user selects an item from the radMenu, I'd like the ajax swirl to appear while the next page is loading, can that be done?
Stacy
Top achievements
Rank 1
 answered on 16 Sep 2014
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?