Radgrid View with Custom Add into Data source

4 posts, 1 answers
  1. Victor
    Victor avatar
    4 posts
    Member since:
    Sep 2015

    Posted 15 Sep 2015 Link to this post

    I have a problem for this scenario

     Some External hardware device for passing message to the grid

    GridViewRowInfo rowinfo = radGridView1.Rows.AddNew();

    rowinfo.Cells[0] = 12  // which is the id

    rowinfo.Cells[1] = "Some Values"

     

    someTableAdatper.Update(someDataSet)

     

    Since ID is unique generate, is there way to get that ID+1 auto generate or I have to found out the # of row and + 1 to it?

     

     

     

     

     

     

     

     

     

  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 17 Sep 2015 Link to this post

    Hi Victor,

    Thank you for contacting us.

    This depends on how the data set is configured. For example, if the AutoIncrementStep and Unique are set in the column properties (see first attached image) the id will be auto-populated when the row is added (see the second image).

    I hope this helps.

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Victor
    Victor avatar
    4 posts
    Member since:
    Sep 2015

    Posted 17 Sep 2015 in reply to Dimitar Link to this post

    Works like charm

     

    An other one question come in mind, when i deploy my winform

     

     

    the connectionstring change from  TestPC to localhost\SQLExpress

     

    no grid data display,no error ->  that is pretty odd

     

     

     

  5. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 18 Sep 2015 Link to this post

    Hi Victor,

    Thank you for writing back.

    In this case, I would recommend you to debug the application on your client machine. This will allow you to determine if the issue is in the connection or there is something else that is causing it. In addition, you should check if there are empty try catch blocks in your code, maybe this is why there is no error message. 

    I hope this will be useful.

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top