The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientCardView.GetCardKey(visibleIndex) Method

Returns the key value of the specified card.

Declaration

GetCardKey(visibleIndex: number): string

Parameters

Name Type Description
visibleIndex number

An integer value that specifies the card's visible index.

Returns

Type Description
string

A string representing the specified card's key value. If the index passed via the visibleIndex parameter is wrong, or the ASPxGridBase.KeyFieldName property is not set, null is returned.

Remarks

Note

If multiple key fields are set using the grid's ASPxGridBase.KeyFieldName property, a specific service vertical bar symbol (the symbol |) is used to separate key field values in the string returned by the GetCardKey method.

Examples

This example demonstrates how to use the ASPxDataView control to show the detail ASPxCardView data.See also:T272616: ASPxCardView - How to display master-detail data using two ASPxCardView controls

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress.Web;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void ASPxDataView1_CustomCallback(object sender, DevExpress.Web.CallbackEventArgsBase e)
    {
        Session["CategoryID"] = e.Parameter;
        AccessDataSource1.SelectParameters["CategoryID"].DefaultValue = e.Parameter;
        (sender as ASPxDataView).DataBind();
    }
    protected void ASPxDataView1_Load(object sender, EventArgs e)
    {
        if (Session["CategoryID"] == null) return;
        AccessDataSource1.SelectParameters["CategoryID"].DefaultValue = Session["CategoryID"].ToString();
        (sender as ASPxDataView).DataBind();
    }
}
See Also