Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Registry and Datagrid show error control in design mode-please help!!

Registry and Datagrid show error control in design mode-please help!!

Scheduled Pinned Locked Moved ASP.NET
helpdesigncsharpwindows-admindebugging
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kal13na13
    wrote on last edited by
    #1

    hi I read a very nice article about grouping radiobuttons I have used the coding in my project as it is quite similar and i have made few changes to it but I am having problem i am able to add reference but when i use register and tag prefix ="rs" to call the custom contol groupradiobutton in the datagird the design page shows the gridcontrol -error control in the datagrid which i am finding difficult to follow. <%@ Register TagPrefix="rs" Namespace="Sample.Web.UI.Controls" Assembly ="Available" %><%@ Page language="c#" Codebehind="AvailableCourse.aspx.cs" Debug="true" AutoEventWireup="false" Inherits="Bound.AvailableCourse" %> even in the aspx.cs file i am getting error near "Checked " the error is like this " Bound.AvailableCourse" does not contain a definition for Checked "foreach(DataGridItem dgItem in DataGrid1.Items) { AvailableCourse Availablecourse=dgItem.FindControl("Availablecourse")as AvailableCourse; // if it is checked (current item is selected)... if(Availablecourse!= null && Availablecourse.Checked) { DataTable dataSource=DataSource.CreateDataSource(); DataRow row = dataSource.Rows.Find(DataGrid1.DataKeys[dgItem.ItemIndex]); Label1.Text = String.Format("Selected day: {0}, Date_Time: {1}", row["Date_Time"], row["Number_Of_Seats"]); return; thanks in advance kal13na13 kal13na13

    M 1 Reply Last reply
    0
    • K kal13na13

      hi I read a very nice article about grouping radiobuttons I have used the coding in my project as it is quite similar and i have made few changes to it but I am having problem i am able to add reference but when i use register and tag prefix ="rs" to call the custom contol groupradiobutton in the datagird the design page shows the gridcontrol -error control in the datagrid which i am finding difficult to follow. <%@ Register TagPrefix="rs" Namespace="Sample.Web.UI.Controls" Assembly ="Available" %><%@ Page language="c#" Codebehind="AvailableCourse.aspx.cs" Debug="true" AutoEventWireup="false" Inherits="Bound.AvailableCourse" %> even in the aspx.cs file i am getting error near "Checked " the error is like this " Bound.AvailableCourse" does not contain a definition for Checked "foreach(DataGridItem dgItem in DataGrid1.Items) { AvailableCourse Availablecourse=dgItem.FindControl("Availablecourse")as AvailableCourse; // if it is checked (current item is selected)... if(Availablecourse!= null && Availablecourse.Checked) { DataTable dataSource=DataSource.CreateDataSource(); DataRow row = dataSource.Rows.Find(DataGrid1.DataKeys[dgItem.ItemIndex]); Label1.Text = String.Format("Selected day: {0}, Date_Time: {1}", row["Date_Time"], row["Number_Of_Seats"]); return; thanks in advance kal13na13 kal13na13

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      The DataGridItem[^] does not support the Checked property. You might need to look for the radiobutton in the Controls collection of the cell, or use the FindControl to get reference to the radiobutton, then access its Checked property.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups