Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
110 views
Hello. Here is what I try to do. A user clicks on the row in the radgrid, and then the code is running on the server. Please note the unusual construction of the radgrid. Is there any way to do this ?

rik:RadGrid ID="gv_umowy" runat="server" DataSourceID="sql_moje_umowy" AutoGenerateColumns="False" 
            GridLines="None" AllowSorting="True">  
            <MasterTableView DataKeyNames="id_umo" DataSourceID="sql_moje_umowy">  
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="nazwa_kh" HeaderText="Kontrahent" HeaderStyle-Width="200px" 
                        ItemStyle-Width="200px">  
                        <HeaderStyle Width="200px"></HeaderStyle> 
                        <ItemStyle Width="200px"></ItemStyle> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="nr_ewidencyjny" HeaderText="Nr umowy AU" HeaderStyle-Width="90px" 
                        ItemStyle-Width="90px">  
                        <HeaderStyle Width="90px"></HeaderStyle> 
                        <ItemStyle Width="90px"></ItemStyle> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="waznosc_umowy" HeaderText="Data obowiÄ…zywania" 
                        DataFormatString="{0: dd-MM-yyyy}" HeaderStyle-Width="90px" ItemStyle-Width="90px">  
                        <HeaderStyle Width="90px"></HeaderStyle> 
                        <ItemStyle Width="90px"></ItemStyle> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="odpowiedzialna" HeaderText="Osoba odpowiedzialna" 
                        HeaderStyle-Width="90px" ItemStyle-Width="90px">  
                        <HeaderStyle Width="90px"></HeaderStyle> 
                        <ItemStyle Width="90px"></ItemStyle> 
                    </telerik:GridBoundColumn> 
                </Columns> 
                <ItemTemplate> 
                    <href="#" target="_blank" onclick="klik('<%#Eval("id_umo")%>')">  
                        <table border="0" align="left" width="100%">  
                            <tr> 
                                <td width="200px">  
                                    <%#IIf(Len(Eval("nazwa_kh")) > 32, Left(Eval("nazwa_kh"), 32) + "...", Eval("nazwa_kh"))%> 
                                </td> 
                                <td width="90px">  
                                    <%#Eval("nr_ewidencyjny")%> 
                                </td> 
                                <td width="90px">  
                                    <%#IIf(Eval("waznosc_umowy") = "1900-01-01", "bezterminowa", String.Format("{0:d}", Eval("waznosc_umowy")))%> 
                                </td> 
                                <td width="90px">  
                                    <%#Eval("odpowiedzialna")%> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td colspan="5" width="100%">  
                                    <b> 
                                        <%#Eval("opis")%></b>  
                                </td> 
                            </tr> 
                        </table> 
                    </a> 
                </ItemTemplate> 
            </MasterTableView> 
            <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" AllowDragToGroup="True">  
                <Selecting AllowRowSelect="True" /> 
                <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
Krzysztof
Top achievements
Rank 1
 answered on 06 Jan 2010
4 answers
541 views

Hi, 
 
I want to implement the multicolumn sorting for radgrid placed in the user control .i have some default sorting (multi column) depends on the page where the user control is used . so , i have used the following code to set the default sorting in the user control ,

<

 

SortExpressions>

 

 

<telerik:GridSortExpression FieldName="SupplierDueDate" SortOrder="Ascending" />

 

 

<telerik:GridSortExpression FieldName="CountyName" SortOrder="Ascending" />

 

 

<telerik:GridSortExpression FieldName="Municipality" SortOrder="Ascending" />

 

 

<telerik:GridSortExpression FieldName="PostalCode" SortOrder="Ascending" />

 

 

<telerik:GridSortExpression FieldName="CooperativeHousing" SortOrder="Ascending" />

 

</

 

SortExpressions>

Then i planned to change these settings(i.e) the columns  programmatically in the server side (to overrride these settings based on the page) like these:

 

 

case "MyOrders":

 

 

 

 

 

 

 

 

 

this.grdOrderList.MasterTableView.SortExpressions.Clear();

 

sortExpr =

new GridSortExpression();

 

sortExpr.FieldName =

"CreatedTime";

 

sortExpr.SortOrder =

GridSortOrder.Ascending;

 

 

this.grdOrderList.MasterTableView.SortExpressions.AddSortExpression(sortExpr);

 

 

break;

 

 

But this seems not working ... since using the sortExpression.Clear() i see a small command button in the headers of the column(just beside the column name ) .... please tell  me where im going wrong with the possible solution to implement the above 

thanks in advance,
Balajee


 



Balajee Vasudevan
Top achievements
Rank 1
 answered on 06 Jan 2010
1 answer
103 views
Hi,
I am using your Rad Scheduler and have customized the Advanced Form by studying it from MSDN topic "Customize The Advance Form Template". I would like to know I have added two dropdown controls in it. Data binding is done programmatically to sharepoint list. Problem I am facing is that the textbox controls I have added to the defaultScheduler form works fine. I am getting the value I entered in it. I have made two seperate drop down controls (like in the demo Telerik have provided ResourceControl). Each is seperately binded. When I click Insert in the Adavanced Form, I dont get the selected value in the drop down. Please assist me with this. How can i get the value selected in the drop down Box.

Yours Truly
Hammad Haneef Pasha
T. Tsonev
Telerik team
 answered on 06 Jan 2010
1 answer
145 views
I have a situation where I have several nested radgrids on the same page. The page takes a very time to load, mostly to the heavy amount of code on the rest of the page. I am not able to refactor this page at the time. The client needs to be able to add multiple rows to various grids, and then when the form is posted back, all of the rows are added. In addition, they need to be able to edit / delete rows. Currently this works through viewstate, which I have already moved to a session state persister to increase performance. If there is an example of this behavior, that would be great. I'm not afraid of writing a little javascript either.
Pavlina
Telerik team
 answered on 06 Jan 2010
3 answers
169 views
Hi All

Have a grid with some datas from a table M_Products (ProductID, Name, ItemID).

While Edit or Add New Record is clicked, Need to show another grid with datas from M_Item table (ItemID, Item Name).

This is due to, Have to display all the items with (M_Product.ItemID=M_Item.ItemID).

So have to show another grid inside EditItemTemplate.

Please could I know is there any possible way.

Thank You.

-Anto




Princy
Top achievements
Rank 2
 answered on 06 Jan 2010
1 answer
143 views
Hi there

I am new at this, so please bear with me
I've looked at all the different demos and read numerous threads, but I was unable to find how to do the following

I have two tabs opened at the same time (IE), and I would like to transfer 2 strings from tab1 to tab2 when e SEARCH button is pressed.

The 2 strings are in textboxes in tab1 and I would like them to be transfered to their corresponding filter fields in tab2, where the radgrid is.
Once the transfer of strings and focus is set on tab2, the grid will filter to display the corresponding records found.

(The radgrid on tab2 already filters by itself as soon as you put a value on any of the filters)

I hope someone can help.



Radoslav
Telerik team
 answered on 06 Jan 2010
3 answers
259 views
In my RadGrid I have a master table and a detail table. I need the first column of the detail table to display an image that rowspans the entire detail table. The url of the image to be displayed is a datakeyvalue from the mastertable row.

So, if the detail table has 2 records, the image will rowspan 2 rows; if the detail table has 10 records, the image will rowspan all 10 records. 

I've seen some code for setting a rowspan in a master table, but I can't seem to get it work for a detail table. 

Any help would be greatly appreciated!
Yavor
Telerik team
 answered on 06 Jan 2010
4 answers
329 views
<telerik:RadGrid ID="gvLeadsHistory" runat="server" CssClass="radgrid" AllowPaging="True" 
                                EnableEmbeddedSkins="false" ShowFooter="false" AutoGenerateColumns="False" GridLines="None" 
                                AllowSorting="True" Width="450px" AllowMultiRowSelection="true" OnItemDataBound="gvLeadsHistory_ItemDataBound" 
                                OnSortCommand="gvLeadsHistory_SortCommand">  
                                <MasterTableView CssClass="radgridMasterTable" AllowCustomSorting="true" Width="100%" 
                                    ShowHeadersWhenNoRecords="true" TableLayout="Fixed" ClientDataKeyNames="lead_id">  
                                    <NoRecordsTemplate> 
                                        <div style="padding: 5px 0px 5px 0px; text-align: center; height: 20px; font-family: Verdana, Arial, Helvetica, sans-serif;  
                                            font-size: 1.1em; font-weight: bold;"> 
                                            No Lead History Records.</div> 
                                    </NoRecordsTemplate> 
                                    <HeaderStyle CssClass="radgridheader" VerticalAlign="Middle" /> 
                                    <Columns> 
                                        <telerik:GridBoundColumn UniqueName="Date" HeaderText="Date" AllowSorting="true" 
                                            DataField="Activity_Date" HeaderStyle-Width="70" SortExpression="Activity_Date" 
                                            ShowSortIcon="true" SortAscImageUrl="../Images/icons/arrow_down.gif" SortDescImageUrl="../Images/icons/arrow_up.gif">  
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn UniqueName="Type" HeaderText="Type" DataField="Activity_Type" 
                                            HeaderStyle-Width="90" SortExpression="Activity_Type" ShowSortIcon="true" SortAscImageUrl="../Images/icons/arrow_down.gif" 
                                            SortDescImageUrl="../Images/icons/arrow_up.gif">  
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn UniqueName="Description" HeaderText="Description" DataField="Activity_Description" 
                                            HeaderStyle-Width="200" AllowSorting="false">  
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridTemplateColumn HeaderStyle-VerticalAlign="Middle" UniqueName="TypeOfLead" 
                                            HeaderText="Action" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="40">  
                                            <ItemTemplate> 
                                                <asp:LinkButton ID="imgbActivityEdit" runat="server" ImageUrl="../Images/icons/icon_edit.gif" 
                                                    ToolTip="Edit" OnCommand="gvActivity_RowEditing" CommandArgument='<%# Eval("[Activity_Id]") %>'>  
                                                    <img src="../Images/icons/icon_edit.gif" alt="Edit"/></asp:LinkButton> 
                                                <asp:LinkButton ID="imgbActivityDelete" runat="server" ImageUrl="../Images/icons/icon_delete.gif" 
                                                    ToolTip="Delete" OnCommand="ActivityDelete_Click" CommandArgument='<%# Eval("[Activity_Id]") %>'>  
                                                    <img src="../Images/icons/icon_delete.gif" alt="Delete"/></asp:LinkButton> 
                                                <asp:Label ID="lblActivityId" runat="server" Text='<%# Eval("[Activity_Id]") %>' 
                                                    Visible="False"></asp:Label> 
                                                <asp:Label ID="lblActivityType" runat="server" Text='<%# Eval("[Activity_Type]") %>' 
                                                    Visible="False"></asp:Label> 
                                            </ItemTemplate> 
                                        </telerik:GridTemplateColumn> 
                                    </Columns> 
                                </MasterTableView> 
                            </telerik:RadGrid> 
hi please find attached the model of my rad grid, here im having Norecorf template, but since im having grid item template, that two images are still displaying, if the record set have no records, instead of showing "No records"
please help.
Saran kumar
Top achievements
Rank 1
 answered on 06 Jan 2010
1 answer
82 views
Hi,

I purchased the RadControls for ASP.net AJAX, and implemented version 5.5.1 of the RadEditor for SharePoint (I'm using MOSS - in particular - a Publishing Site) in my environment, and it works.  Where I am having an issue is with a few of my page layouts, where I have anywhere from 12-17 content areas.  When switching into page editing mode, the pages take anywhere from 20-30 seconds to load, and the browser will hang during this load time.  I've implemented a lot of the recommendations from the KB Article:

In my Config file:
  <property name="ToolbarMode">ShowOnFocus</property>
  <property name="EnableServerSideRendering">False</property>
  <property name="EnableViewState">False</property>
  <property name="EnableClientSerialize">False</property>
  <property name="EnableDocking">False</property>

And in my tools file, I have removed the one module that was loading.

So my question is - is there anything else I can do to speed this up?  I looked at using the Tool Provider (From this page), but that's not supported by the Editor for SharePoint.

Thanks,
Chris
Stanimir
Telerik team
 answered on 06 Jan 2010
1 answer
146 views
Hello there,
I have a RadListView inside a RadListView both with a RadDataPager inside the layout template something like this:

<telerik:RadListView ID="ListView1"
  <LayoutTemplate> 
    ............... 
    <telerik:RadDataPager ID="DataPager1" PagedControlID="ListView1"></telerik:RadDataPager> 
  </LayoutTemplate> 
  <ItemTemplate> 
    ....................... 
    <telerik:RadListView ID="ListView2"
      <LayoutTemplate> 
          ...................... 
          <telerik:RadDataPager ID="DataPager2" PagedControlID="ListView2"></telerik:RadDataPager> 
      </LayoutTemplate> 
    </telerik:RadListView> 
  <ItemTemplate> 
<telerik:RadListView> 


You can see what i mean here Image

All works fine without ajax, now i want to ajaxify the internal listview and their datapager so i added this:

   
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="DataPager2"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="ListView2" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManagerProxy> 


(I have a master page)

Again the first item of Listview1 is working fine  (the first datapage you see in the picture) i can change page of listview2 inside it without any page reload BUT when i click on the datapager in the second item of the listview1 i have a page reload and the datapager of the upper listview resets... it's like the second datapager isn't ajaxified.

I tried also with updatepanel and radajaxpanel to see if it works but i had no success.

I hope the explanation was clear enough, if not just ask.

Waiting for some help, thanks in advance for your time.
Yavor
Telerik team
 answered on 06 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?