
I'm trying to figure out how to bind my DataSource (in my case this is assigned in Code Behind using List) to a RadCheckBox in my ItemTemplate.
My code that isn't working:
<telerik:RadGrid ID="rg_Balances" runat="server" AutoGenerateColumns="False"> <MasterTableView TableLayout="Auto"> <Columns> <telerik:GridTemplateColumn DataField="Selected" DataType="System.Boolean" HeaderText="Select Unit(s) To Pay"> <ItemTemplate> <telerik:RadCheckBox ID="rcb_Selected" runat="server" OnCheckedChanged="UpdateTotal" AutoPostBack="true"></telerik:RadCheckBox> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="UnitMask" DataType="System.String" HeaderText="Unit" ReadOnly="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Balance" DataType="System.Decimal" DataFormatString="{0:C2}" HeaderText="Balance" ReadOnly="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="IncludeNextCharges" DataType="System.Boolean" HeaderText="Include Next Charges"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="NextPeriodTotalCharges" DataType="System.Decimal" DataFormatString="{0:C2}" HeaderText="Next Charges" ReadOnly="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Total" DataType="System.Decimal" DataFormatString="{0:C2}" HeaderText="Unit Total" ReadOnly="true"></telerik:GridBoundColumn> </Columns> </MasterTableView> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling> </ClientSettings> </telerik:RadGrid>
The binding property is called "Selected" and it's a member of my object in my List of objects. In SL5 I accomplished this with the following code:
<telerik:RadGridView.Columns> <telerik:GridViewDataColumn x:Name="ServiceMAPIDColumn" Header="ServiceID" IsVisible="False" DataMemberBinding="{Binding ServiceMAPID}"/> <telerik:GridViewDataColumn x:Name="ServiceSelectedColumn" Header="" DataMemberBinding="{Binding Selected, Mode=TwoWay}" IsReadOnly="True"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <CheckBox x:Name="ServiceSelectedCheckBox" IsChecked="{Binding Selected, Mode=TwoWay}" Tag="{Binding}"> <i:Interaction.Triggers> <i:EventTrigger EventName="Click"> <ei:CallMethodAction TargetObject="{Binding Path=DataContext, RelativeSource={RelativeSource AncestorType=sdk:ChildWindow}}" MethodName="UpdateCustomerUnitServiceSelected" /> </i:EventTrigger> </i:Interaction.Triggers> </CheckBox> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> </telerik:GridViewDataColumn> <telerik:GridViewDataColumn x:Name="ServiceNameColumn" Header="Service" IsReadOnly="True" Width="198" DataMemberBinding="{Binding ServiceName}" /> <telerik:GridViewDataColumn x:Name="ServiceAmountColumn" Header="Amount" IsReadOnly="True" Width="80" DataMemberBinding="{Binding ServiceAmount}" TextAlignment="Right" DataFormatString="{}{0:C2}"/> </telerik:RadGridView.Columns>
In ASP.NET AJAX there doesn't appear to be a DataTemplate or anything similar?
Any hints on how I can get a RadCheckBox bound to a RadGrid datasource?
Cheers, Rob.
Does this control not support a node that has more than 1 parent?
--Org
--district one
--sales
--district two
--sales
where sales object is child of both district one and district two.
Hi,
i'm developing file management system using RadAsyncUpload with custom HttpHandler.
System is build with ASP.NET using .NET Framework version 4.6.1 and latest Telerik UI for ASP.NET Ajax.
Currently i'm using overridden Process-function in my HttpHandler to store the file in database. I have set DisableChunkUpload="true" and EnablePermissionsCheck="false" so it is not using temporary folder to buffer the file data. But it still buffers the data in memory (a guess) before calling Process-function.
Uploaded files can be large and there can be over 100 files uploading at once. So i wonder if there is a way to get the uploaded file's InputStream at beginning of the upload, so i can stream it directly to the database as it uploads. So whole file won't get buffered in WEB server at any point. As one can do with regular uploads like this:
Using Command As SqlCommand = New SqlCommand(String.Concat("INSERT INTO Dokuments(DokumData...) values (@DokumData...)"), connection)'Other params
Command.Parameters.Add("@DokumData", SqlDbType.Binary, -1).Value = oHttpPostedFile.InputStream 'oHttpPostedFile is from fileuploadconnection.Open()Command.ExecuteScalar()connection.Close()
Given the following definition in a Radgrid column:
<telerik:GridBinaryImageColumn DataField="ReceiptThumb" HeaderText="Receipt Image" UniqueName="ReceiptThumb" ResizeMode="Fit" ImageWidth="100" ImageHeight="100" />
What would be the best way to add a click event which would either 1) open a new window in a _blank target frame, or 2) open a radwindow on the same page -- to allow a full-size image of the thumbnail displayed in the grid to display?
... while not disturbing the in-place edit form insert/edit functionality?

In the radgrid, I have a boolean value binds to telerik:GridCheckBoxColumn.
By default the checkbox is disabled. Is it possible to enable it in the grid browse mode (not in row edit mode), and allow postback when use check or uncheck the checkbox(so in the codebehind the value can be updated and saved to database)?
This is the document for gridcheckboxcolumn: http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/columns/column-types#gridcheckboxcolumn.
Thanks.

Hi team,
We have grid in windows application and having functionality to remove columns by dragging the column and dropping it outside the grid. now we are migrating the current windows client application to web based solution and we have considered using telerik ajax UI controls for development which has the similar features.. however for drag and drop functionality, RadGrid support only row level. what we need is column level, user should be able to remove the column by dragging and dropping the column outside..
Regards,
Suruli

Hi there,
I am trying to change the expand/collapse of the radgrid on the fly. The reason is because I wanna change the icon when I do not have any item on the detail table for the respective Item, working as a visual cue.
Following is my code:
GridItem[] nestedViewItems = tableView.GetItems(GridItemType.NestedView);
foreach (GridNestedViewItem nestedViewItem in nestedViewItems)
{
foreach (GridTableView nestedView in nestedViewItem.NestedTableViews)
{
if (**myBusinessLogic**)
{
nestedView.ExpandCollapseColumn.ButtonType = GridExpandColumnType.ImageButton;
nestedView.ExpandCollapseColumn.ExpandImageUrl = "../Resource/Image/CustomExpand.png";
nestedView.ExpandCollapseColumn.CollapseImageUrl = "../Resource/Image/CustomCollapse.png";
}
}
}
After running this code the icon remains the same.
Thank you
