Already I implemented custom sorting and custom paging with objectdatasource and database. Now I need to implement custom filtering in rad grid with objectdatasource and database.
Can you send me any sample solution?
hi,
i bind hmtlchart from dataset i want to display just the datetime wich is into dataset but in displaying it's apear an interval of datetime
in this pics you wille understanding me more and i use gridview to disply the data are in dataset plz help me i'm working in project and i need help quickly
Hi all,
Currently I am facing a problem regarding Radgrid Group Footer Dynamic calculation.
I have a radgrid that have some GridTemplateColumns that allow me to key in some value
Example
<telerik:GridTemplateColumn UniqueName="Quantity" HeaderText="Quantity" DataField="Quantity" Aggregate="Sum" >
<ItemTemplate>
<asp:TextBox ID="lbl_Quantity" Text='<%# DataBinder.Eval(Container.DataItem, "Quantity" , "{0:0.00}") %>'
Width="40px" runat="server" autopostback="true" onTextChanged="calQuantity"></asp:TextBox>
<br />
</ItemTemplate>
</telerik:GridTemplateColumn>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<GroupByFields>
<telerik:GridGroupByField FieldName="Grp"></telerik:GridGroupByField>
</GroupByFields>
<SelectFields>
<telerik:GridGroupByField FieldName="Grp" HeaderText="Week"></telerik:GridGroupByField>
</SelectFields>
</telerik:GridGroupByExpression>
Group Footer displayed correctly when the grid load. However, what I was trying to achieve is when I change the value of the quantity it will auto recalculate the group footer. I tried to achieve it using onTextChanged="calQuantity" but not success.
Do you all have any idea on this?
Thank you.

hi
is there any skin/easy way of implementing the tab strip in vertical mode , but having the text vertical too ?
Peter
Can I use RadAutoCompleteBox for completing the text I write (not selecting single or multiple items) and bind just the text property in design time?
Hi.
I am porting an old applications chart section from RadChart to RadHtml chart and am struggeling with how to edit serie items prior to rendering. The main problem is that since we are binding against an list of objects where some integer properties contains -1 values (which in our context means NULL/UNDEFINED). I cannot change this behaviour of the object since the system heavily rely on that fact.
When using RadChart we could "hook into" the series items in the ItemDataBound event. See example below.
How can I achieve the same thing with RadHtmlChart ?
BR
Johan
var columnInfo = _basicReportsPresenter.GetColumnInfoByName(e.ChartSeries.DataYColumn);if (!columnInfo.ColumnInfoAttribute.DisplayNegativeValues){ if (e.SeriesItem.YValue < 0) { if (_enableEmptyValues) e.SeriesItem.Empty = true; e.SeriesItem.YValue = 0; }}Hi !
I'm trying to resolve a problem for a long time now without success and I really can’t find a solution…. Please, help me…
My problem is in the RadGrid1_UpdateCommand()
I can’t get a value from a RadNumericTextBox
Well, I get the value, but when there is a multiple edited values, my code only get the last edited value of the RadNumericTextBox
What I want to do :
I have 3 tables in my databases :
PRODUCTS
product_id
group_ref
…
CATEGORIES
category_id
…
LINKS
link_id
link_product_id
link_category_id
link_points
See my attached image to see the links between them..
This is my select command to fill the radgrid :
select distinct group_ref, link_points, link_category_id
FROM LINKS
INNER JOIN PRODUCTS ON PRODUCTS.product_id = LINKS.link_product_id
WHERE link_category_id=10
ORDER BY link_points desc, group_ref
I want to update all link_points that are associated to a link_category_id AND a group_ref
In the PRODUCTS Table, many products can have the same group_ref value.
So, this is my update command I want to do :
UPDATE LINKS SET link_points = ???
FROM LINKS
INNER JOIN PRODUCTS ON PRODUCTS.product_id = LINKS.link_product_id
WHERE group_ref ='xxxxx' AND link_category_id=xxxxx
This is my Radgrid html code :
<telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticInserts="false" AllowAutomaticDeletes="false" AllowAutomaticUpdates="True"
Skin="Metro" Width="100%" OnLoad="Unnamed_Load1" PageSize="100" AllowPaging="True" DataSourceID="SqlDataSource1" AutoGenerateColumns="False"
OnPreRender="RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound" OnUpdateCommand="RadGrid1_UpdateCommand">
<PagerStyle Mode="NextPrevAndNumeric" Position="Bottom" PageSizeLabelText="Nombre de ligne(s) :" PageSizeControlType="None" PageSizes="100"
NextPageToolTip="Page suivante" PrevPageToolTip="Page précédente" FirstPageToolTip="Première page" LastPageToolTip="Dernière page" />
<MasterTableView CommandItemDisplay="TopAndBottom" AllowAutomaticInserts="false" EditMode="Batch" InsertItemDisplay="bottom" AllowAutomaticUpdates="true"
DataSourceID="SqlDataSource1" HorizontalAlign="NotSet" AutoGenerateColumns="False">
<BatchEditingSettings EditType="Cell" />
<SortExpressions>
<telerik:GridSortExpression FieldName="group_ref" SortOrder="Descending" />
</SortExpressions>
<Columns>
<telerik:GridBoundColumn DataField="link_category_id" HeaderText="Produit matière" ReadOnly="true"
ItemStyle-HorizontalAlign="left" HeaderStyle-HorizontalAlign="left"
SortExpression="link_category_id" UniqueName="link_category_id">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="group_ref" HeaderText="Ref. de groupe" ReadOnly="true"
ItemStyle-HorizontalAlign="left" HeaderStyle-HorizontalAlign="left"
SortExpression="group_ref" UniqueName="group_ref">
</telerik:GridBoundColumn>
<telerik:GridNumericColumn DataField="link_points"
ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
HeaderStyle-Width="100px" HeaderText="Classement" ItemStyle-Width="100px"
SortExpression="link_points" UniqueName="link_points">
</telerik:GridNumericColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="True"></Selecting>
</ClientSettings>
</telerik:RadGrid>
And this is my code behind :
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
GET_SELECT_CMD()
End If
End Sub
Private Sub GET_SELECT_CMD()
Dim sscatid As String = Trim(Request.QueryString("o"))
Dim strCmd As String = "select distinct group_ref, link_points, link_category_id "
strCmd = strCmd & " from LINKS "
strCmd = strCmd & " INNER JOIN PRODUCTS ON PRODUCTS.product_id = LINKS.link_product_id "
strCmd = strCmd & " WHERE link_category_id=" & sscatid & " "
strCmd = strCmd & " ORDER BY link_points desc, group_ref "
SqlDataSource1.SelectCommand = strCmd
RadGrid1.MasterTableView.BatchEditingSettings.OpenEditingEvent = GridBatchEditingEventType.Click
End Sub
Protected Sub Unnamed_Load1(sender As Object, e As EventArgs)
GET_SELECT_CMD()
End Sub
Protected Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)
Dim db As New DAL_SQL
Try
Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem)
Dim TriNumericTextBox As RadNumericTextBox = TryCast(item.OwnerTableView.GetBatchColumnEditor("link_points"), GridNumericColumnEditor).NumericTextBox
Dim strTriValue As String = TriNumericTextBox.Text.ToString()
Dim strSsCatId As String = Trim(Request.QueryString("o"))
Dim strRefGroupe As String = item.Cells(3).Text
If Not ((strTriValue <> "") And IsNumeric(strTriValue)) Then
strTriValue = "0"
End If
Dim sql_upd As String = "UPDATE LINKS SET link_points = " & strTriValue & " "
sql_upd = sql_upd & " FROM LINKS "
sql_upd = sql_upd & " INNER JOIN PRODUCTS ON PRODUCTS.product_id = LINKS.link_product_id "
sql_upd = sql_upd & " WHERE group_ref='" & strRefGroupe & "' AND link_category_id=" & strSsCatId
db.ExecuteNonQuery(sql_upd)
Catch ex As Exception
ErrTxt = ex.ToString()
End Try
db = Nothing
End Sub
Protected Sub RadGrid1_ItemDataBound(sender As Object, e As GridItemEventArgs)
If TypeOf e.Item Is GridCommandItem Then
Dim addButton As Button = TryCast(e.Item.FindControl("AddNewRecordButton"), Button)
addButton.Visible = False
Dim lnkButton As LinkButton = DirectCast(e.Item.FindControl("InitInsertButton"), LinkButton)
lnkButton.Visible = False
End If
End Sub
Everything works fine, but the line in RadGrid1_UpdateCommand() only get the last edited value and not the value of each item edited :
Dim TriNumericTextBox As RadNumericTextBox = TryCast(item.OwnerTableView.GetBatchColumnEditor("link_points"), GridNumericColumnEditor).NumericTextBox
How can I get the value of each RadNumericTextBox ?
Thanks a lot for every help you could give to me.

Hi,
I want to save data in database using inline editor but i am facing a problem.How can i get the Id of current content in the editor so can i save data.
Please help me on this issue.
