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. General Programming
  3. C#
  4. gris view and sql id (have to set without GUI)

gris view and sql id (have to set without GUI)

Scheduled Pinned Locked Moved C#
databasecssquestion
6 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.
  • G Offline
    G Offline
    GugliMugli
    wrote on last edited by
    #1

    there are a grid view and sqldata sourceid in my code defined previously. can i use it for any sql query? or i have to create some another???

    C 1 Reply Last reply
    0
    • G GugliMugli

      there are a grid view and sqldata sourceid in my code defined previously. can i use it for any sql query? or i have to create some another???

      C Offline
      C Offline
      chester_it21
      wrote on last edited by
      #2

      it all depends on your needs .... for example: If you have a query like this in your SqldDataSource to display the data to the Gridview :

      select * from TableMasterCity

      then you can use it to Bind dropdownlist or other control. it all depends on the manufacture of the SQL query that you created and the need for its control.

      G 1 Reply Last reply
      0
      • C chester_it21

        it all depends on your needs .... for example: If you have a query like this in your SqldDataSource to display the data to the Gridview :

        select * from TableMasterCity

        then you can use it to Bind dropdownlist or other control. it all depends on the manufacture of the SQL query that you created and the need for its control.

        G Offline
        G Offline
        GugliMugli
        wrote on last edited by
        #3

        i need to call like select * from temp c1,c2,c3 where c1='17/nov/2011' is there any restriction to use specific data type??means when we create a grid view or sql data id we have to define data type of columns or not?

        C 2 Replies Last reply
        0
        • G GugliMugli

          i need to call like select * from temp c1,c2,c3 where c1='17/nov/2011' is there any restriction to use specific data type??means when we create a grid view or sql data id we have to define data type of columns or not?

          C Offline
          C Offline
          chester_it21
          wrote on last edited by
          #4

          I think,if you want show all colums in GridView, you can define columns or not..both it's yes can... If you dont want define columns in gridview,you can set Autogeneratecolumns=true in Properties Gridview ,and result will show data column c1,c2,c3.. If you set Autogeneratecolumns=false,you must define columns in gridview..

          1 Reply Last reply
          0
          • G GugliMugli

            i need to call like select * from temp c1,c2,c3 where c1='17/nov/2011' is there any restriction to use specific data type??means when we create a grid view or sql data id we have to define data type of columns or not?

            C Offline
            C Offline
            chester_it21
            wrote on last edited by
            #5

            if for Gridview and SqlDataSource, I guess you do not need to define its data type colum can, ...

            G 1 Reply Last reply
            0
            • C chester_it21

              if for Gridview and SqlDataSource, I guess you do not need to define its data type colum can, ...

              G Offline
              G Offline
              GugliMugli
              wrote on last edited by
              #6

              thanx a lot...

              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