Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
309 views
Hi All,
I am using radgrid Master-Detail table , having Show/Hide checkbox filter option on master table and its ruuning fine. Depending on Master show/hide checkbox status detail filter option works, but i want 2 diiferent show/hide checkboxs for master and detail radgid, in such a way that in detail table checkbox should come with each row and depending on checkstatus for perticular row checkbox filter option get displayed against each column.

Please help. Below is my code:

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" Width="995px" AutoGenerateColumns="False"

 

 

 

AllowMultiRowSelection="False" AllowPaging="true" PageSize="15" OnDetailTableDataBind="RadGrid1_DetailTableDataBind"

 

 

 

Skin="Sunset" AllowCustomPaging="true" AllowFilteringByColumn="true" OnNeedDataSource="RadGrid1_NeedDataSource"

 

 

 

OnItemCreated="RadGrid1_ItemCreated" OnItemCommand="RadGrid1_ItemCommand" OnInit="RadGrid1_Init"

 

 

 

GroupingSettings-CaseSensitive="false">

 

 

 

<PagerStyle Mode="NumericPages" />

 

 

 

<MasterTableView TableLayout="Auto" AllowMultiColumnSorting="True" CellPadding="0"

 

 

 

DataKeyNames="TXNORDER" Width="100%" CommandItemDisplay="Top" GroupLoadMode="Server">

 

 

 

<CommandItemTemplate>

 

 

 

<asp:CheckBox ID="CheckBox2" AutoPostBack="true" CssClass="CheckBox" runat="server"

 

 

 

ForeColor="White" Text="Show Filter" />

 

 

 

</CommandItemTemplate>

 

 

 

<DetailTables>

 

 

 

<telerik:GridTableView DataKeyNames="TXNORDER" Name="Orders" Width="100%" AllowFilteringByColumn="true">

 

 

 

<Columns>

 

 

 

<telerik:GridTemplateColumn HeaderStyle-Width="5px" AllowFiltering="false">

 

 

 

<ItemTemplate>

 

 

 

<asp:ImageButton ID="imgCheck" runat="server" CausesValidation="false" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "CaptureImageKey")%>'

 

 

 

CommandName='<%# DataBinder.Eval(Container.DataItem, "ItemTypePK")%>' Height="20px"

 

 

 

ImageUrl="~/Images/check-template.png" OnClick="imgCheck_Click" ToolTip="Check Image"

 

 

 

Width="30px" />

 

 

 

</ItemTemplate>

 

 

 

<HeaderStyle Width="40px" />

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridNumericColumn DataField="TXNORDER" HeaderButtonType="TextButton" HeaderText="Transaction#"

 

 

 

SortExpression="TXNORDER" UniqueName="TXNORDER" Visible="False">

 

 

 

</telerik:GridNumericColumn>

 

 

 

<telerik:GridBoundColumn DataField="ItemTypePK" HeaderButtonType="TextButton" HeaderText="Type"

 

 

 

SortExpression="ItemTypePK" UniqueName="ItemTypePK">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="FIELD7" HeaderButtonType="TextButton" HeaderText="Serial#"

 

 

 

SortExpression="FIELD7" UniqueName="FIELD7">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="FIELD6" HeaderButtonType="TextButton" HeaderText="P44"

 

 

 

SortExpression="FIELD6" UniqueName="FIELD6">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="FIELD5" HeaderButtonType="TextButton" HeaderText="Routing#"

 

 

 

SortExpression="FIELD5" UniqueName="FIELD5">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="FIELD4" HeaderButtonType="TextButton" HeaderText="AltSerial#"

 

 

 

SortExpression="FIELD4" UniqueName="FIELD4">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridNumericColumn DataField="FIELD3" HeaderButtonType="TextButton" HeaderText="Account#"

 

 

 

SortExpression="FIELD3" UniqueName="FIELD3" FilterControlWidth="70px" DataType="System.Int32">

 

 

 

</telerik:GridNumericColumn>

 

 

 

<telerik:GridNumericColumn DataField="FIELD2" HeaderButtonType="TextButton" HeaderText="TC#"

 

 

 

SortExpression="FIELD2" UniqueName="FIELD2" FilterControlWidth="70px">

 

 

 

</telerik:GridNumericColumn>

 

 

 

<telerik:GridNumericColumn DataField="Amount" HeaderButtonType="TextButton" HeaderText="Amount"

 

 

 

SortExpression="Amount" UniqueName="Amount" HeaderStyle-HorizontalAlign="left"

 

 

 

ItemStyle-HorizontalAlign="left" FilterControlWidth="70px">

 

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

 

<ItemStyle CssClass="pad" HorizontalAlign="Right" />

 

 

 

</telerik:GridNumericColumn>

 

 

 

<telerik:GridBoundColumn DataField="CaptureImageKey" HeaderButtonType="TextButton"

 

 

 

HeaderText="CaptureImageKey" SortExpression="CaptureImageKey" UniqueName="CaptureImageKey"

 

 

 

Visible="false">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="EnterpriseID" HeaderButtonType="TextButton" HeaderText="EnterpriseID"

 

 

 

SortExpression="EnterpriseID" UniqueName="EnterpriseID" Visible="false">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="ReverseReason" HeaderButtonType="TextButton"

 

 

 

HeaderText="ReverseReason" SortExpression="ReverseReason" UniqueName="ReverseReason"

 

 

 

Visible="false">

 

 

 

</telerik:GridBoundColumn>

 

 

 

</Columns>

 

 

 

</telerik:GridTableView>

 

 

 

</DetailTables>

 

 

 

 

<Columns>

 

 

 

<telerik:GridTemplateColumn HeaderStyle-Width="5px" AllowFiltering="false">

 

 

 

<ItemTemplate>

 

 

 

<asp:ImageButton ID="imgReverseTransaction" runat="server" CausesValidation="false"

 

 

 

Height="20px" Width="20px" CommandArgument='<%#Eval("TXNORDER") + ","+Eval("EnterpriseID")+ ","+Eval("BankID")+ ","+Eval("BranchID")+ ","+Eval("BatchID")+ ","+Eval("OPENEDTIME") + ","+Eval("SourceTypePK")+ ","+Eval("AuxBatchID")%>'

 

 

 

CommandName="ReverseTransaction" ImageUrl="~/Images/undo.png" OnClick="imgReverseTransaction_Click"

 

 

 

OnClientClick="javascript:return confirm('Are you sure you want to reverse this transaction? \n This action cannot be undone.')"

 

 

 

ToolTip="Reverse Transaction" Visible='<%#DataBinder.Eval(Container.DataItem,"ShowImgReverseTransaction")%>' />

 

 

 

</ItemTemplate>

 

 

 

<HeaderStyle Width="30px" />

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridNumericColumn DataField="TXNORDER" HeaderButtonType="TextButton" HeaderText="Transaction #"

 

 

 

SortExpression="TXNORDER" FilterControlWidth="70px" UniqueName="TXNORDER" DataType="System.Int16">

 

 

 

<ItemStyle CssClass="pad" HorizontalAlign="left" />

 

 

 

</telerik:GridNumericColumn>

 

 

 

<telerik:GridBoundColumn DataField="CaptureStatus" HeaderButtonType="TextButton"

 

 

 

HeaderText="Capture Status" SortExpression="CaptureStatus" DataType="System.String"

 

 

 

AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >

 

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="TRANSACTIONTIME" HeaderButtonType="TextButton"

 

 

 

HeaderText="Transaction Time" SortExpression="TRANSACTIONTIME" DataType="System.DateTime">

 

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridNumericColumn DataField="Amount" HeaderButtonType="TextButton" HeaderText="Amount"

 

 

 

SortExpression="Amount" UniqueName="Amount" FilterControlWidth="70px" HeaderStyle-HorizontalAlign="left"

 

 

 

ItemStyle-HorizontalAlign="left" DataType="System.Decimal">

 

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

 

<ItemStyle CssClass="pad" HorizontalAlign="left" />

 

 

 

</telerik:GridNumericColumn>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

<ClientSettings>

 

 

 

<Scrolling AllowScroll="True" EnableVirtualScrollPaging="True" UseStaticHeaders="True"

 

 

 

SaveScrollPosition="True"></Scrolling>

 

 

 

</ClientSettings>

 

 

 

</telerik:RadGrid>

 

Andrey
Telerik team
 answered on 01 Mar 2012
3 answers
371 views
Hi,
      I am using telerik grid in which i have used Dropdown list. I m getiing value in drop down list from another table. So what should be the filter criteria i use.
<telerik:GridDropDownColumn DataField="INSTRUMENT_ID" DataSourceID="SqlDataSource2"
                ShowFilterIcon="false" HeaderText="PRODUCT NAME" ListTextField="INSTRUMENT_NAME"
                ListValueField="INSTRUMENT_ID"  
                UniqueName="INSTRUMENT_ID" ColumnEditorID="GridDropDownListColumnEditor1">
            </telerik:GridDropDownColumn>

bt it gives me error like
No property or field 'Jeevan' exists in type 'DataRowView'


Please Reply
Tsvetina
Telerik team
 answered on 01 Mar 2012
3 answers
182 views
I've seen a few similar posts, but not this exact issue:

I'm getting some un-wanted vertical borders when using a GridTemplateColumn. I'm not sure if I just have some setting wrong or maybe just missing an a type.

I have a screen shot, but I'm unsure of how to insert that into the thread.

Here is my RadGrid code:

 

<telerik:RadGrid ID="RadGrid1" Skin="Forest" Width="97%" AllowSorting="True" EnableAJAX="True"

 

 

 

AllowPaging="True" PageSize="25" runat="server" OnSortCommand="RadGrid1_SortCommand" OnPageIndexChanged="RadGrid1_PageIndexChanged"

 

 

 

AllowFilteringByColumn="false" GridLines="None" >

 

 

 

<MasterTableView Width="100%" AutoGenerateColumns="false">

 

 

 

<Columns>

 

 

 

<telerik:GridTemplateColumn UniqueName="TemplateColumn1">

 

 

 

<HeaderTemplate>

 

 

 

<table id="Table1" cellspacing="0" cellpadding="0" width="300" border="0">

 

 

<tr><td align="center"><b>Test Template</b></td></tr>

 

 

</

 

table>

 

 

 

</HeaderTemplate>

 

 

 

<ItemTemplate>

 

 

 

<table id="Table2" cellspacing="0" cellpadding="0" width="300" border="0">

 

 

 

<tr><td ><%# DataBinder.Eval(Container.DataItem, "FirstName") %></td></tr>

 

 

 

<tr><td ><%# DataBinder.Eval(Container.DataItem, "LastName") %></td></tr>

 

 

 

</table>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

<PagerStyle Mode="NextPrevAndNumeric" />

 

 

 

</telerik:RadGrid>


 

 

Galin
Telerik team
 answered on 01 Mar 2012
1 answer
152 views
Hello,

I am using a RadGrid as part of a custom control (DNN module, actually) for contact management. I have a simple RadGrid set up with an external insert/edit form, and aside from the issue with allowing duplicate inserts, it's working perfectly.

When inserting new records, or updating existing records, we want to detect duplicate records (based only on fistname and lastname comparisons) and prompt/warn the user to ensure they are aware of the duplicate. 

In the case of no duplicates, the insert/update should just happen.
In the case of duplicates, the user should be asked if they want to insert anyway, or cancel.

Does RadGrid have any kind of built in support for this kind of workflow? Or am I going to have to replace the current submit button with my own method that makes an AJAX call to search for duplicates, and then react accordingly? I am trying to keep the code as simple as possible for long-term maintenance purposes.


Thanks,
Dave
Marin
Telerik team
 answered on 01 Mar 2012
2 answers
105 views
Hi,

I'm using radGrid with custom paging. I also use NeedDataSource event to get data.

I stuck when I click Export command in item Command row (I only have export command). I dont know how to distinguish that export command is clicked inside NeedDataSource method (because its executing before Export event of grid).

I have tried this:
if (e.RebindReason == GridRebindReason.ExplicitRebind)
            {
                rgActions.AllowPaging = false;
                rgActions.AllowCustomPaging = false;
            }
            else
            {
                rgActions.AllowPaging = true;
                rgActions.AllowCustomPaging = true;
             
            }

but its not ok because explicit rebinding is also done when any othe button is clicked on page that rebind grid.


Marko Gluhak
Top achievements
Rank 1
 answered on 01 Mar 2012
1 answer
464 views
Hello,

By default every item text gets wrapped if its longer than width of RadListBox.
How to set width of RadListBox dynamically based on text of item. Basically I want to expand width of RadListBox, without wrapping text of item.
In below example, 3rd item gets wrapped automatically. I want to expand RadListBox in a way that it can fully accommodate 3rd item without wrapping or scroll bar.
 
  <telerik:RadListBox
        runat="server" ID="RadListBoxSource"
        Height="200px">
        <Items>
            <telerik:RadListBoxItem Text="China" Value="1"/>
            <telerik:RadListBoxItem Text="Egypt" Value="1"/>
            <telerik:RadListBoxItem Text="England England England England England England England England England" Value="1"/>
            <telerik:RadListBoxItem Text="France" Value="1"/>
        </Items>
    </telerik:RadListBox>

Appreciate any help.

Thanks
Paresh
Bozhidar
Telerik team
 answered on 01 Mar 2012
5 answers
142 views
HI,

I tried Implementing A Provider That Supports Multi-valued Resources. It works fine for appointment without recurrence. When I switch from day view to week view it will show following message if  there is an appointment with recurrence.

Error: Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

By the way, I tried to create a appointment with recurrence on your demo site using following link. It also throws exception:

http://demos.telerik.com/aspnet-ajax/scheduler/examples/multipleresourcevalues/defaultcs.aspx


Please let me know how to fix this

Alan
Peter
Telerik team
 answered on 01 Mar 2012
1 answer
132 views
I am unable to get border for my label on the chart. Please suggest. 

Code:
 <Appearance> 
                                                                    <LabelAppearance Position-AlignedPosition="Center" LabelLocation="Inside">
                                   <Border Color="#38b0ef" />
                                                                     </LabelAppearance>
                                                                </Appearance>
Evgenia
Telerik team
 answered on 01 Mar 2012
1 answer
96 views
If you add a table as the very first thing you do in the editor, you can't position the cursor before or after the table in design view.

FYI, our end users only have access to design and preview views.

One worth fixing, I think.

--
Stuart
Rumen
Telerik team
 answered on 01 Mar 2012
1 answer
49 views
Hi there

We are using RADEditor (6.2) with SharePoint 2010 with a slightly modified version of the News site.  The page has 3 fields ('Title' [single line of text], 'Page Description' [multiple lines of text] and 'Page Content' [publishing html]).

The problem we have is that the 'Page Description' field is rendered with the HTML treated as part of the text (so the the user is shown the raw HTML).  However, when in edit mode, the field renders correctly.  The other fields on the page behave as expected in both modes.

Could someone tell me what is going on here?

Thanks,
AndrewvR

Rumen
Telerik team
 answered on 01 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?