<script type="text/javascript"> function showWindow(url) { var oWnd = $find("<%=RadWindowRegion.ClientID%>"); oWnd.setUrl(url); oWnd.show(); } </script>
<
telerik:RadWindow ID="RadWindowRegion"
runat="server" style="z-index:10000;"
Behavior="Resize, Close, Move" Modal="True" VisibleStatusbar="False"
AutoSize="True" Overlay="True">
</telerik:RadWindow>
protected void btnRecord_Click(object sender, EventArgs e)
{
RadGrid1.NeedDataSource+=
new GridNeedDataSourceEventHandler(RadGrid1_NeedDataSource);
}
and the method to bind the data is followed:
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
Contact curContact = new Contact();
curContact.ContactName = TextBox1.Text;
curContact.Title = TextBox2.Text;
curContact.Email = TextBox3.Text;
curContact.Phone = TextBox4.Text;
curContact.Fax = TextBox5.Text;
curContact.ContactType = Session[
"ContactType"].ToString();
DataTable dt = new DataTable();
dt.Columns.Add(
"ContactName");
dt.Columns.Add(
"Title");
dt.Columns.Add(
"Email");
dt.Columns.Add(
"Phone");
dt.Columns.Add(
"Fax");
dt.Columns.Add(
"ContactType");
dt.Rows.Add(curContact.ContactName, curContact.Title, curContact.Email, curContact.Phone, curContact.Fax,
curContact.ContactType);
RadGrid1.DataSource = dt;
}
But this does not seem to populate the radgrid. Am I missing anything? Any help will be appreciated.
<ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" HideStructureColumns="true" Pdf-PageBottomMargin=".5" Pdf-PageTopMargin=".5" Pdf-PageLeftMargin=".5" Pdf-PageRightMargin=".5" Pdf-PaperSize="Legal"> </ExportSettings><telerik:RadPanelBar ID="RadPanelBar1" runat="server" Height="300px" onitemclick="RadPanelBar1_ItemClick" Skin="Office2007" ValidationGroup="MenuOptions" Width="180px">