
Hello,
I am new in telerik radgrid, working in c#. I am working in a radgrid which have AllowFilteringByColumn feature. I am binding this grid from code behind every time. This grid have 2 extra CheckBox column. Problem is when I am performing any search page load is called and the checked check box disappears after page load. How can I Resolve this problem. I need to keep the previous selection of the check box after performing search on preferred column.
<telerik:RadGrid ID="grdAgreement" runat="server" SelectedItemStyle-CssClass="SelectedStyle"
HeaderStyle-Height="40px" HeaderStyle-BackColor="#CEECF5" AutoGenerateColumns="False"
GroupPanelPosition="Top" ResolvedRenderMode="Classic" Skin="Simple" Width="100%"
ShowStatusBar="True" AllowMultiRowSelection="True" AllowFilteringByColumn="true"
HeaderStyle-Font-Size="18px" HeaderStyle-Font-Bold="true" HeaderStyle-Font-Names="Arial Regular">
<MasterTableView DataKeyNames="Id" >
<Columns>
<telerik:GridBoundColumn DataField="Id" DataType="System.Int32" FilterControlAltText="Filter Id column"
HeaderText="ID" ReadOnly="True" SortExpression="Id" UniqueName="Id" Visible="true" AllowFiltering="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DocumentTitle" FilterControlAltText="Filter DocumentTitle column"
HeaderText="Document Title" SortExpression="DocumentTitle" UniqueName="DocumentTitle" AllowFiltering="true"
AndCurrentFilterFunction="Contains" AutoPostBackOnFilter="True" AllowSorting="True"
HeaderStyle-Font-Size="18px" FilterControlWidth="120px">
<HeaderStyle Width="200px" HorizontalAlign="Center" />
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Select for Template" AllowFiltering="false">
<ItemTemplate>
<asp:CheckBox ID="chkSelectForTemplate" Checked='<%# Eval("SelectforTemp") %>' runat="server" />
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<HeaderStyle BackColor="#CEECF5" Height="40px"></HeaderStyle>
<SelectedItemStyle CssClass="SelectedStyle"></SelectedItemStyle>
</telerik:RadGrid>
code behind
if (!IsPostBack)
{
if (Request.QueryString["ID"] != null)
{
string str_id = Request.QueryString["ID"].ToString();
if (str_id != "")
{
// code for select by ID
BindingGrid(str_id);
}
}
else
{
BindingGrid();
}
}
else
{
}

Hello All,
I'm trying to calculate a percentage in a GridCalculatedColumn, but both input types are integer, so the return value is incorrect (an int formatted as %, which results in 0%, 100% 200% etc.)
Is it possible to cast the value in the expression, or do I have to do it the hard way using itemdatabound or similar?
markup:
<telerik:GridCalculatedColumn DataFields="totalNo,UsedNo" HeaderText="Allocated" DataType="System.Decimal"
Expression="({0} / {1})" ColumnGroupName="Compute" DataFormatString="{0:P}" />
I tried "(Convert.ToDecimal({0}) .... but that gave me errors.
Thx in advance!
M.

Hello,
Is there any reason why Chrome browsers adds this odd border on focus?
So far, I noticed that it happens with TextBox and RadGrid but possibly it happens with other controls too.
When you inspect elements in Chrome there is no such style
Thank you

Protected Sub myGrid_ShowInactivity(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles myGrid.ItemCommand If TypeOf e.Item Is GridDataItem Then Dim item As GridDataItem = e.Item If item("Active").Text = "false" Then item("Name").Text = item("Name").Text + " INACTIVE" item("Name").BackColor = Color.Firebrick item("Name").ForeColor = Color.White End If End IfEnd Sub

Hi!
Radgrid is populated from Database in code behind using "NeedDataSource" event.
CombBox provides the filter for the RadGrid (also get's it's data from the RadGrid's "NeedDataSource" event).
With Viewstate enabled everything works fine.
Question is how can I still filter when Viewstate is disabled on the Grid?
Thanks in advance for your help!
Tom

How to change Some columns in RadGant to ReadOnly ="true"
Colums Default
and Colums GanttCustomField
Is there a way to determine the parent radwindow of a rad button contained in a contenttemplate in client-side javascript?
e.g. if I have two radwindows, each with a radbutton, and each radbutton calls a common OnClientClicking event, is there a way to determine the parent window from the button object in the common code?
<telerik:radWindow runat="server" ID="radwindow1"> <contenttemplate> <telerik:radbutton id="radbutton1" runat="server" onclientclicking="CommonFunction" /> </contenttemplate></telerik:radwindow><telerik:radWindow runat="server" ID="radwindow2"> <contenttemplate> <telerik:radbutton id="radbutton2" runat="server" onclientclicking="CommonFunction" /> </contenttemplate></telerik:radwindow><script>function CommonFunction(button, eventArgs) { var radWindow = ...how to determine which radwindow from the button element? ...}</script>
