DataGrid questions (urgent)

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default DataGrid questions (urgent)

    1. In the edit mode of the datagrid, can I restrict the
    max. length of data entry the editing textbox ?
    eg in my database table, the length of the field is 10, I
    want to make sure that user will not enter data with
    length more than 10

    2. I have made a template column of checkbox in
    datagrid, how can I add a check all function for them ?

    Thx
    Vincent Guest

  2. Similar Questions and Discussions

    1. DataGrid Row Color...Urgent plz!
      Your not getting any love on this question. I have the same need. I am aware of the setPropertiesAt(row#, {backgroundColor:0x000000}) for the list...
    2. About datagrid..Urgent.
      Hi, i have 2 datagrids(both using paging) on my web page. one use to display info with check box control. if i needs the row of info, i will...
    3. Urgent - DataGrid
      Hi, Is there anyway to add a command button at the end of each row and when i click on it, it can post one of the value into another field? e.g....
    4. Please Urgent help in DataGrid problem
      This is my sql query "SELECT UC_Course_Unit.Unit_ID, Unit.Unit_Name, UC_Course_Unit.Semester_Offered, UC_Course_Unit.Year_Offered FROM Unit...
    5. reusable DataGrid Urgent!!!
      Does anyone know how to create a reusable datagrid from a class or ASCX which could except dynamic properties like column header text and could...
  3. #2

    Default Re: DataGrid questions (urgent)

    Here is the answers for your question,

    1 . In editmode, set the Maxlength for the Textbox in ItemDataBound event
    handler.
    2. Have a button in your form. when you press that button loop throught
    datagrid items and check all your check box.

    --
    Saravana
    Microsoft India Community Star,
    MCAD,SE,SD,DBA.


    "Vincent" <kcchow@csis.hku.hk> wrote in message
    news:069901c3403d$5adecf00$a301280a@phx.gbl...
    > 1. In the edit mode of the datagrid, can I restrict the
    > max. length of data entry the editing textbox ?
    > eg in my database table, the length of the field is 10, I
    > want to make sure that user will not enter data with
    > length more than 10
    >
    > 2. I have made a template column of checkbox in
    > datagrid, how can I add a check all function for them ?
    >
    > Thx

    Saravana Guest

  4. #3

    Default Re: DataGrid questions (urgent)

    I know how to loop through the dataGrid items, however,
    how can I check the check box ?

    >-----Original Message-----
    >Here is the answers for your question,
    >
    >1 . In editmode, set the Maxlength for the Textbox in
    ItemDataBound event
    >handler.
    >2. Have a button in your form. when you press that
    button loop throught
    >datagrid items and check all your check box.
    >
    >--
    >Saravana
    >Microsoft India Community Star,
    >MCAD,SE,SD,DBA.
    >
    >
    >"Vincent" <kcchow@csis.hku.hk> wrote in message
    >news:069901c3403d$5adecf00$a301280a@phx.gbl...
    >> 1. In the edit mode of the datagrid, can I restrict the
    >> max. length of data entry the editing textbox ?
    >> eg in my database table, the length of the field is
    10, I
    >> want to make sure that user will not enter data with
    >> length more than 10
    >>
    >> 2. I have made a template column of checkbox in
    >> datagrid, how can I add a check all function for them ?
    >>
    >> Thx
    >
    >
    >.
    >
    Vincent Guest

  5. #4

    Default Re: DataGrid questions (urgent)

    check out this code snippet,

    For Each di In DataGrid1.Items

    ' Make sure this is an item and not the header or footer.

    If di.ItemType = ListItemType.Item OrElse di.ItemType =
    ListItemType.AlternatingItem Then

    CType(di.FindControl("chkbox1"), RadioButton).Checked = True

    End If

    Next


    --
    Saravana
    Microsoft India Community Star,
    MCAD,SE,SD,DBA.


    "Vincent" <kcchow@csis.hku.hk> wrote in message
    news:080901c340b2$c6685af0$a001280a@phx.gbl...
    > I know how to loop through the dataGrid items, however,
    > how can I check the check box ?
    >
    >
    > >-----Original Message-----
    > >Here is the answers for your question,
    > >
    > >1 . In editmode, set the Maxlength for the Textbox in
    > ItemDataBound event
    > >handler.
    > >2. Have a button in your form. when you press that
    > button loop throught
    > >datagrid items and check all your check box.
    > >
    > >--
    > >Saravana
    > >Microsoft India Community Star,
    > >MCAD,SE,SD,DBA.
    > >
    > >
    > >"Vincent" <kcchow@csis.hku.hk> wrote in message
    > >news:069901c3403d$5adecf00$a301280a@phx.gbl...
    > >> 1. In the edit mode of the datagrid, can I restrict the
    > >> max. length of data entry the editing textbox ?
    > >> eg in my database table, the length of the field is
    > 10, I
    > >> want to make sure that user will not enter data with
    > >> length more than 10
    > >>
    > >> 2. I have made a template column of checkbox in
    > >> datagrid, how can I add a check all function for them ?
    > >>
    > >> Thx
    > >
    > >
    > >.
    > >

    Saravana Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139