Hi Nathan!!, how are you ? :)
Thanks about the two time and quick help!! :)
But i'm running into the following :(..
If i Do the next call in the HTML_ROW_CREATED:
Dim btn As ASPxButton = TryCast(ASPxGridView1.FindDetailRowTemplateControl(e.VisibleIndex, "ASPxButton1"), ASPxButton ) 'yes! The AspxButtonID is ASPxButton1 :)
as you said.. then i get nothing..
If I do:
Dim bx As ASPxButton = dg.FindFooterCellTemplateControl(dg.Columns("Total"), "ASPxButton1")
Where DG is the detail row.. Then i get a pointer to the control! But with no success doing this:
bx.ClientSideEvents.Click = String.Format("function(s, e) {{ grid.PerformCallback({0});}}", e.VisibleIndex)
It's simply dont update the ClientSide Event.. and never fires the onCallBack event :(..
Because the code worth more than 1000 words :), This's my code:
VB-------------
Protected Sub ASPxGridView1_HtmlRowCreated(ByVal sender As Object, ByVal e As ASPxGridViewTableRowEventArgs)
If e.RowType = GridViewRowType.Detail Then
Dim dg As ASPxGridView = ASPxGridView1.FindDetailRowTemplateControl(e.VisibleIndex, "detailGrid")
Dim bx As ASPxButton = dg.FindFooterCellTemplateControl(dg.Columns("Total"), "ASPxButton1")
bx.ClientSideEvents.Click = String.Format("function(s, e) {{ grid.PerformCallback({0});}}", e.VisibleIndex) 'works but, it didnt make the button perform any action..
'Dim btn As ASPxButton = TryCast(ASPxGridView1.FindDetailRowTemplateControl(e.VisibleIndex, "ASPxButton1"), ASPxButton) 'returns me Nothing..
'btn.ClientSideEvents.Click = String.Format("function(s, e) {{ grid.PerformCallback({0});}}", e.VisibleIndex) 'wont work if i get nothing from the previous...
End If
End Sub
ASPX--------
<dxwgv:ASPxGridView KeyFieldName="keyField" ID="ASPxGridView1" runat="server" AutoGenerateColumns="True"
Width="100%" ClientInstanceName="grid" SettingsPager-PageSize="100" DataSourceID="SqlDataSource1"
OnHtmlRowCreated = "ASPxGridView1_HtmlRowCreated"
OnCustomButtonCallback = "CustomCallBack"
>
(...)
<DetailRow>
<dxwgv:ASPxGridView ID="detailGrid" runat="server" DataSourceID="detailDataSource"
Style="border:1px solid black"
KeyFieldName="keyField" Width="100%" AutoGenerateColumns="false"
Settings-ShowFooter="true"
OnBeforePerformDataSelect="detailGrid_DataSelect" >
(...)
<Columns>
(....)
<dxwgv:GridViewDataTextColumn FieldName="Total" VisibleIndex="5" FooterCellStyle-HorizontalAlign="right">
<PropertiesTextEdit DisplayFormatString="c">
</PropertiesTextEdit>
<FooterTemplate>
<dxe:ASPxButton id="ASPxButton1" runat="server" Text="Save2" ></dxe:ASPxButton>
</FooterTemplate>
</dxwgv:GridViewDataTextColumn>
</Columns>
<SettingsDetail AllowOnlyOneMasterRowExpanded="True" IsDetailGrid="True" ShowDetailButtons="False" />
</dxwgv:ASPxGridView>
</DetailRow>
(...)
I'm I missing something?..
Thank again Nathan.